<stack_definitions> Language: [e.g., TypeScript 5.x] Frameworks: [e.g., React 18 (Server Components only), Fastify 4.x] </stack_definitions>
<syntax_invariants>
- TYPE SAFETY:
anyis strictly forbidden.unknownis permitted only when followed by a type-narrowing validation guard. - MODULES: ESM (
import/export) is strictly required. CommonJS (require) is a violation. - ASYNC: Use
async/awaitstrictly..then().catch()chains are forbidden for readability. - NULLABILITY: Strict null checks MUST be enabled. Handle
undefinedandnullexplicitly at the IO boundary. </syntax_invariants>
- Frontend: React / Next.js
- Backend: Node.js / Express (or framework specific to your org)
- Database: PostgreSQL
- State Management: Use robust solutions like Zustand or React Context; avoid unnecessary Redux boilerplate.
- Styling: TailwindCSS is preferred for rapid, consistent UI development.
- Always use the latest LTS (Long Term Support) node version.
- Pin dependencies in
package.jsonto avoid unexpected breaking changes during CI/CD.
- Avoid adding experimental beta frameworks to production data paths.