日々の開発ループ
contributor の inner loop は、今の checkout で backend と frontend を直接起動することです。docker compose ではありません。 infrastructure/selfhost/docker-compose.yml は顧客向けセルフホストデプロイ用のバンドルで、日々の開発では登場しません(リポジトリ取得と環境構築 参照)。
起動
クラウド VM では、周辺コンテナから backend・frontend まで 1 本で起動できます。--screenshot を付けると、開発用ログイン(Admin)で /workspace を開いたスクリーンショットも撮ります。
bash infrastructure/local/cloud-agent/up.sh --screenshot /tmp/workspace.png
手で分けて起動するときは、周辺コンテナ(PostgreSQL、MinIO、Mailpit)を infrastructure/local/cloud-agent/start.sh が上げます。アプリ本体は次です。backend の起動と frontend の生成物づくり(bun install の postinstall)を同時に始めると Gradle の lock で片方が落ちるので、backend が起動してから frontend に進みます。
source infrastructure/local/cloud-agent/env.sh
cd backend && ./gradlew :app:bootRun
別の端末で frontend を起動します。
source infrastructure/local/cloud-agent/env.sh
cd frontend && bun run dev
devcontainer で同じことをするときは backend/scripts/start-local.sh と cd frontend && bun run dev です。アドレスは固定です。
| サービス | アドレス |
|---|---|
| Backend | http://localhost:8080 |
| Frontend | http://localhost:3000 |
| DB | astarmanagement_dev(astarmanagement-postgres-dev) |
API を変えたあとの型再生成は .claude/skills/openapi-sync/sync.sh です。backend が :8080 で healthy なら online、そうでなければコミット済み backend/openapi.json から offline です。
変更の出し方
ブランチを切って、その checkout で実装し、PR を出します。別の変更を同時に進めるときは、別のクラウド VM を使います。1 台のマシンに checkout を並べるための席や worktree ランタイムはありません。
マイグレーションの版は書いた時刻の UTC yyyyMMddHHmmss を使います(マイグレーション)。他ブランチとはぶつかりません。
まとめ — 1 周の流れ
- ブランチを切る
- backend (
:8080) と frontend (:3000) を起動する - 変更を加える
- API を変えたら
.claude/skills/openapi-sync/sync.sh - 検証の 4 層 に沿って検証する
- PR を出す
次は 検証の 4 層 です。