diff --git a/README.md b/README.md index 0983b48..f02e2c0 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ RPC endpoint: `/api/rpc` · OpenAPI docs: `/api/docs` · Spec: `/api/spec.json` | `bun run compile` | Single-binary `out/server-` via `bun build --compile` | | `bun run cli ` | Run a CLI subcommand in source (`serve`, `migrate`) | | `bun run typecheck` | `tsc --noEmit` | +| `bun run test` | `bun test` (colocated `*.test.ts`) | | `bun run fix` | Biome lint + format + organize imports | | `bun run db:push` | Dev-only schema sync (no migration files) | | `bun run db:generate` | Write SQL migrations to `./drizzle` | @@ -42,8 +43,9 @@ Contract-first, additive. Create or touch files in this order: 4. `src/server/api/contracts/index.ts` — add `post` to the `contract` object. 5. `src/server/api/routers/post.router.ts` — implement `os.post.*.handler(...)`. 6. `src/server/api/routers/index.ts` — add `post` to the `router` object. -7. `src/routes/.tsx` — UI with `useSuspenseQuery` + loader `ensureQueryData`; invalidate affected list queries in mutation `onSuccess` handlers. -8. `bun run db:generate` — emit SQL migrations to `./drizzle`. +7. `src/client/queries/post.ts` — export `useInvalidatePosts` (or finer-grained helpers) for affected list keys. +8. `src/routes/.tsx` — UI with `useSuspenseQuery` + loader `ensureQueryData`; call the helper from mutation `onSuccess`. +9. `bun run db:generate` — emit SQL migrations to `./drizzle`. ## Deploy