deploy-bbc
v1.3.2
Published
CLI to bootstrap production-ready backends with Bun (Best Backend Code)
Maintainers
Readme
deploy-bbc
Overview
deploy-bbc is an interactive command-line tool that scaffolds modern, type-safe backend applications using Bun.
It ships with production-ready defaults, optional integrations, Docker support, and a clean architecture so you can focus on building features instead of wiring infrastructure.
Tech Stack
Features
- ⚡ Three framework options: Hono, Express, or Bun Native HTTP
- 🚀 Production-ready templates with best practices
- 🔌 30+ integrations (databases, auth, AI, cloud, infra)
- 🛡️ Fully type-safe with strict TypeScript
- 🐳 Optional Docker support for databases and/or backend
- 💎 Strong developer experience with testing and docs
- ⚙️ Zero-config defaults that work out of the box
Quick Start
npx deploy-bbc my-backend
# or
bunx deploy-bbc my-backendFramework Options
- Hono (default) – lightweight and edge-ready
- Express – battle-tested Node.js framework
- Bun Native HTTP – minimal overhead, maximum performance
Databases and Caching
- PostgreSQL with native postgres driver
- MySQL with mysql2 driver (Bun-optimized)
- SQLite with bun:sqlite (built-in, zero dependencies)
- MongoDB with Mongoose
- Redis for caching and queues
Authentication
- JWT authentication
- OAuth 2.0 providers
- Session-based authentication
AI Integrations
- OpenAI
- Anthropic Claude
- Google Gemini
- Vercel AI SDK
Cloud and Storage
- AWS (S3, SES)
- Google Cloud Platform
- Azure
- Cloudflare R2
Communication and Realtime
- Resend
- SendGrid
- Nodemailer
- Socket.IO
- Server-Sent Events (SSE)
Developer Experience
- Vitest
- Zod and Yup
- Swagger / OpenAPI
- Scalar documentation
Project Structure
src/
├── config/
├── middleware/
├── routes/
├── services/
├── db/
├── utils/
├── types/
└── index.tsDocker Support
The CLI provides flexible Docker configuration options:
Options
During setup, you'll be asked:
Dockerize databases? - Generates docker-compose services for:
- PostgreSQL
- MySQL
- MongoDB
- Redis
Dockerize the backend? - Creates:
- Multi-stage Dockerfile optimized for Bun
- App service in docker-compose.yml
Usage
When you enable Docker during setup, a convenient docker:dev script is automatically added to your package.json.
Quick Start
# Start all Docker services (databases and/or backend)
bun run docker:devThis script runs docker-compose up, starting all services defined in your docker-compose.yml.
Manual Control
You can also use docker-compose directly for more control:
# Start only specific services (e.g., databases only)
docker-compose up postgres redis -d
# Run your app locally
bun run dev# Start everything in detached mode
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose downSQLite with Docker
When using SQLite with a dockerized backend, your database file is automatically mounted as a volume to persist data between container restarts.
CLI Flags
You can also use CLI flags for non-interactive setup:
npx deploy-bbc my-api --dockerizeDb --dockerizeBackendContributors
A big thank you to all the contributors who have helped make this project better! 🙏
Author
Aritra Sarkar
- GitHub: https://github.com/aritra69
- Email: [email protected]
License
MIT License
Support
If this project helps you, consider ⭐ starring the repository.
Issues, pull requests, and discussions are welcome!
