|
1 | | -# Phase 0:專案腳手架與基礎設施 |
| 1 | +# Phase 0:專案腳手架與基礎設施 ✅ COMPLETED |
2 | 2 |
|
3 | 3 | **階段目標:** 建立完整的 Rust 後端與 Vue 前端專案骨架,含 CI、Docker Compose 開發環境、共用基礎模組,使後續所有階段能直接在此基礎上開發。 |
4 | 4 |
|
| 5 | +**完成日期:** 2026-02-19 |
| 6 | +**實作 commits:** `4f0c23d` (feat: scaffold Phase 0 project infrastructure) |
| 7 | + |
5 | 8 | --- |
6 | 9 |
|
7 | 10 | ## 共享任務 |
|
52 | 55 | - `cargo fmt -- --check` 通過 |
53 | 56 |
|
54 | 57 | **驗收標準:** |
55 | | -- [ ] Workspace 結構完整,9 個模組空殼可編譯 |
56 | | -- [ ] Clippy 配置為 strict(all deny + pedantic warn + nursery warn) |
57 | | -- [ ] 環境變數配置檔案完整 |
58 | | -- [ ] `cargo clippy -- -D warnings` 零警告(無使用 `#[allow(...)]` 忽略) |
59 | | -- [ ] `cargo fmt -- --check` 通過 |
60 | | -- [ ] 所有 commit 遵循 Conventional Commits 格式 |
| 58 | +- [x] Workspace 結構完整,9 個模組空殼可編譯 |
| 59 | +- [x] Clippy 配置為 strict(all deny + pedantic warn + nursery warn) |
| 60 | +- [x] 環境變數配置檔案完整 |
| 61 | +- [x] `cargo clippy -- -D warnings` 零警告(無使用 `#[allow(...)]` 忽略) |
| 62 | +- [x] `cargo fmt -- --check` 通過 |
| 63 | +- [x] 所有 commit 遵循 Conventional Commits 格式 |
61 | 64 |
|
62 | 65 | --- |
63 | 66 |
|
|
86 | 89 | - `npm run test` 通過(含一個 smoke test) |
87 | 90 |
|
88 | 91 | **驗收標準:** |
89 | | -- [ ] TypeScript strict mode 完整啟用 |
90 | | -- [ ] ESLint 零警告 |
91 | | -- [ ] openapi-typescript 型別生成腳本可執行 |
92 | | -- [ ] 基礎目錄結構與 API 客戶端骨架就緒 |
93 | | -- [ ] `npm run lint -- --max-warnings 0` 零警告 |
94 | | -- [ ] `npm run typecheck` 通過 |
95 | | -- [ ] 所有 commit 遵循 Conventional Commits 格式 |
| 92 | +- [x] TypeScript strict mode 完整啟用 |
| 93 | +- [x] ESLint 零警告 |
| 94 | +- [x] openapi-typescript 型別生成腳本可執行 |
| 95 | +- [x] 基礎目錄結構與 API 客戶端骨架就緒 |
| 96 | +- [x] `npm run lint -- --max-warnings 0` 零警告 |
| 97 | +- [x] `npm run typecheck` 通過 |
| 98 | +- [x] 所有 commit 遵循 Conventional Commits 格式 |
96 | 99 |
|
97 | 100 | --- |
98 | 101 |
|
|
123 | 126 | - PostgreSQL 可連線並查詢 |
124 | 127 |
|
125 | 128 | **驗收標準:** |
126 | | -- [ ] `make dev-up` 一鍵啟動所有開發依賴 |
127 | | -- [ ] PostgreSQL 16 可存取 |
128 | | -- [ ] MailHog Web UI 可開啟 |
129 | | -- [ ] 所有 commit 遵循 Conventional Commits 格式 |
| 129 | +- [x] `make dev-up` 一鍵啟動所有開發依賴 |
| 130 | +- [x] PostgreSQL 16 可存取 |
| 131 | +- [x] MailHog Web UI 可開啟 |
| 132 | +- [x] 所有 commit 遵循 Conventional Commits 格式 |
130 | 133 |
|
131 | 134 | --- |
132 | 135 |
|
|
148 | 151 | - CI 在空白專案上全綠 |
149 | 152 |
|
150 | 153 | **驗收標準:** |
151 | | -- [ ] Push / PR 自動觸發 CI |
152 | | -- [ ] 後端 clippy + fmt + test 全部檢查 |
153 | | -- [ ] 前端 lint + typecheck + test 全部檢查 |
154 | | -- [ ] OpenAPI spec 格式驗證 |
155 | | -- [ ] 所有 commit 遵循 Conventional Commits 格式 |
| 154 | +- [x] Push / PR 自動觸發 CI |
| 155 | +- [x] 後端 clippy + fmt + test 全部檢查 |
| 156 | +- [x] 前端 lint + typecheck + test 全部檢查 |
| 157 | +- [x] OpenAPI spec 格式驗證 |
| 158 | +- [x] 所有 commit 遵循 Conventional Commits 格式 |
156 | 159 |
|
157 | 160 | --- |
158 | 161 |
|
|
184 | 187 | - Migration 可成功執行 |
185 | 188 |
|
186 | 189 | **驗收標準:** |
187 | | -- [ ] sqlx 連線池正常運作 |
188 | | -- [ ] Migration 可成功執行 |
189 | | -- [ ] TestContext 可用於測試,每次測試使用獨立資料庫 |
190 | | -- [ ] `cargo clippy -- -D warnings` 零警告(無使用 `#[allow(...)]` 忽略) |
191 | | -- [ ] `cargo fmt -- --check` 通過 |
192 | | -- [ ] 錯誤回應符合 RFC 7807 Problem Details 格式 |
193 | | -- [ ] 所有 commit 遵循 Conventional Commits 格式 |
| 190 | +- [x] sqlx 連線池正常運作 |
| 191 | +- [x] Migration 可成功執行 |
| 192 | +- [x] TestContext 可用於測試,每次測試使用獨立資料庫 |
| 193 | +- [x] `cargo clippy -- -D warnings` 零警告(無使用 `#[allow(...)]` 忽略) |
| 194 | +- [x] `cargo fmt -- --check` 通過 |
| 195 | +- [x] 錯誤回應符合 RFC 7807 Problem Details 格式 |
| 196 | +- [x] 所有 commit 遵循 Conventional Commits 格式 |
194 | 197 |
|
195 | 198 | --- |
196 | 199 |
|
|
219 | 222 | - 單元測試:RFC 7807 錯誤格式正確 |
220 | 223 |
|
221 | 224 | **驗收標準:** |
222 | | -- [ ] `cargo run` 啟動 HTTP server |
223 | | -- [ ] `/healthz` 與 `/readyz` 正常回應 |
224 | | -- [ ] 錯誤回應符合 RFC 7807 Problem Details 格式 |
225 | | -- [ ] `cargo clippy -- -D warnings` 零警告(無使用 `#[allow(...)]` 忽略) |
226 | | -- [ ] `cargo fmt -- --check` 通過 |
227 | | -- [ ] 所有 commit 遵循 Conventional Commits 格式 |
| 225 | +- [x] `cargo run` 啟動 HTTP server |
| 226 | +- [x] `/healthz` 與 `/readyz` 正常回應 |
| 227 | +- [x] 錯誤回應符合 RFC 7807 Problem Details 格式 |
| 228 | +- [x] `cargo clippy -- -D warnings` 零警告(無使用 `#[allow(...)]` 忽略) |
| 229 | +- [x] `cargo fmt -- --check` 通過 |
| 230 | +- [x] 所有 commit 遵循 Conventional Commits 格式 |
228 | 231 |
|
229 | 232 | --- |
230 | 233 |
|
|
250 | 253 | - 單元測試:多個訂閱者可同時接收同一事件 |
251 | 254 |
|
252 | 255 | **驗收標準:** |
253 | | -- [ ] EventBus 可發布和訂閱事件 |
254 | | -- [ ] 事件傳遞非阻塞 |
255 | | -- [ ] DomainEvent 枚舉可方便擴展 |
256 | | -- [ ] `cargo clippy -- -D warnings` 零警告(無使用 `#[allow(...)]` 忽略) |
257 | | -- [ ] `cargo fmt -- --check` 通過 |
258 | | -- [ ] 錯誤回應符合 RFC 7807 Problem Details 格式 |
259 | | -- [ ] 所有 commit 遵循 Conventional Commits 格式 |
| 256 | +- [x] EventBus 可發布和訂閱事件 |
| 257 | +- [x] 事件傳遞非阻塞 |
| 258 | +- [x] DomainEvent 枚舉可方便擴展 |
| 259 | +- [x] `cargo clippy -- -D warnings` 零警告(無使用 `#[allow(...)]` 忽略) |
| 260 | +- [x] `cargo fmt -- --check` 通過 |
| 261 | +- [x] 錯誤回應符合 RFC 7807 Problem Details 格式 |
| 262 | +- [x] 所有 commit 遵循 Conventional Commits 格式 |
260 | 263 |
|
261 | 264 | --- |
262 | 265 |
|
|
286 | 289 | - 單元測試:路由守衛在未認證時重導向至 `/login` |
287 | 290 |
|
288 | 291 | **驗收標準:** |
289 | | -- [ ] 基礎 Layout 渲染正確 |
290 | | -- [ ] 路由切換正常 |
291 | | -- [ ] 認證守衛框架就緒(骨架) |
292 | | -- [ ] `npm run lint -- --max-warnings 0` 零警告 |
293 | | -- [ ] `npm run typecheck` 通過 |
294 | | -- [ ] 所有 commit 遵循 Conventional Commits 格式 |
| 292 | +- [x] 基礎 Layout 渲染正確 |
| 293 | +- [x] 路由切換正常 |
| 294 | +- [x] 認證守衛框架就緒(骨架) |
| 295 | +- [x] `npm run lint -- --max-warnings 0` 零警告 |
| 296 | +- [x] `npm run typecheck` 通過 |
| 297 | +- [x] 所有 commit 遵循 Conventional Commits 格式 |
295 | 298 |
|
296 | 299 | --- |
297 | 300 |
|
|
0 commit comments