⚙️ 運用
📊 1. 監視 / 計測
- MVP では Vercel Analytics の無料枠のみ
- Sentry 等のエラートラッキングは Phase 2 以降に判断
💾 2. バックアップ
- Neon の自動バックアップ(無料枠でも 7 日間の point-in-time recovery あり)に依存
- データエクスポート(CSV/JSON)は Phase 2
🌿 3. ブランチ運用
flowchart LR
Issue["📌 Issue
(機能単位)"]:::issue Feat["🌿 feat/* branch"]:::branch CI{"🚦 CI
型 + Biome + Vitest"}:::ci Main["🚀 main
(protected)"]:::main Deploy["☁️ Vercel + drizzle migrate"]:::deploy Issue --> Feat Feat -->|push & PR| CI CI -->|fail| Feat CI -->|pass| Main Main -->|build| Deploy classDef issue fill:#eef3f8,stroke:#6b9bc7,color:#1a2533 classDef branch fill:#e8f3ec,stroke:#2f7a4a,color:#1a2533 classDef ci fill:#fff3e6,stroke:#c47a14,color:#1a2533 classDef main fill:#f0f6fc,stroke:#1e5a8e,stroke-width:2px,color:#1a2533 classDef deploy fill:#eef3f8,stroke:#6b9bc7,color:#1a2533
(機能単位)"]:::issue Feat["🌿 feat/* branch"]:::branch CI{"🚦 CI
型 + Biome + Vitest"}:::ci Main["🚀 main
(protected)"]:::main Deploy["☁️ Vercel + drizzle migrate"]:::deploy Issue --> Feat Feat -->|push & PR| CI CI -->|fail| Feat CI -->|pass| Main Main -->|build| Deploy classDef issue fill:#eef3f8,stroke:#6b9bc7,color:#1a2533 classDef branch fill:#e8f3ec,stroke:#2f7a4a,color:#1a2533 classDef ci fill:#fff3e6,stroke:#c47a14,color:#1a2533 classDef main fill:#f0f6fc,stroke:#1e5a8e,stroke-width:2px,color:#1a2533 classDef deploy fill:#eef3f8,stroke:#6b9bc7,color:#1a2533
-
main は protected
直 push 禁止、CI(型チェック + Biome + Vitest)の通過を merge 条件にする。
- feature ブランチ(
feat/...,fix/...,chore/...)を切って PR → self-merge - すべての PR は Issue 起点。PR description に
closes #Nを記載
📌 4. Issue 粒度
-
機能単位 で 1 Issue → 1 PR
例: "Auth フロー", "Bean CRUD", "Brew 作成画面", "Brew 一覧と絞り込み"
- 子タスクが多い機能は Issue 内チェックリストで管理(子 Issue は基本作らない)
- Phase 1 の Issue 候補は requirements.md §2.1 の機能 6 項目に概ね対応
✍️ 5. コミット規約
- Conventional Commits
.claude/skills/commitを活用して整形済みメッセージで commit- 使用する type は最低限
feat / fix / refactor / chore / test / docs / build / ciに絞る
🔄 6. マイグレーション運用
| 環境 | 適用方法 |
|---|---|
| local | pnpm db:migrate を手動実行(docker-compose Postgres 向け) |
| preview | Vercel-Neon integration で PR ごとに Neon branch 作成 → Vercel build 内 drizzle-kit migrate で適用 |
| prod | main マージ時、Vercel build の drizzle-kit migrate で適用 |
package.jsonの build script をdrizzle-kit migrate && next buildにする-
Phase 1 は単独開発者で並列 PR の race はまず起きない前提
起きたら直列に再実行で復旧。
- Phase 2 以降に並列体制になったら、GitHub Actions 経由の deploy gating に移行検討
🚦 7. CI
.github/workflows/ci.yml-
ジョブ: 型チェック / Biome / Vitest
具体的には
tsc --noEmit,biome ci,vitest run。 - すべて pass を main merge の必須 status checks に登録
-
E2E Playwright は Phase 1 では CI 外(手動実行)
Phase 2 で統合(requirements.md §2.3)。