Requires kebab-case filenames for modules under app/src/domain. Use when adding, renaming, or importing files in app/src/domain, or when a PR touches domain layout or @domain/* path aliases.
Extracts multi-step business rules from Express handlers into app/src/domain/<area>/ modules: DomainFailure + typed API error codes (no HTTP), success metadata only, reload/events at transports. Use when adding or refactoring domain functions (e.g. placeBet),…
Prefer Zod for runtime validation of env vars, HTTP inputs, and parsed external data. Instructs checking the installed library version (e.g. Zod 3 vs 4) and matching official docs and examples to that version so APIs are not outdated or deprecated. Covers…
NDB2 web rendering with @kitajs/html: PascalCase Kitajs components, kebab-case component files in one folder per component (name/name.tsx, name.css, name.test.tsx, index.ts), feature folders (page.tsx, handler.tsx, tests/), HTMX. Query parsing uses…
Describes how to add Express routes under app/src/api/v2: validate middleware with Zod, shared @shared/validation (domain + http), server errors via the v2 errorHandler, responseUtils for JSON bodies, colocated supertest suites, extracting domain operations…
NDB2 web visual design: futuristic terminal / HUD, glassy screen-overlay feel, space-named colour palettes (Neptune, Aurora, etc.), how light/dark and accent schemes combine, and semantic tokens. Use when choosing colours, describing look and feel, or styling…
Canonical ndb2 viewport tiers: narrow base, breakpoint.mobile (36rem), tablet, desktop, wide — rem cut `min-width` @media patterns, and how they relate to shell/nav layout. Use when writing or reviewing responsive CSS, choosing min-width queries, or…
PostgreSQL triggers and functions that maintain derived columns on predictions, bets, and seasons. Use when writing migrations, editing db/schema-affecting SQL, or changing INSERT/UPDATE paths that touch wager, status, ratios, payouts, season_id,…