_ _
___ _ __ ___ __ _| |_ ___ ___| | ___ __ _ _ __
/ __| '__/ _ \/ _` | __/ _ \_____ / __| |/ _ \/ _` | '_ \
| (__| | | __/ (_| | || __/_____| (__| | __/ (_| | | | |
\___|_| \___|\__,_|\__\___| \___|_|\___|\__,_|_| |_|
Scaffold MCP servers and microservices with Clean Architecture
Every new project started the same way:
- Create folder structure (domain, application, infrastructure)
- Copy configs from last project (tsconfig, Dockerfile, docker-compose)
- Set up CI/CD workflow
- Initialize Git Flow branches
- Fix the things I forgot to copy
I automated all of it. Now I scaffold production-ready projects in seconds.
┌ create-clean-app
│
◇ What do you want to create?
│ ● MCP Server
│ ○ Microservice / API
│
◇ Select your stack:
│ ● Go
│ ○ NestJS
│
◇ Project name:
│ my-mcp-server
│
◇ Description:
│ GitHub repository monitor
│
◇ Select features:
│ ◉ Git Flow (main + develop branches)
│ ◉ Docker (Dockerfile + docker-compose)
│ ◉ GitHub Actions (CI/CD workflow)
│
└ ✔ Project created successfully!
# Run directly
npx @cjarero183006/create-clean-app
# Or with bun
bunx @cjarero183006/create-clean-app
# Or install globally
npm install -g @cjarero183006/create-clean-app
create-clean-appAnswer 5 questions. Get a complete project.
| Stack | What you get |
|---|---|
| Go | mcp-go SDK, stdio transport, Clean Architecture layers, Makefile |
| NestJS | @modelcontextprotocol/sdk, decorators, dependency injection, TypeScript |
| Stack | What you get |
|---|---|
| Go | Chi router, REST endpoints, Clean Architecture, health checks |
| NestJS | Full NestJS setup, controllers, services, DTOs, validation |
Every template generates a production-ready structure:
my-project/
├── domain/ # Entities & business rules
├── application/ # Use cases & ports
├── infrastructure/ # HTTP, MCP, DB adapters
├── Dockerfile # Multi-stage build
├── docker-compose.yml # Local development
├── Makefile # build, run, test, lint
├── .github/workflows/ # CI pipeline
└── README.md # Project docs
| Feature | What it adds |
|---|---|
| Git Flow | Initializes repo with main and develop branches |
| Docker | Multi-stage Dockerfile, docker-compose.yml with volumes |
| GitHub Actions | CI workflow with lint, test, build steps |
All templates follow Clean Architecture. Dependencies point inward.
┌─────────────────────────────────────────┐
│ Domain │
│ (Entities, Business Rules) │
│ No external dependencies │
├─────────────────────────────────────────┤
│ Application │
│ (Use Cases, Ports) │
│ Orchestrates domain logic │
├─────────────────────────────────────────┤
│ Infrastructure │
│ (HTTP, MCP, DB, External) │
│ Implements ports (adapters) │
└─────────────────────────────────────────┘
| Aspect | Choice |
|---|---|
| Architecture | Clean Architecture / Hexagonal |
| Testing | Vitest (40 passing) |
| Build | tsup (ESM) |
| CLI UI | @clack/prompts via cli-builder |
git clone https://github.com/jarero321/create-clean-app.git
cd create-clean-app
bun install
bun run dev| Script | What it does |
|---|---|
bun run dev |
Run CLI in development mode |
bun test |
Watch mode |
bun run test:run |
Single run |
bun run test:coverage |
Coverage report |
bun run build |
Production build |
MIT