Update architecture and roadmap status icons.

This commit is contained in:
2026-04-27 23:44:59 +08:00
parent d4d7495ffb
commit f57f6c8f35
2 changed files with 26 additions and 26 deletions

View File

@@ -22,21 +22,21 @@ Rules:
| Layer | Package | Purpose | Status |
|-------|---------|---------|--------|
| **CLI** | `cmd` | Cobra root command | ✅ skeleton |
| | `cmd/serve.go` | `mygo serve` — wire deps, start HTTP | ✅ skeleton |
| | `cmd/config.go` | `mygo config` — config subcommand | ⬜ plan |
| | `cmd/status.go` | `mygo status` — health check | ⬜ plan |
| **Config** | `internal/config` | Viper load (YAML + env + flags) | ✅ skeleton |
| **App** | `internal/app` | Runtime dependency container and build metadata | ✅ skeleton |
| **HTTP** | `internal/server` | Gin router init, route registration, graceful shutdown | ✅ skeleton |
| | `internal/handler` | HTTP handlers (auth, file, admin, webdav...) | ✅ skeleton |
| | `internal/middleware` | Gin middleware (logger, cors, auth) | ⬜ plan |
| **Business** | `internal/service` | Business logic (auth, file, admin) | ⬜ plan |
| | `internal/model` | Domain types (User, File, errors) | ⬜ plan |
| **Data** | `internal/repository` | Repository interfaces + GORM implementations | ⬜ plan |
| | `internal/storage` | Storage backend interface + local disk impl | ⬜ plan |
| **Util** | `internal/auth` | JWT sign/verify, context helpers | ⬜ plan |
| | `internal/api` | Error body helpers | ✅ skeleton |
| **CLI** | `cmd` | Cobra root command | 🛠 WIP |
| | `cmd/serve.go` | `mygo serve` — wire deps, start HTTP | 🛠 WIP |
| | `cmd/config.go` | `mygo config` — config subcommand | 🛠 WIP |
| | `cmd/status.go` | `mygo status` — health check | 🛠 WIP |
| **Config** | `internal/config` | Viper load (YAML + env + flags) | 🛠 WIP |
| **App** | `internal/app` | Runtime dependency container and build metadata | 🛠 WIP |
| **HTTP** | `internal/server` | Gin router init, route registration, graceful shutdown | 🛠 WIP |
| | `internal/handler` | HTTP handlers (auth, file, admin, webdav...) | 🛠 WIP |
| | `internal/middleware` | Gin middleware (logger, cors, auth) | 🛠 WIP |
| **Business** | `internal/service` | Business logic (auth, file, admin) | 🛠 WIP |
| | `internal/model` | Domain types (User, File, errors) | 🛠 WIP |
| **Data** | `internal/repository` | Repository interfaces + GORM implementations | 🛠 WIP |
| | `internal/storage` | Storage backend interface + local disk impl | 🛠 WIP |
| **Util** | `internal/auth` | JWT sign/verify, context helpers | 🛠 WIP |
| | `internal/api` | Error body helpers | 🛠 WIP |
## API Routes (v0)

View File

@@ -4,29 +4,29 @@
| Feature | Status | Notes |
|---------|--------|-------|
| CLI config management | ⬜ plan | |
| JWT authentication | ⬜ plan | access + refresh tokens, refresh token in DB |
| Web API foundation | ✅ skeleton | WebApp composition, Gin router, graceful shutdown, `GET /api/v1/version` |
| File upload/download/manage APIs | ⬜ plan | REST API via Gin |
| Admin endpoints | ⬜ plan | user CRUD for superusers |
| WebDAV | ⬜ plan | future v0 or v1 |
| CLI config management | 🛠 WIP | |
| JWT authentication | 🛠 WIP | access + refresh tokens, refresh token in DB |
| Web API foundation | 🛠 WIP | WebApp composition, Gin router, graceful shutdown, `GET /api/v1/version` |
| File upload/download/manage APIs | 🛠 WIP | REST API via Gin |
| Admin endpoints | 🛠 WIP | user CRUD for superusers |
| WebDAV | 🛠 WIP | future v0 or v1 |
## Implementation Tasks
Package-level implementation order (each task includes unit tests):
1. `internal/config` — Viper loader, config struct
2. `internal/app` — runtime dependency container ✅ skeleton
2. `internal/app` — runtime dependency container 🛠 WIP
3. `internal/model` — domain types, error codes
4. `internal/api` — error response helpers ✅ skeleton
4. `internal/api` — error response helpers 🛠 WIP
5. `internal/auth` — JWT utils
6. `internal/storage` — backend interface + local fs
7. `internal/repository` — interfaces + GORM/SQLite impl
8. `internal/service` — auth, file, admin services
9. `internal/middleware` — logger, cors, auth
10. `internal/handler` — auth, file, admin handlers ✅ version skeleton
11. `internal/server` — Gin router, route registration, graceful shutdown ✅ skeleton
12. `cmd/serve.go`, `cmd/config.go`, `cmd/status.go` ✅ serve skeleton
10. `internal/handler` — auth, file, admin handlers 🛠 WIP
11. `internal/server` — Gin router, route registration, graceful shutdown 🛠 WIP
12. `cmd/serve.go`, `cmd/config.go`, `cmd/status.go` 🛠 WIP
13. Integration tests
## Future