Consistent naming is not cosmetic in a Forge-governed system — it is functional. TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ronaldjdev/forge/llms.txt
Use this file to discover all available pages before exploring further.
armorer module identifies ownership by scanning file suffixes and directory paths. The inspect audit uses suffixes to detect orphaned components, misplaced domain artifacts, and R13 violations (domain files in platform/). The quench validator checks naming conventions as a dedicated scoring category. If a file is named incorrectly, Forge cannot classify it, and an unclassified file is treated as an orphan in the ownership report. Every name in a Forge project is a machine-readable signal.
File and Directory Naming
| Element | Format | Example |
|---|---|---|
| Directories | kebab-case/ | credit-card/, event-bus/, user-profile/ |
| Files (artifacts) | <PascalCase>.<artifact>.ts | User.entity.ts, CreateUser.uc.ts |
| Interfaces | I<PascalCase>.<artifact>.ts | IUser.repository.ts, IPayment.port.ts |
| Ports (domain) | <Name>.port.ts | PaymentPort.port.ts, EmailPort.port.ts |
| Use cases | <Action>.uc.ts | CreateUser.uc.ts, GetOrder.uc.ts |
| Barrel files | index.ts | Named exports only — no export default |
Class and Function Naming
| Element | Format | Example |
|---|---|---|
| Classes | PascalCase | UserController, DatabaseConfig, LoggerService |
| Functions | camelCase | formatDate, calculateTotal, buildQuery |
| Constants | UPPER_SNAKE_CASE | MAX_RETRIES, DEFAULT_PAGE_SIZE, MAX_RETRY_COUNT |
| Types / pure interfaces | PascalCase | UserPayload, PaginatedResult, OrderStatus |
| Enums | PascalCase | UserRole, OrderStatus, PaymentMethod |
| Variables | camelCase | userService, prismaClient, requestId |
Artifact Suffixes
These suffixes are the vocabulary Forge uses to classify every file in your project. Files without a recognized suffix are flagged as orphans in the ownership report.| Suffix | Artifact Type | Belongs In |
|---|---|---|
.entity.ts | Domain entity | features/<name>/domain/entities/ |
.repository.ts | Repository implementation (concrete) | features/<name>/adapters/out/persistence/ |
.uc.ts | Use case | features/<name>/application/use-cases/ |
.mapper.ts | Domain mapper | features/<name>/application/mappers/ |
.controller.ts | HTTP controller | features/<name>/adapters/in/http/ |
.routes.ts | Route definitions | features/<name>/adapters/in/http/ |
.schema.ts | Database schema | features/<name>/adapters/out/persistence/ |
.error.ts | Domain-specific error | features/<name>/domain/errors/ |
.event.ts | Domain event | features/<name>/domain/events/ |
.service.ts | Platform / infrastructure service | platform/<module>/ or infra/<provider>/ |
.port.ts | Domain port (interface) | features/<name>/domain/repositories/ |
.config.ts | Configuration module | platform/config/ |
The
armorer step in the boot sequence and the inspect command both rely on these suffixes to detect ownership violations. Any file with a .entity.ts, .uc.ts, .mapper.ts, .port.ts, or .repository.ts suffix inside src/platform/ triggers R13 CRITICAL regardless of its contents. A .uc.ts file outside of a features/ directory is flagged as a misplaced component.Interface and Port Naming
Interfaces for repository ports follow theI<Name>.repository.ts pattern. General domain ports (adapters to external services) use <Name>.port.ts:
Domain Event Naming
Domain events always use past tense to reflect a fact that has already occurred:Feature Structure Example
The following shows a completeusers feature with every file named according to Forge conventions:
Platform Layer Naming
Platform files follow the same<PascalCase>.<artifact>.ts pattern but scoped to technical concerns: