kodkod-stack
v1.2.0
Published
Small CLI. Big backends. Production-ready backend boilerplate generator.
Maintainers
Readme
kodkod
Features
Quick Scaffolding
Generate a complete backend project in seconds with an interactive wizard or CLI flags.
Multiple Frameworks
- Express - Classic, flexible, battle-tested
- Hono - Ultrafast, modern, edge-ready
- Fastify - Performance-focused with built-in validation
Multiple ORMs
- Prisma - Type-safe, auto-generated client
- Drizzle - Lightweight, SQL-like
- Mongoose - MongoDB-native ODM
Multiple Databases
- PostgreSQL - Robust relational database
- MySQL - Popular relational database
- MongoDB - Flexible document database
Auth Module
Add JWT-based authentication with a single command:
npx kodkod-stack add authRoute Generator
Generate complete CRUD routes with controller, service, and repository:
npx kodkod-stack generate route productsTesting Module
Add Vitest-based integration testing support:
npx kodkod-stack add testClean Architecture
- Service-Controller-Repository pattern
- Manual dependency injection
- TypeScript-first with strict mode
- Ready for production
Testing and Stability
The CLI undergoes rigorous automated testing to ensure the stability of generated projects.
- Comprehensive Test Suite: Every combination of framework, database, and ORM is automatically verified.
- Deep Verification: Our CI pipeline automatically installs dependencies, builds the generated code, and runs integration tests for all framework types.
- CI/CD Driven: Every contribution is verified via GitHub Actions to maintain the highest quality standards.
Installation
# Interactive wizard
npx kodkod-stack@latest my-api
# Or with flags
npx kodkod-stack@latest my-api --framework express --database postgresql --orm prismaQuick Start
1. Create a new project
npx kodkod-stack@latest my-api2. Install dependencies
cd my-api
npm install3. Configure your database
cp .env.example .env
# Edit .env with your database credentials4. Run migrations
# Prisma
npx prisma migrate dev
# Drizzle
npx drizzle-kit push5. Start the server
npm run devCommands
| Command | Description |
|---------|-------------|
| npx kodkod-stack [name] | Create new project (interactive) |
| npx kodkod-stack [name] --framework <f> --database <d> --orm <o> | Create with flags |
| npx kodkod-stack add auth | Add JWT authentication |
| npx kodkod-stack add test | Add Vitest integration tests |
| npx kodkod-stack add swagger | Add Swagger/OpenAPI documentation |
| npx kodkod-stack generate route <name> | Generate CRUD route |
Flags
| Flag | Values |
|------|--------|
| --framework | express, hono, fastify |
| --database | postgresql, mysql, mongodb |
| --orm | prisma, drizzle, mongoose |
Project Structure
my-api/
├── src/
│ ├── controllers/ # HTTP request handlers
│ ├── services/ # Business logic
│ ├── repositories/ # Data access layer
│ ├── routes/ # Route definitions
│ ├── middleware/ # Custom middleware
│ ├── config/ # Configuration files
│ ├── db/ # Database client
│ └── index.ts # Entry point
├── prisma/ or drizzle/ # ORM configuration
├── .env.example # Environment template
├── package.json
└── tsconfig.jsonWeb Builder
Use our Visual Builder to configure your stack and generate the CLI command!
Documentation
Visit kodkodstack.vercel.app/docs for full documentation.
Contributing
Contributions are welcome! Please read our Contributing Guide for details.
License
MIT © kodkod
Support
If you find this project helpful, please consider giving it a star on GitHub!
