# KanzlAI Coding Conventions ## Go (backend/) - Standard library style — prefer stdlib over third-party packages where reasonable - `go vet` and `go test` must pass before committing - Package layout: `cmd/` for entry points, `internal/` for private packages - Error handling: return errors, don't panic. Wrap with context via `fmt.Errorf("operation: %w", err)` - Naming: follow Go conventions (MixedCaps, not snake_case) - No global mutable state ## TypeScript / Next.js (frontend/) - TypeScript strict mode (enabled in tsconfig.json) - App Router (src/app/) — no Pages Router - Use server components by default, `"use client"` only when needed - Tailwind CSS v4 for styling — no CSS modules or styled-components - ESLint must pass before committing - Import aliases: `@/` maps to `src/` - Bun as package manager (not npm/yarn/pnpm) ## General - No secrets in code — use environment variables - Commit messages: `feat:`, `fix:`, `build:`, `refactor:`, `docs:`, `test:`, `chore:`