50 lines
1.2 KiB
Markdown
50 lines
1.2 KiB
Markdown
# Quickstart: Turn Navigation
|
|
|
|
## Prerequisites
|
|
|
|
- Node.js 20+
|
|
- pnpm
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
pnpm install
|
|
```
|
|
|
|
## Development
|
|
|
|
```bash
|
|
pnpm --filter web dev # Start dev server at localhost:5173
|
|
```
|
|
|
|
## Testing
|
|
|
|
```bash
|
|
# Run all tests
|
|
pnpm test
|
|
|
|
# Run only retreat-turn domain tests
|
|
pnpm vitest run packages/domain/src/__tests__/retreat-turn.test.ts
|
|
|
|
# Run tests in watch mode
|
|
pnpm test:watch
|
|
```
|
|
|
|
## Quality Gate
|
|
|
|
```bash
|
|
pnpm check # Must pass before every commit (knip + format + lint + typecheck + test)
|
|
```
|
|
|
|
## Key Files for This Feature
|
|
|
|
| File | Layer | Purpose |
|
|
|------|-------|---------|
|
|
| `packages/domain/src/retreat-turn.ts` | Domain | Pure RetreatTurn function |
|
|
| `packages/domain/src/events.ts` | Domain | TurnRetreated + RoundRetreated event types |
|
|
| `packages/domain/src/__tests__/retreat-turn.test.ts` | Domain | Acceptance scenario tests |
|
|
| `packages/application/src/retreat-turn-use-case.ts` | Application | Use case orchestration |
|
|
| `apps/web/src/components/turn-navigation.tsx` | Adapter | Turn nav UI component |
|
|
| `apps/web/src/components/action-bar.tsx` | Adapter | Remove Next Turn button |
|
|
| `apps/web/src/App.tsx` | Adapter | Wire up new component |
|