Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.52 KB

File metadata and controls

35 lines (24 loc) · 1.52 KB
title Code Style
description Conventions on each side of the repo and the tools that enforce them
audience developer

Wiki HomeContributing

Code Style

Match the code around you — the two apps have different idioms on purpose.

Server (server/)

  • CommonJS JavaScript (require/module.exports) — no build step, runs directly on Node
  • Routers live in routes/, shared logic in utils/; each router exports an express.Router()
  • Comments explain constraints (security guards, ordering requirements), not what the next line does

Client (client/)

  • Module layout follows CLEAR Principles — the /learn track index is the reference implementation
  • TypeScript + function components typed as React.FC<Props>, one folder per component (Component/Component.tsx); pages live in pages/ with a matching route file in routes/
  • Server data goes through TanStack Query hooks, not contexts or effects
  • Linting is oxlint (npm run lint); an .editorconfig covers whitespace basics
  • CSS follows the styling conventions — tokens, BEM-flavored names

Docs (docs/)

Wiki pages follow the house format: YAML front matter, breadcrumb, one concept per page, a Related section — see the wiki home for the template.

Related