From 0134b728d333a459e7754e85688cb774edecd242 Mon Sep 17 00:00:00 2001 From: Kerwin Date: Thu, 17 Jul 2025 14:08:52 +0800 Subject: [PATCH] update: readme.md --- .gitignore | 65 +++-- CHANGELOG.md | 85 +++++++ CONTRIBUTING.md | 298 ++++++++++++++++++++++ LICENSE | 21 ++ README.md | 323 ++++++++++++++++-------- db/connection.go | 3 +- db/converter/converter.go | 4 +- db/converter/hot_drama_converter.go | 4 +- db/converter/search_stat_converter.go | 4 +- db/converter/system_config_converter.go | 4 +- db/converter/user_converter.go | 4 +- db/migration_add_used_space.sql | 29 --- db/repo/category_repository.go | 2 +- db/repo/cks_repository.go | 2 +- db/repo/hot_drama_repository.go | 2 +- db/repo/pan_repository.go | 2 +- db/repo/ready_resource_repository.go | 2 +- db/repo/resource_repository.go | 4 +- db/repo/search_stat_repository.go | 2 +- db/repo/system_config_repository.go | 2 +- db/repo/tag_repository.go | 2 +- db/repo/user_repository.go | 2 +- go.mod | 2 +- handlers/base.go | 2 +- handlers/category_handler.go | 6 +- handlers/cks_handler.go | 8 +- handlers/hot_drama_handler.go | 8 +- handlers/pan_handler.go | 6 +- handlers/public_api_handler.go | 6 +- handlers/ready_resource_handler.go | 6 +- handlers/resource_handler.go | 6 +- handlers/scheduler_handler.go | 2 +- handlers/search_stat_handler.go | 4 +- handlers/stats_handler.go | 4 +- handlers/system_config_handler.go | 9 +- handlers/tag_handler.go | 6 +- handlers/user_handler.go | 8 +- main.go | 11 +- middleware/auth.go | 2 +- middleware/public_api.go | 2 +- uploads/.gitkeep | 3 +- utils/global_scheduler.go | 3 +- utils/scheduler.go | 9 +- 43 files changed, 751 insertions(+), 228 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE delete mode 100644 db/migration_add_used_space.sql diff --git a/.gitignore b/.gitignore index 42b6e5f..207a954 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,9 @@ *.out go.work +# Go workspace file +go.work.sum + # Environment variables .env .env.local @@ -56,54 +59,66 @@ jspm_packages/ # Optional eslint cache .eslintcache -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - # Optional REPL history .node_repl_history -# Output of 'npm pack' +# Output of npm pack' *.tgz # Yarn Integrity file .yarn-integrity +# dotenv environment variables file +.env.test + # parcel-bundler cache (https://parceljs.org/) .cache .parcel-cache -# Next.js build output +# next.js build output .next -# Nuxt.js build / generate output +# nuxt.js build output .nuxt dist -# Gatsby files -.cache/ -public +# vuepress build output +.vuepress/dist -# Storybook build outputs -.out -.storybook-out +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test # Temporary folders tmp/ temp/ -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? +# Database +*.db +*.sqlite +*.sqlite3 # Uploads uploads/* -!uploads/.gitkeep \ No newline at end of file +!uploads/.gitkeep + +# Build artifacts +build/ +dist/ + +# Docker +.dockerignore + +# Air live reload +tmp/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..cc06efe --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,85 @@ +# 📝 更新日志 + +本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/) 规范。 + +## [未发布] + +### 新增 +- 项目开源准备 +- 完善文档和贡献指南 +- 添加LICENSE文件 + +### 修复 +- 修复README格式问题 +- 优化项目结构说明 + +## [100 - 202401XX + +### 新增 +- 🎉 首次发布 +- 📁 多平台网盘支持(夸克、阿里云盘、百度网盘、UC网盘) +- 🔍 智能搜索功能 +- 📊 数据统计和分析 +- 🏷️ 标签系统 +- 👥 用户权限管理 +- 📦 批量资源管理 +- 🔄 自动处理功能 +- 📈 热播剧管理 +- ⚙️ 系统配置管理 +- 🔐 JWT认证系统 +- 📱 响应式设计 +- 🌙 深色模式支持 +- 🎨 现代化UI界面 + +### 技术特性 +- 🦀 基于Golang 1023的高性能后端 +- ⚡ Nuxt.js 3 + Vue 3前端框架 +- 🗄️ PostgreSQL数据库 +- 🔧 GORM ORM框架 +- 🐳 Docker容器化部署 +- 📝 TypeScript类型安全 + +### 核心功能 +- 资源管理:增删改查、批量操作 +- 分类管理:资源分类和标签 +- 平台管理:多网盘平台支持 +- 搜索统计:全文搜索和数据分析 +- 系统配置:灵活的参数配置 + +--- + +## 版本说明 + +### 版本号格式 +- **主版本号**:不兼容的API修改 +- **次版本号**:向下兼容的功能性新增 +- **修订号**:向下兼容的问题修正 + +### 更新类型 +- 🎉 **重大更新** - 新版本发布 +- ✨ **新增功能** - 新功能或特性 +- 🐛 **问题修复** - Bug修复 +- 🔧 **优化改进** - 性能优化或代码改进 +- 📚 **文档更新** - 文档或注释更新 +- 🎨 **界面优化** - UI/UX改进 +- ⚡ **性能提升** - 性能相关改进 +- 🔒 **安全更新** - 安全相关修复 +- 🧪 **测试相关** - 测试用例或测试工具 +- 🚀 **部署相关** - 部署或构建相关 + +--- + +## 贡献 + +如果您想为更新日志做出贡献,请: + +1. 在提交代码时使用规范的提交信息2. 在Pull Request中描述您的更改 +3. 遵循项目的贡献指南 + +--- + +## 链接 + +- [项目主页](https://github.com/your-username/l9pan) +- [问题反馈](https://github.com/your-username/l9pan/issues) +- [讨论区](https://github.com/your-username/l9 \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..9c0ad8b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,298 @@ +# 🤝 贡献指南 + +感谢您对 L9Pan 项目的关注!我们欢迎所有形式的贡献。 + +## 📋 贡献类型 + +- 🐛 Bug 修复 +- ✨ 新功能开发 +- 📚 文档改进 +- 🎨 UI/UX 优化 +- ⚡ 性能优化 +- 🧪 测试用例 +- 🔧 工具改进 + +## 🚀 开始贡献 + +### 1. Fork 项目 + +1. 访问 [L9Pan GitHub 仓库](https://github.com/ctwj/panResManage) +2. 点击右上角的 Fork 按钮 +3. 选择您的 GitHub 账户 + +### 2. 克隆您的 Fork + +```bash +git clone https://github.com/YOUR_USERNAME/resManage.git +cd resManage +``` + +### 3. 添加上游仓库 + +```bash +git remote add upstream https://github.com/ctwj/panResManage.git +``` + +### 4. 创建功能分支 + +```bash +git checkout -b feature/your-feature-name +# 或者 +git checkout -b fix/your-bug-fix +``` + +## 💻 开发环境设置 + +### 后端开发 + +```bash +# 安装 Go 依赖 +go mod tidy + +# 复制环境变量文件 +cp env.example .env + +# 编辑环境变量 +vim .env + +# 启动开发服务器 +go run main.go +``` + +### 前端开发 + +```bash +# 进入前端目录 +cd web + +# 安装依赖 +pnpm install + +# 启动开发服务器 +pnpm dev +``` + +### 数据库设置 + +```sql +CREATE DATABASE res_db; +``` + +## 📝 开发规范 + +### 代码风格 + +#### Go 代码规范 +- 遵循 [Go 官方代码规范](https://golang.org/doc/effective_go.html) +- 使用 `gofmt` 格式化代码 +- 函数名使用驼峰命名法 +- 包名使用小写字母 +- 错误处理要明确 + +#### TypeScript/JavaScript 规范 +- 使用 TypeScript 编写代码 +- 遵循 ESLint 规则 +- 使用 Prettier 格式化代码 +- 组件名使用 PascalCase +- 变量名使用 camelCase + +### 提交信息规范 + +使用中文描述提交信息,格式如下: + +``` +类型(范围): 简短描述 + +详细描述(可选) + +相关Issue: #123``` + +类型包括: +- `feat`: 新功能 +- `fix`: 修复bug +- `docs`: 文档更新 +- `style`: 代码格式调整 +- `refactor`: 代码重构 +- `test`: 测试相关 +- `chore`: 构建过程或辅助工具的变动 + +示例: +``` +feat(资源管理): 添加批量导入功能 + +- 支持Excel文件导入 +- 添加导入进度显示 +- 优化错误处理 + +相关Issue: #45 +``` + +### 分支命名规范 + +- `feature/功能名称` - 新功能开发 +- `fix/问题描述` - Bug修复 +- `docs/文档类型` - 文档更新 +- `refactor/重构内容` - 代码重构 +- `test/测试内容` - 测试相关 + +## 🧪 测试 + +### 后端测试 + +```bash +# 运行所有测试 +go test ./... + +# 运行特定包的测试 +go test ./handlers + +# 运行测试并显示覆盖率 +go test -cover ./... +``` + +### 前端测试 + +```bash +cd web + +# 运行单元测试 +pnpm test + +# 运行E2E测试 +pnpm test:e2## 📋 Pull Request 流程 + +###1. 确保代码质量 + +- ] 代码通过所有测试 +- ] 代码符合项目规范 +- ] 添加了必要的文档 +- ] 更新了相关文档 + +### 2 提交 Pull Request + +1推送您的分支到您的 Fork +```bash +git push origin feature/your-feature-name +``` + +2. 在 GitHub 上创建 Pull Request3. 填写 PR 模板4 等待代码审查 + +###3PR 模板 + +```markdown +## 📝 描述 + +简要描述您的更改 + +## 🎯 类型 + +- ] Bug 修复 +- ] 新功能 +- ] 文档更新 +- ] 代码重构 +- ] 性能优化 +- 相关 + +## 🔗 相关 Issue + +关闭 #123 + +## ✅ 检查清单 + +- ] 我的代码遵循项目的代码规范 +- ] 我已经自测了我的更改 +- ] 我已经添加了必要的测试 +- ] 我已经更新了相关文档 +- ] 我的更改不会产生新的警告 +- 我添加了示例来证明我的更改是有效的 + +## 📸 截图(如果适用) + +## 🔧 测试 + +请描述您如何测试您的更改 + +## 📋 其他信息 + +任何其他信息或上下文 +``` + +## 🐛 报告 Bug + +### Bug 报告模板 + +```markdown +## 🐛 Bug 描述 + +清晰简洁地描述 bug + +## 🔄 重现步骤 +1. 进入...2. 点击 '....3. 滚动到 ....4 看到错误 + +## ✅ 预期行为 + +清晰简洁地描述您期望发生的事情 + +## 📸 截图 + +如果适用,添加截图以帮助解释您的问题 + +## 💻 环境信息 + +- 操作系统: [例如 Windows 10] +- 浏览器: [例如 Chrome, Safari] +- 版本:例如 22] + +## 📱 移动设备(如果适用) + +- 设备: [例如 iPhone 6] +- 操作系统: 例如 iOS 8.1] +- 浏览器:例如 Safari] +- 版本: [例如 22] + +## 🔧 其他上下文 + +在此处添加有关问题的任何其他上下文 +``` + +## 💡 功能请求 + +### 功能请求模板 + +```markdown +## 💡 功能描述 + +清晰简洁地描述您想要的功能 + +## 🎯 问题描述 + +清晰简洁地描述这个功能要解决的问题 + +## 💭 建议的解决方案 + +清晰简洁地描述您希望发生的事情 + +## 🔄 替代方案 + +清晰简洁地描述您考虑过的任何替代解决方案或功能 + +## 📋 其他上下文 + +在此处添加有关功能请求的任何其他上下文或截图 +``` + +## 📞 联系我们 + +如果您有任何问题或需要帮助,请通过以下方式联系我们: + +- 📧 邮箱: 510199617@qq.com +- 💬 讨论区: [GitHub Discussions](https://github.com/your-username/l9pan/discussions) +- 🐛 问题反馈: [GitHub Issues](https://github.com/your-username/l9pan/issues) + +## 🙏 致谢 + +感谢所有为 L9项目做出贡献的开发者! + +--- + +**记住:每一个贡献,无论大小,都是宝贵的!** 🎉 \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9782cda --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 L9Pan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index c05378a..45f1fce 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,114 @@ -# 资源管理系统 +# 🚀 panResManage - 网盘资源管理系统 -一个基于 Golang + Nuxt.js 的资源管理系统,参考网盘资源管理界面设计。 +