# Frontend

## SolidJS

- Signals for local state
- Stores for complex / shared state
- createResource for data fetching
- Don't mix signals with stores unnecessarily

## Next.js

- Prefer the App Router
- Server Components by default
- "use client" only when necessary
- Use next/image for assets

## Components

- Type props explicitly
- Avoid excessive prop drilling
- Composition over inheritance

## Styling

- Prefer Tailwind CSS
- Don't mix strategies (Tailwind + inline styles)
- CSS Modules as an alternative

## Logging

- No console.log in production
- Use a logger that disables itself in prod

## Health endpoint

SolidJS: public/health.json generated at build time (Vite plugin)
Next.js: /api/health route reading package.json
