| title | Code Style |
|---|---|
| description | Conventions on each side of the repo and the tools that enforce them |
| audience | developer |
Match the code around you — the two apps have different idioms on purpose.
- CommonJS JavaScript (
require/module.exports) — no build step, runs directly on Node - Routers live in
routes/, shared logic inutils/; each router exports anexpress.Router() - Comments explain constraints (security guards, ordering requirements), not what the next line does
- Module layout follows CLEAR Principles — the
/learntrack index is the reference implementation - TypeScript + function components typed as
React.FC<Props>, one folder per component (Component/Component.tsx); pages live inpages/with a matching route file inroutes/ - Server data goes through TanStack Query hooks, not contexts or effects
- Linting is oxlint (
npm run lint); an.editorconfigcovers whitespace basics - CSS follows the styling conventions — tokens, BEM-flavored names
Wiki pages follow the house format: YAML front matter, breadcrumb, one concept per page, a Related section — see the wiki home for the template.