GuidesDevelopers
Code style
Surplus conventions are documented in the repository’s docs/conventions.md and enforced with Biome (@biomejs/biome) at the root.
Highlights
- Bun only — no npm / Node runtime requirement for app code; TypeScript runs under Bun.
- Type aliases, not interfaces — except when extending third-party types.
- No
any— prefer inference and precise Zod schemas from@surplus/types. - camelCase — tables, columns, files, CSS variables, and DOM element IDs (interactive elements use structured IDs such as
{route}{section}{control}). - Semantic design tokens in the client —
bg-background,text-foreground, etc., not legacy palette class names. - ORPC for all client ↔ server calls; forms and mutations follow TanStack patterns described in
docs/architecture.md.
Commands
# Write fixes where safe
bun run lint
# Typecheck all @surplus/* workspaces
bun run typecheckFor UI primitives and form patterns, see docs/conventions.md (SelectCombobox vs SearchSelect, buttons with icons, and so on).