| name | fivfold-api |
| description | FivFold API scaffolding conventions for Express/NestJS backends. Use when working with FivFold API modules (Email, Kanban, Push, Chat), Hexagonal architecture, ORM patterns (TypeORM, Prisma, Mongoose), or backend scaffolding. |
| license | MIT |
| metadata | {"author":"Fivex Labs","version":"1.0.0"} |
FivFold API
Conventions for FivFold API modules and backend scaffolding.
When to Apply
- Scaffolding or modifying FivFold API modules (Email, Kanban, Push, Chat)
- Implementing Hexagonal (Ports & Adapters) architecture
- Working with ORM patterns (TypeORM, Prisma, Mongoose, Cosmos SDK, DynamoDB SDK)
Hexagonal Layout
Generated code follows this structure:
- Domain (Ports): Framework-agnostic interfaces (e.g.
IEmailService, IChatService)
- Infrastructure (Adapters): Implementations using vendor SDKs (e.g.
TypeOrmEmailAdapter, MongooseChatAdapter)
- Delivery: HTTP transport (Express routes or NestJS controllers) isolated from core logic
Key Rules
- Never mix ORM-specific code in framework layer — ORM deps belong in the
orm manifest layer only
- Auth provider is independent of database — Firebase Auth can pair with PostgreSQL, MongoDB, etc.
- Manifest-driven — All module definitions come from manifests; no hardcoded stack permutations
Adding API Modules
npx @fivfold/api init
npx @fivfold/api add email
npx @fivfold/api add kanban
npx @fivfold/api add push
npx @fivfold/api add chat
Supported Stack
| Framework | ORMs | Databases |
|---|
| Express, NestJS | TypeORM, Prisma, Mongoose, Cosmos SDK, DynamoDB SDK | PostgreSQL, MySQL, MS-SQL, MariaDB, MongoDB, Azure Cosmos DB, AWS DynamoDB |