数据层可插拔(SQLite/MariaDB) + 后端 services 骨架

- database.ts 改为按 DB_TYPE 切换 SQLite / MariaDB(mysql2),sqlite3 按需动态导入
- index.ts 改为初始化数据库后再监听端口
- 新增 AuthService / HealthService / AnalysisService / GarminService
- 新增 .gitignore、server/.env(忽略) 与 .env.example
- README 增加数据库配置说明;package.json 增加 mysql2/@types
This commit is contained in:
ericwyuan
2026-08-23 11:58:07 +08:00
parent d73405decb
commit 6b05d04773
11 changed files with 22362 additions and 122 deletions

36
.gitignore vendored
View File

@@ -1,27 +1,29 @@
# Dependencies
node_modules/
dist/
build/
*.log
npm-debug.log*
.DS_Store
# Env (contains secrets - never commit)
.env
.env.local
.env.*.local
.idea/
.vscode/
*.swp
*.swo
~*
# Database
# Local SQLite data
data/
*.db
*.sqlite
*.sqlite3
# API Keys and secrets
.env.production.local
config/secrets.json
# Build output
dist/
build/
# Build artifacts
server/dist/
client/build/
# Logs
logs/
*.log
# OS / editor
.DS_Store
.idea/
.vscode/
# WorkBuddy tool state (not project code)
.workbuddy/