Back to Modes | Main Guide

Dev Mode

Typical workflow for adding APIs to the backend:
- Add the API to the OpenAPI spec (follow OpenAPI rules)
- Run `generate.ts` to update the generated code
- Add or update the controller (uses the `[module]` package generated from the spec)
- Add or update the use case
- Update domain models if needed
- Add or update `[PROJECT-NAME]-api/internal/authz/v1/[module]` (middleware) if it doesn't exist. Method name should match the controller
- Update `main.go` (e.g., initialize repository/use case) if needed
- Add or update repository (uses the `model` package for DB models)
- Optionally, communicate with frontend using `message_key` and `message_params`. These should exist in `en.json` and `ja.json`

Typical workflow for integrating APIs in the frontend:
- Create a route if it doesn't exist
- For CRUD, use `CommonDataTable` (refer to existing examples)
- For other pages, follow the structure of similar existing pages and follow the API spec
- Import API types from `[PROJECT-NAME]-web/app/lib/api/@tanstack/react-query.gen.ts` (generated from OpenAPI using `operationId`)
- Add new translations in `en.json` and `ja.json`
- Use flat translation keys (e.g., `common.create`)

When fixing issues in `DEV-TODO.md`:
- Investigate the cause
- Fix the issue in the code
- If it's a backend bug, confirm the fix using cURL (e.g., `http://localhost:3001/api/...`) (you should login first to get the auth token -- save in cookie, the account is [EMAIL]/[PASSWORD])
- Update backend/frontend code if needed
- Mark the task as completed in `DEV-TODO.md`

🧭 Navigation

⚙️ All Modes - Mode overview and setup
🏠 Main Guide - Framework home
💡 Use Cases - See this mode in action

Other Modes: SQL | QA | Jira | Bug Fix Agent