Development Workflow
Develop with tests
Write failing tests first, then implement until they pass. Run unit tests during development for fast feedback:
Verify everything passes
Before committing, run the full CI gate:This runs format check, typecheck, unit tests, and integration tests sequentially.
Branch Naming
All branches follow atype/kebab-case-description pattern:
| Prefix | Use for |
|---|---|
feat/ | New features |
fix/ | Bug fixes |
chore/ | Maintenance, dependency updates, config changes |
refactor/ | Code restructuring without behavior changes |
feat/media-upload-drag-drop, fix/reference-resolution-null, chore/bump-elysia.
Commit Conventions
Commits follow the conventional commits format:| Type | Use for |
|---|---|
feat | New feature |
fix | Bug fix |
chore | Maintenance task |
refactor | Code restructuring |
docs | Documentation changes |
test | Test additions or modifications |
server, studio, cli, shared, sdk, modules).
Rules:
- First line only — no body, no footer
- Keep the message concise and descriptive
- Use imperative mood (“add feature” not “added feature”)
Code Conventions
TypeScript
- Strict mode is enabled across all packages
- Prefer type inference when types are obvious from context
- Use explicit types for function parameters and return values at module boundaries
Formatting
Prettier handles all formatting. Run it before committing:Naming
| Entity | Convention | Example |
|---|---|---|
| Files | kebab-case | content-api.ts |
| Types / Interfaces | PascalCase | ContentDocument |
| Functions / Variables | camelCase | getDocument |
| Constants | SCREAMING_SNAKE_CASE | MAX_LIMIT |
- No abbreviations except widely known ones (
id,url,ctx) - Self-documenting names — comments explain “why”, not “what”
General Principles
- DRY — Extract repeated values to constants, repeated logic to functions
- No unrelated changes — Keep PRs focused on a single concern
- No debug artifacts — Never commit
console.log, debugger statements, or test artifacts
PR Process
CI runs automatically
GitHub Actions runs the full CI pipeline on every PR. All required checks must pass before merge.
Address review feedback
Make changes in new commits (do not force-push during review). Keep the conversation going until the reviewer approves.
Pre-push Gate
A git pre-push hook is installed automatically when you runbun install. It executes:
- Format check — Verifies code matches Prettier formatting
- Typecheck — Runs TypeScript compiler across all packages
- Unit tests — Runs all unit tests
- Integration tests — Runs integration tests (requires Docker services running)