antstack-js
v1.0.1
Published
A production-ready backend boilerplate generator inspired by ShadCN.
Downloads
180
Maintainers
Readme
antstack-js
✨ 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 antstack-js add auth📦 Route Generator
Generate complete CRUD routes with controller, service, and repository:
npx antstack-js generate route products🏗️ Clean Architecture
- Service-Controller-Repository pattern
- Manual dependency injection
- TypeScript-first with strict mode
- Ready for production
📦 Installation
# Interactive wizard
npx antstack-js@latest my-api
# Or with flags
npx antstack-js@latest my-api --framework express --database postgresql --orm prisma🚀 Quick Start
1. Create a new project
npx antstack-js@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 dev📖 Commands
| Command | Description |
|---------|-------------|
| npx antstack-js [name] | Create new project (interactive) |
| npx antstack-js [name] --framework <f> --database <d> --orm <o> | Create with flags |
| npx antstack-js add auth | Add JWT authentication |
| npx antstack-js generate route <name> | Generate CRUD route |
| npx antstack-js g route <name> | Short alias for generate |
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.json🌐 Web Builder
Use our Visual Builder to configure your stack and generate the CLI command!
📚 Documentation
Visit antstack-js.vercel.app/docs for full documentation.
🤝 Contributing
Contributions are welcome! Please read our Contributing Guide for details.
📄 License
MIT © antstack-js
💖 Support
If you find this project helpful, please consider giving it a ⭐ on GitHub!
