diff --git a/.gitignore b/.gitignore index be37d58..2fb8da7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,44 @@ -# Dependencies +# ============================================== +# Dependencies (依赖目录) +# ============================================== node_modules/ -/backed/temp +**/node_modules/ -# Build outputs +# ============================================== +# Build outputs (构建输出) +# ============================================== dist/ build/ +.vite/ +.next/ +.nuxt/ -# Environment files +# ============================================== +# Environment files (环境配置文件) +# ============================================== .env .env.local -.env.development.local -.env.test.local -.env.production.local -.gitignore -.vercelignore +.env.*.local +!.env.example -# Logs -logs +# ============================================== +# IDE & Editor (编辑器配置) +# ============================================== +.vscode/ +.idea/ +*.swp +*.swo +*~ +.DS_Store +Thumbs.db +.project +.classpath +.settings/ + +# ============================================== +# Logs (日志文件) +# ============================================== +logs/ *.log npm-debug.log* yarn-debug.log* @@ -24,34 +46,68 @@ yarn-error.log* pnpm-debug.log* lerna-debug.log* -# Editor directories and files -.vscode/ -.idea/ -.trae/ -.vercel/ -*.swp -*.swo -*~ -.DS_Store - -# Database files +# ============================================== +# Database files (数据库文件) +# ============================================== *.db *.sqlite +*.sqlite3 -# Backup files (generated by maintenance scripts) +# ============================================== +# Backup files (备份文件) +# ============================================== backend/backups/ *.backup.json +*.bak -# Uploads directory (user-uploaded files) +# ============================================== +# Uploads directory (用户上传文件) +# ============================================== backend/uploads/* !backend/uploads/.gitkeep -# Temporary files +# ============================================== +# Temporary files (临时文件) +# ============================================== backend/temp/* !backend/temp/.gitkeep *.tmp *.temp +*.cache -#数据文件 +# ============================================== +# Data files (数据文件) +# ============================================== *.xlsx +*.xls *.csv + +# ============================================== +# Test coverage (测试覆盖率) +# ============================================== +coverage/ +.nyc_output/ + +# ============================================== +# Process & Runtime (进程和运行时文件) +# ============================================== +.pid +*.pid +frontend/.frontend-pid +frontend/.frontend-port + +# ============================================== +# User config files (用户配置文件) +# ============================================== +backend/backgroundSettings.json +backend/fileIndex.json +backend/config/auto-backup-settings.json +backend/config/remote-backup-configs.json + +# ============================================== +# Misc (其他) +# ============================================== +.trae/ +.vercel/ +.gitignore +.vercelignore diff --git a/backend/backgroundSettings.json.example b/backend/backgroundSettings.json.example new file mode 100644 index 0000000..dc30926 --- /dev/null +++ b/backend/backgroundSettings.json.example @@ -0,0 +1,6 @@ +{ + "opacity": 0.8, + "blur": 5, + "value": "/images/bg.jpg", + "type": "image" +} diff --git a/backend/config/auto-backup-settings.json.example b/backend/config/auto-backup-settings.json.example new file mode 100644 index 0000000..e06b5d9 --- /dev/null +++ b/backend/config/auto-backup-settings.json.example @@ -0,0 +1,10 @@ +{ + "enabled": true, + "cronExpression": "0 19 * * *", + "description": "自动备份", + "backupType": "full", + "includeFiles": true, + "compress": true, + "maxCount": 30, + "maxAgeDays": 90 +} diff --git a/backend/config/remote-backup-configs.json.example b/backend/config/remote-backup-configs.json.example new file mode 100644 index 0000000..f858f3d --- /dev/null +++ b/backend/config/remote-backup-configs.json.example @@ -0,0 +1,11 @@ +{ + "targets": [], + "globalSettings": { + "enabled": false, + "uploadAfterBackup": false, + "deleteLocalAfterUpload": false, + "retryCount": 3, + "retryDelay": 5000, + "timeout": 300000 + } +}