Documentation comes from this release commit, without inheriting newer content. Commit: 371ee4692c.
Recipe — Adding a new feature
A short, opinionated playbook for adding a brand-new domain to the app. No feature in the repo currently ships the full api → mappers → queries → store → screens stack (the former reference, features/tracks, kept only its types.ts and ephemeral store.ts), so the layering below and data-fetching.md are the reference.
Decision tree
Step-by-step
1. Scaffold the folder
Naming: kebab-case folder, PascalCase screens/components.
2. Define types first
In types.ts:
Snake_case for DTO, camelCase for domain. Always two distinct interfaces.
3. Write the api + mapper
4. Wrap them in queries
5. Add client state (if needed)
Only if the screen has filters, selected items, or other UI state that should outlive a single component:
Persist only if a returning user should see the value (rare for UI filters; common for tutorials, user prefs).
6. Build the screen
7. Wire the route
If it's a tab, also add it to (tabs)/_layout.tsx. If it's a detail under another tab, add app/(app)/things/[id].tsx.
Checklist before merging
- Feature-scoped tests pass:
bun test src/features/<name>(orcd packages/<pkg> && bun testfor package work). - Global suite passes:
bun run test(packages + app shards in parallel),bun run typecheck(tsc --noEmit),bun run lint(biome check) — all three required. Requires Bun ≥ 1.3.13. - No hardcoded colors — use
theme.colors.*. - No
useEffect+useStateto fetch — useuseQuery. - No imports of other features'
screens/orcomponents/. - DTO and domain types are separate.
- Mutations invalidate the right query keys.