Files
mygo/docs/roadmap.md
Huxley 7fb125ea87 Implement web API foundation
Add application container, Gin router, graceful shutdown handler,
and version endpoint. This establishes the skeleton for the WebDisk
HTTP API as described in the architecture.

- Add internal/app/WebApp for runtime dependencies and version
- Add internal/server/router with GET /api/v1/version route
- Add graceful shutdown runner with signal handling in cmd/serve
- Add internal/api/ErrorResponse for standard HTTP error body
- Update roadmap, architecture, and decisions documentation
2026-04-27 23:06:06 +08:00

40 lines
1.6 KiB
Markdown

# Roadmap
## v0
| 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 |
## 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
3. `internal/model` — domain types, error codes
4. `internal/api` — error response helpers ✅ skeleton
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
13. Integration tests
## Future
| Feature | Status | Notes |
|---------|--------|-------|
| Image server | ⬜ plan | thumbnail generation |
| Pastebin & code snippets | ⬜ plan | in sharing context |
| S3 storage backend | ⬜ plan | new storage impl |
| Nextcloud-compatible API | ⬜ plan | new handler layer on existing services |