# gitcatch **Repository Path**: taurusru1/gitcatch ## Basic Information - **Project Name**: gitcatch - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-08 - **Last Updated**: 2025-12-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CodeHub - 开发者社区平台 一个现代化的开发者社区平台,集成了AI智能搜索功能,提供代码仓库管理、技术文章分享、问答社区等完整功能。 ## 功能特色 ### 🔐 用户认证 - JWT 身份认证 - 用户注册/登录 - 用户资料管理 ### 📦 代码仓库 - 仓库 CRUD 操作 - 代码搜索功能 - AI 智能搜索 - 仓库收藏功能 ### 📝 技术文章 - 文章发布与管理 - 文章分类和标签 - 点赞和收藏功能 - 热门文章推荐 ### 💬 问答社区 - 问题发布与回答 - 问题分类管理 - 答案采纳功能 - 点赞和评论系统 ### 👥 用户互动 - 用户关注系统 - 个人主页展示 - 用户统计信息 ### 🤖 AI智能搜索 - 基于千问AI API的智能仓库推荐 - 自然语言搜索,无需复杂的关键词 - AI评分和推荐理由 - 智能总结搜索结果 ## 快速开始 ### 安装依赖 ```bash npm install ``` ### 配置环境变量 1. 复制 `.env.example` 文件为 `.env` 2. 在 `.env` 文件中添加您的千问API密钥: ``` VITE_QIANWEN_API_KEY=your-actual-qianwen-api-key ``` ### 启动开发服务器 ```bash npm run dev ``` 访问 http://localhost:5173 查看应用 ### 构建生产版本 ```bash npm run build ``` ## AI功能使用 ### 获取千问API密钥 1. 访问 [阿里云百炼平台](https://bailian.console.aliyun.com/) 2. 注册账号并开通DashScope服务 3. 获取API密钥 ### 使用AI搜索 1. 进入"仓库筛选"页面 2. 在AI智能搜索框中输入自然语言描述 3. 例如:"推荐一些优秀的前端框架"、"适合初学者的Python项目" 4. 点击"AI搜索"按钮获取智能推荐 ### AI搜索特性 - **智能理解**: 理解用户的真实需求 - **精准推荐**: 基于AI算法推荐最相关的仓库 - **评分系统**: 为每个推荐结果提供AI评分 - **推荐理由**: 详细解释为什么推荐该仓库 - **结果总结**: 提供整体搜索结果的总结 ## 技术栈 ### 后端 - **框架**: Spring Boot 2.7.0 - **数据库**: MySQL 8.0 - **安全**: Spring Security + JWT - **文档**: Swagger 2.9.2 - **工具**: ModelMapper, Apache Commons ### 前端 - **框架**: React 19.1.0 - **构建工具**: Vite 7.2.2 - **编程语言**: TypeScript 5.8.3 - **样式框架**: Tailwind CSS 3.4.1 - **路由管理**: React Router DOM 7.6.3 - **图标库**: Font Awesome 6.4.0 - **图表库**: Chart.js 4.5.0 ## 项目结构 ``` src/ ├── components/ # 可复用组件 │ ├── AISearchBox.tsx # AI搜索组件 │ └── ErrorBoundary.tsx # 错误边界组件 ├── pages/ # 页面组件 │ ├── p-home/ # 首页 │ ├── p-repo_search/ # 仓库搜索 │ ├── p-forum_home/ # 论坛首页 │ └── ... # 其他页面 ├── router/ # 路由配置 ├── services/ # API服务 │ └── aiService.ts # AI搜索服务 └── types/ # TypeScript类型定义 ``` ## 开发说明 ### 原始模板信息 本项目基于Vite React TypeScript模板构建,原始模板提供了: - React + TypeScript + Vite基础配置 - ESLint代码检查 - HMR热更新支持 原始插件: - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) 使用Babel进行快速刷新 - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) 使用SWC进行快速刷新 ## Expanding the ESLint configuration If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: ```js export default tseslint.config([ globalIgnores(['dist']), { files: ['**/*.{ts,tsx}'], extends: [ // Other configs... // Remove tseslint.configs.recommended and replace with this ...tseslint.configs.recommendedTypeChecked, // Alternatively, use this for stricter rules ...tseslint.configs.strictTypeChecked, // Optionally, add this for stylistic rules ...tseslint.configs.stylisticTypeChecked, // Other configs... ], languageOptions: { parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ]) ``` You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: ```js // eslint.config.js import reactX from 'eslint-plugin-react-x' import reactDom from 'eslint-plugin-react-dom' export default tseslint.config([ globalIgnores(['dist']), { files: ['**/*.{ts,tsx}'], extends: [ // Other configs... // Enable lint rules for React reactX.configs['recommended-typescript'], // Enable lint rules for React DOM reactDom.configs.recommended, ], languageOptions: { parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ]) ```