A Forge profile is a complete description of a technology stack. It tells Forge how your project is wired: which framework handles HTTP, which database and ORM manage persistence, and which dependency injection pattern connects them. Every Forge command —Documentation 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.
cast, temper, inspect, quench — consults the active profile to generate framework-appropriate scaffolding, validate the correct DI annotations, and apply the right naming conventions. Profiles eliminate guesswork: once Forge detects your stack, it operates as a specialist for that stack rather than a generic scaffolder.
Available Profiles
| Profile | Framework | Database | ORM | DI Strategy |
|---|---|---|---|---|
express-mongodb | Express | MongoDB | Mongoose | tsyringe |
express-postgres | Express | PostgreSQL | raw pg | Manual |
express-prisma | Express | PostgreSQL | Prisma | tsyringe |
express-drizzle | Express | PostgreSQL | Drizzle | tsyringe |
fastify-mongodb | Fastify | MongoDB | Mongoose | Manual |
fastify-postgres | Fastify | PostgreSQL | Prisma | Manual |
fastify-prisma | Fastify | PostgreSQL | Prisma | Manual |
nestjs-mongodb | NestJS | MongoDB | Mongoose | NestJS DI |
nestjs-postgres | NestJS | PostgreSQL | Prisma | NestJS DI |
nestjs-prisma | NestJS | PostgreSQL | Prisma | NestJS DI |
What a Profile Defines
Each profile is a markdown specification file that covers six dimensions of your stack:Directory structure
How
platform/, features/, shared/, and infra/ are organized, including where the ORM client lives (e.g., src/infrastructure/prisma.ts for Prisma profiles, src/infra/mongodb/ for Mongoose profiles).DI setup
Which DI mechanism to use: tsyringe tokens and
container.register() calls in a per-feature di.ts, NestJS @Module providers, or explicit manual constructor wiring in a routes file.Routing pattern
How HTTP routing is structured: Express
Router, Fastify plugin functions, or NestJS @Controller + @Module declarations.Persistence setup
The exact patterns for Mongoose models (
model() + schema), Prisma client singleton, raw pg Pool, or Drizzle schema — including transaction patterns and repository skeletons.Testing strategy
How to test domain logic and repositories:
describe/it with manual mocks for Express profiles, NestJS Test.createTestingModule() for NestJS profiles, and how to handle test databases (Prisma test DB, MongoMemoryServer).Profile Detection
Forge auto-detects the active profile by inspecting the project. You do not need to configure it manually:Read package.json dependencies
Forge scans
dependencies and devDependencies for framework identifiers: express, fastify, @nestjs/core.Identify the ORM / database layer
Checks for the presence of
prisma, @prisma/client, mongoose, drizzle-orm, or pg in dependencies. Also looks for a prisma/schema.prisma file and Mongoose model files.Match against the 10 known profiles
Combines framework + ORM signals to select the best-fit profile. NestJS always uses NestJS DI regardless of ORM.
Profile detection runs as part of the mandatory boot sequence (
profile.mjs --extended). You can re-run it at any time with node .opencode/skills/forge/scripts/profile.mjs --extended to see which profile is active and why.Using the Profile
Once Forge detects your profile, it influences every command in the session:cast — Feature scaffolding
cast — Feature scaffolding
cast generates all feature artifacts (entity, repository interface, use case, controller, routes, schema) using the profile’s templates. For a nestjs-mongodb profile, the generated controller uses @Injectable() from @nestjs/common; for express-prisma, it uses @injectable() from tsyringe.temper — DI hardening
temper — DI hardening
temper applies the DI pattern prescribed by the profile. For tsyringe profiles it adds @injectable() and @inject(TOKEN) decorators to use cases, controllers, and repositories. For NestJS profiles it ensures @Injectable() is present. For manual profiles it wires constructors in the routes file.inspect — Architectural audit
inspect — Architectural audit
The Decorators category (20 pts) in
inspect validates that the correct DI annotations are present per the profile. An express-prisma project is checked for tsyringe decorators; a nestjs-prisma project is checked for NestJS @Injectable().quench — Rule validation
quench — Rule validation
Import convention rules (R10-R12) and layer dependency rules (R1-R9) apply universally across all profiles. Profile-specific rules (e.g., R12b: no
registerSingleton with Mongoose model()) are activated only when the relevant profile is detected.