Universal context file for AI coding assistants. See also: CLAUDE.md for Claude-specific context.
hushletter is a
- License: MIT (open-source)
- Monorepo: Turborepo + bun workspaces
- Language: TypeScript (strict mode)
- Framework: Tanstack start with convex
| Layer | Technology |
|---|---|
| Monorepo | Turborepo + bun workspaces |
| Runtime | Node.js, React 19 |
| Language | TypeScript 5 |
| Database | Convex |
| Auth | Convex + better-auth |
| API | Convex + TanStack query |
| Data Fetching | TanStack Query |
| Validation | Zod |
| UI | Tailwind CSS 4, shadcn/ui, Base ui |
| Forms | Tanstack Form |
| Payments | Stripe |
| React Email, Resend | |
| @react-pdf/renderer |
- Never rely on React Query
enabled:to “turn off” Convex. If a query must be conditional, pass Convex args as"skip":convexQuery(fn, condition ? args : "skip"). Otherwise the query can still get cached and subscribed. - Prefer “reactive head + non-reactive tail” pagination for long lists: subscribe to only the newest page via a query (head), and fetch older pages via actions (tail) for infinite scroll / “Load more”.
- Keep list query payloads lightweight (metadata only). Avoid returning large optional fields (e.g. full summaries or content) in list endpoints.
- Avoid high-frequency writes to hot list documents. If the UI needs continuous updates (ex: scroll progress), write to a separate table and only patch the main doc for coarse state transitions (ex:
isReadat 100%). - Prefer selective indexes and avoid “collect everything then filter in JS” for user lists. Keep dependency sets small so reactive queries don’t re-run unnecessarily.
- Use Convex logs + hour aggregation to find the top bandwidth consumers:
bunx convex logs --success --jsonl --history 20000 | node scripts/convex-bandwidth.mjs --utc
This project uses Turborepo with bun workspaces for monorepo management.
| Workspace | Package Prefix | Purpose |
|---|---|---|
apps/* |
@hushletter/ |
Deployable applications |
packages/* |
@hushletter/ |
Shared libraries and configs |
- look at the details at docs/FORM_HANDLING.md