Project Conventions
Auto-generated by architect-indexer. DO NOT edit manually.
Naming Conventions
| Element |
Pattern |
Example |
| Files |
pending |
pending |
| Variables |
pending |
pending |
| Classes |
pending |
pending |
| Functions |
pending |
pending |
| Constants |
pending |
pending |
| Database tables |
pending |
pending |
| API endpoints |
pending |
pending |
This section is populated after the first index run.
Code Patterns
| Pattern |
When to Use |
Example File |
| Repository |
Data access |
pending |
| Service |
Business logic |
pending |
| Controller |
HTTP handling (thin) |
pending |
| Event |
Cross-module communication |
pending |
| Value Object |
Immutable type |
pending |
Architectural Patterns
- Service Layer — Business logic in services, not controllers
- Repository Pattern — Data access abstracted behind interfaces
- Thin Controllers — Controllers delegate to services, max 10 lines per method
- Event-Driven — Cross-module via events, never direct model imports
Maximum Sizes
| Element |
Max |
Enforcement |
| File |
100 lines |
Architect check |
| Function |
30 lines |
Lint rule |
| Class methods |
5 public |
Code review |
| Controller method |
10 lines |
Code review |
Forbidden Practices
- ❌ Direct model imports from other modules
- ❌ Business logic in controllers
- ❌ Raw SQL queries outside repositories
- ❌ Hardcoded secrets or credentials
- ❌ Mutable global state
- ❌ Catching exceptions silently
Testing Conventions
| Type |
Location |
Naming |
| Unit |
pending |
{name}.test.{ext} |
| Integration |
pending |
{name}.integration.test.{ext} |
| E2E |
pending |
{name}.e2e.test.{ext} |
Git Conventions
| Convention |
Pattern |
| Branch naming |
feature/{issue}-{slug} |
| Commit prefix |
feat:, fix:, refactor:, test:, docs: |
| PR naming |
#{issue}: brief description |