deploy-bbc 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +345 -0
- package/dist/index.js +16870 -0
- package/dist/templates/base/package.json +20 -0
- package/dist/templates/base/src/routes/index.ts +12 -0
- package/dist/templates/base/src/types/index.ts +2 -0
- package/dist/templates/base-bun-native/package.json +19 -0
- package/dist/templates/base-bun-native/src/index.ts +50 -0
- package/dist/templates/base-bun-native/src/routes/index.ts +21 -0
- package/dist/templates/base-bun-native/src/types/index.ts +2 -0
- package/dist/templates/base-express/package.json +21 -0
- package/dist/templates/base-express/src/routes/index.ts +12 -0
- package/dist/templates/base-express/src/types/index.ts +2 -0
- package/dist/templates/templates/base/.env.example +3 -0
- package/dist/templates/templates/base/README.md +31 -0
- package/dist/templates/templates/base/src/config/index.ts +8 -0
- package/dist/templates/templates/base/src/index.ts +26 -0
- package/dist/templates/templates/base/src/middleware/error.ts +13 -0
- package/dist/templates/templates/base/src/middleware/logger.ts +8 -0
- package/dist/templates/templates/base/src/utils/env.ts +5 -0
- package/dist/templates/templates/base/tsconfig.json +20 -0
- package/dist/templates/templates/base-bun-native/.env.example +3 -0
- package/dist/templates/templates/base-bun-native/README.md +31 -0
- package/dist/templates/templates/base-bun-native/src/config/index.ts +8 -0
- package/dist/templates/templates/base-bun-native/src/middleware/error.ts +20 -0
- package/dist/templates/templates/base-bun-native/src/middleware/logger.ts +6 -0
- package/dist/templates/templates/base-bun-native/src/utils/env.ts +5 -0
- package/dist/templates/templates/base-bun-native/tsconfig.json +20 -0
- package/dist/templates/templates/base-express/.env.example +3 -0
- package/dist/templates/templates/base-express/README.md +31 -0
- package/dist/templates/templates/base-express/src/config/index.ts +8 -0
- package/dist/templates/templates/base-express/src/index.ts +27 -0
- package/dist/templates/templates/base-express/src/middleware/error.ts +15 -0
- package/dist/templates/templates/base-express/src/middleware/logger.ts +12 -0
- package/dist/templates/templates/base-express/src/utils/env.ts +5 -0
- package/dist/templates/templates/base-express/tsconfig.json +20 -0
- package/dist/templates/templates/extras/ai/anthropic/src/services/ai/anthropic.ts +0 -0
- package/dist/templates/templates/extras/ai/gemini/src/services/ai/gemini.ts +0 -0
- package/dist/templates/templates/extras/ai/openai/src/routes/ai/chat.ts +0 -0
- package/dist/templates/templates/extras/ai/openai/src/services/ai/openai.ts +0 -0
- package/dist/templates/templates/extras/ai/vercel-ai/src/routes/ai/generate.ts +0 -0
- package/dist/templates/templates/extras/ai/vercel-ai/src/routes/ai/stream.ts +0 -0
- package/dist/templates/templates/extras/ai/vercel-ai/src/services/ai/index.ts +0 -0
- package/dist/templates/templates/extras/auth/jwt/src/middleware/auth.ts +0 -0
- package/dist/templates/templates/extras/auth/jwt/src/routes/auth.ts +0 -0
- package/dist/templates/templates/extras/auth/jwt/src/utils/jwt.ts +0 -0
- package/dist/templates/templates/extras/auth/oauth/src/config/oauth.ts +0 -0
- package/dist/templates/templates/extras/auth/oauth/src/routes/auth.ts +0 -0
- package/dist/templates/templates/extras/auth/session/src/config/session.ts +0 -0
- package/dist/templates/templates/extras/auth/session/src/middleware/session.ts +0 -0
- package/dist/templates/templates/extras/cloud/aws/src/services/aws/s3.ts +0 -0
- package/dist/templates/templates/extras/cloud/aws/src/services/aws/ses.ts +0 -0
- package/dist/templates/templates/extras/cloud/azure/src/services/azure/blob.ts +0 -0
- package/dist/templates/templates/extras/cloud/cloudflare-r2/src/services/cloudflare/r2.ts +0 -0
- package/dist/templates/templates/extras/cloud/gcp/src/services/gcp/storage.ts +0 -0
- package/dist/templates/templates/extras/database/mongodb/src/db/index.ts +0 -0
- package/dist/templates/templates/extras/database/mongodb/src/db/models/user.model.ts +0 -0
- package/dist/templates/templates/extras/database/mysql/drizzle.config.ts +0 -0
- package/dist/templates/templates/extras/database/postgres/src/db/index.ts +0 -0
- package/dist/templates/templates/extras/database/redis/src/db/redis.ts +0 -0
- package/dist/templates/templates/extras/docs/scalar/src/openapi/index.ts +0 -0
- package/dist/templates/templates/extras/docs/scalar/src/routes/docs.ts +0 -0
- package/dist/templates/templates/extras/docs/swagger/src/openapi/index.ts +0 -0
- package/dist/templates/templates/extras/docs/swagger/src/routes/docs.ts +0 -0
- package/dist/templates/templates/extras/email/nodemailer/src/services/email/nodemailer.ts +0 -0
- package/dist/templates/templates/extras/email/resend/src/services/email/resend.ts +0 -0
- package/dist/templates/templates/extras/email/resend/src/templates/email/welcome.ts +0 -0
- package/dist/templates/templates/extras/email/sendgrid/src/services/email/sendgrid.ts +0 -0
- package/dist/templates/templates/extras/observability/logtail/src/config/logger.ts +0 -0
- package/dist/templates/templates/extras/observability/sentry/src/config/sentry.ts +0 -0
- package/dist/templates/templates/extras/observability/sentry/src/middleware/sentry.ts +0 -0
- package/dist/templates/templates/extras/queue/bullmq/src/queue/index.ts +0 -0
- package/dist/templates/templates/extras/queue/bullmq/src/queue/jobs/email.job.ts +0 -0
- package/dist/templates/templates/extras/queue/bullmq/src/queue/processors/email.processor.ts +0 -0
- package/dist/templates/templates/extras/queue/bullmq/src/routes/queue.ts +0 -0
- package/dist/templates/templates/extras/queue/inngest/src/inngest/client.ts +0 -0
- package/dist/templates/templates/extras/queue/inngest/src/inngest/functions/email.ts +0 -0
- package/dist/templates/templates/extras/queue/inngest/src/routes/inngest.ts +0 -0
- package/dist/templates/templates/extras/realtime/socketio/src/socket/handlers.ts +0 -0
- package/dist/templates/templates/extras/realtime/socketio/src/socket/index.ts +0 -0
- package/dist/templates/templates/extras/realtime/sse/src/routes/sse.ts +0 -0
- package/dist/templates/templates/extras/testing/vitest/src/__tests__/example.test.ts +0 -0
- package/dist/templates/templates/extras/testing/vitest/src/__tests__/setup.ts +0 -0
- package/dist/templates/templates/extras/testing/vitest/vitest.config.ts +0 -0
- package/dist/templates/templates/extras/validation/yup/src/middleware/index.ts +1 -0
- package/dist/templates/templates/extras/validation/yup/src/middleware/validate.ts +83 -0
- package/dist/templates/templates/extras/validation/yup/src/routes/users.ts +132 -0
- package/dist/templates/templates/extras/validation/zod/src/middleware/index.ts +1 -0
- package/dist/templates/templates/extras/validation/zod/src/middleware/validate.ts +80 -0
- package/dist/templates/templates/extras/validation/zod/src/routes/users.ts +128 -0
- package/package.json +43 -9
- package/CLAUDE.md +0 -403
- package/cli/README.md +0 -345
- package/cli/package.json +0 -54
- package/cli/src/cli/index.ts +0 -454
- package/cli/src/helpers/create-project.ts +0 -66
- package/cli/src/helpers/generate-docker-compose.ts +0 -133
- package/cli/src/helpers/generate-dockerfile.ts +0 -45
- package/cli/src/helpers/init-git.ts +0 -33
- package/cli/src/helpers/install-dependencies.ts +0 -28
- package/cli/src/helpers/log-next-steps.ts +0 -87
- package/cli/src/helpers/scaffold-project.ts +0 -88
- package/cli/src/index.ts +0 -18
- package/cli/src/installers/ai.ts +0 -123
- package/cli/src/installers/auth.ts +0 -132
- package/cli/src/installers/base.ts +0 -16
- package/cli/src/installers/cloud.ts +0 -127
- package/cli/src/installers/database.ts +0 -212
- package/cli/src/installers/docs.ts +0 -93
- package/cli/src/installers/email.ts +0 -119
- package/cli/src/installers/env-variables.ts +0 -27
- package/cli/src/installers/index.ts +0 -145
- package/cli/src/installers/observability.ts +0 -103
- package/cli/src/installers/queue.ts +0 -103
- package/cli/src/installers/ratelimit.ts +0 -98
- package/cli/src/installers/realtime.ts +0 -79
- package/cli/src/installers/testing.ts +0 -88
- package/cli/src/installers/validation.ts +0 -85
- package/cli/src/types/index.ts +0 -126
- package/cli/src/utils/add-package-dependency.ts +0 -56
- package/cli/src/utils/dependency-version-map.ts +0 -85
- package/cli/src/utils/logger.ts +0 -19
- package/cli/src/utils/parse-name-and-path.ts +0 -71
- package/cli/src/utils/render-title.ts +0 -11
- package/cli/tsconfig.json +0 -35
- package/test-cli.sh +0 -56
- package/tsconfig.json +0 -15
- /package/{cli/src → dist}/templates/base/.env.example +0 -0
- /package/{cli/src → dist}/templates/base/README.md +0 -0
- /package/{cli/src → dist}/templates/base/src/config/index.ts +0 -0
- /package/{cli/src → dist}/templates/base/src/index.ts +0 -0
- /package/{cli/src → dist}/templates/base/src/middleware/error.ts +0 -0
- /package/{cli/src → dist}/templates/base/src/middleware/logger.ts +0 -0
- /package/{cli/src → dist}/templates/base/src/utils/env.ts +0 -0
- /package/{cli/src → dist}/templates/base/tsconfig.json +0 -0
- /package/{cli/src → dist}/templates/base-bun-native/.env.example +0 -0
- /package/{cli/src → dist}/templates/base-bun-native/README.md +0 -0
- /package/{cli/src → dist}/templates/base-bun-native/src/config/index.ts +0 -0
- /package/{cli/src → dist}/templates/base-bun-native/src/middleware/error.ts +0 -0
- /package/{cli/src → dist}/templates/base-bun-native/src/middleware/logger.ts +0 -0
- /package/{cli/src → dist}/templates/base-bun-native/src/utils/env.ts +0 -0
- /package/{cli/src → dist}/templates/base-bun-native/tsconfig.json +0 -0
- /package/{cli/src → dist}/templates/base-express/.env.example +0 -0
- /package/{cli/src → dist}/templates/base-express/README.md +0 -0
- /package/{cli/src → dist}/templates/base-express/src/config/index.ts +0 -0
- /package/{cli/src → dist}/templates/base-express/src/index.ts +0 -0
- /package/{cli/src → dist}/templates/base-express/src/middleware/error.ts +0 -0
- /package/{cli/src → dist}/templates/base-express/src/middleware/logger.ts +0 -0
- /package/{cli/src → dist}/templates/base-express/src/utils/env.ts +0 -0
- /package/{cli/src → dist}/templates/base-express/tsconfig.json +0 -0
- /package/{cli/src → dist}/templates/extras/ai/anthropic/src/routes/ai/claude.ts +0 -0
- /package/{cli/src → dist}/templates/extras/ai/anthropic/src/services/ai/anthropic.ts +0 -0
- /package/{cli/src → dist}/templates/extras/ai/gemini/src/services/ai/gemini.ts +0 -0
- /package/{cli/src → dist}/templates/extras/ai/openai/src/routes/ai/chat.ts +0 -0
- /package/{cli/src → dist}/templates/extras/ai/openai/src/services/ai/openai.ts +0 -0
- /package/{cli/src → dist}/templates/extras/ai/vercel-ai/src/routes/ai/generate.ts +0 -0
- /package/{cli/src → dist}/templates/extras/ai/vercel-ai/src/routes/ai/stream.ts +0 -0
- /package/{cli/src → dist}/templates/extras/ai/vercel-ai/src/services/ai/index.ts +0 -0
- /package/{cli/src → dist}/templates/extras/auth/jwt/src/middleware/auth.ts +0 -0
- /package/{cli/src → dist}/templates/extras/auth/jwt/src/routes/auth.ts +0 -0
- /package/{cli/src → dist}/templates/extras/auth/jwt/src/utils/jwt.ts +0 -0
- /package/{cli/src → dist}/templates/extras/auth/oauth/src/config/oauth.ts +0 -0
- /package/{cli/src → dist}/templates/extras/auth/oauth/src/routes/auth.ts +0 -0
- /package/{cli/src → dist}/templates/extras/auth/session/src/config/session.ts +0 -0
- /package/{cli/src → dist}/templates/extras/auth/session/src/middleware/session.ts +0 -0
- /package/{cli/src → dist}/templates/extras/cloud/aws/src/services/aws/s3.ts +0 -0
- /package/{cli/src → dist}/templates/extras/cloud/aws/src/services/aws/ses.ts +0 -0
- /package/{cli/src → dist}/templates/extras/cloud/azure/src/services/azure/blob.ts +0 -0
- /package/{cli/src → dist}/templates/extras/cloud/cloudflare-r2/src/services/cloudflare/r2.ts +0 -0
- /package/{cli/src → dist}/templates/extras/cloud/gcp/src/services/gcp/storage.ts +0 -0
- /package/{cli/src → dist}/templates/extras/database/mongodb/src/db/index.ts +0 -0
- /package/{cli/src → dist}/templates/extras/database/mongodb/src/db/models/user.model.ts +0 -0
- /package/{cli/src → dist}/templates/extras/database/mysql/drizzle.config.ts +0 -0
- /package/{cli/src → dist}/templates/extras/database/postgres/src/db/index.ts +0 -0
- /package/{cli/src → dist}/templates/extras/database/redis/src/db/redis.ts +0 -0
- /package/{cli/src → dist}/templates/extras/docs/scalar/src/openapi/index.ts +0 -0
- /package/{cli/src → dist}/templates/extras/docs/scalar/src/routes/docs.ts +0 -0
- /package/{cli/src → dist}/templates/extras/docs/swagger/src/openapi/index.ts +0 -0
- /package/{cli/src → dist}/templates/extras/docs/swagger/src/routes/docs.ts +0 -0
- /package/{cli/src → dist}/templates/extras/email/nodemailer/src/services/email/nodemailer.ts +0 -0
- /package/{cli/src → dist}/templates/extras/email/resend/src/services/email/resend.ts +0 -0
- /package/{cli/src → dist}/templates/extras/email/resend/src/templates/email/welcome.ts +0 -0
- /package/{cli/src → dist}/templates/extras/email/sendgrid/src/services/email/sendgrid.ts +0 -0
- /package/{cli/src → dist}/templates/extras/observability/logtail/src/config/logger.ts +0 -0
- /package/{cli/src → dist}/templates/extras/observability/sentry/src/config/sentry.ts +0 -0
- /package/{cli/src → dist}/templates/extras/observability/sentry/src/middleware/sentry.ts +0 -0
- /package/{cli/src → dist}/templates/extras/queue/bullmq/src/queue/index.ts +0 -0
- /package/{cli/src → dist}/templates/extras/queue/bullmq/src/queue/jobs/email.job.ts +0 -0
- /package/{cli/src → dist}/templates/extras/queue/bullmq/src/queue/processors/email.processor.ts +0 -0
- /package/{cli/src → dist}/templates/extras/queue/bullmq/src/routes/queue.ts +0 -0
- /package/{cli/src → dist}/templates/extras/queue/inngest/src/inngest/client.ts +0 -0
- /package/{cli/src → dist}/templates/extras/queue/inngest/src/inngest/functions/email.ts +0 -0
- /package/{cli/src → dist}/templates/extras/queue/inngest/src/routes/inngest.ts +0 -0
- /package/{cli/src → dist}/templates/extras/realtime/socketio/src/socket/handlers.ts +0 -0
- /package/{cli/src → dist}/templates/extras/realtime/socketio/src/socket/index.ts +0 -0
- /package/{cli/src → dist}/templates/extras/realtime/sse/src/routes/sse.ts +0 -0
- /package/{cli/src → dist}/templates/extras/testing/vitest/src/__tests__/example.test.ts +0 -0
- /package/{cli/src → dist}/templates/extras/testing/vitest/src/__tests__/setup.ts +0 -0
- /package/{cli/src → dist}/templates/extras/testing/vitest/vitest.config.ts +0 -0
- /package/{cli/src → dist}/templates/extras/validation/yup/src/middleware/index.ts +0 -0
- /package/{cli/src → dist}/templates/extras/validation/yup/src/middleware/validate.ts +0 -0
- /package/{cli/src → dist}/templates/extras/validation/yup/src/routes/users.ts +0 -0
- /package/{cli/src → dist}/templates/extras/validation/zod/src/middleware/index.ts +0 -0
- /package/{cli/src → dist}/templates/extras/validation/zod/src/middleware/validate.ts +0 -0
- /package/{cli/src → dist}/templates/extras/validation/zod/src/routes/users.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base/package.json +0 -0
- /package/{cli/src → dist/templates}/templates/base/src/controllers/user/create-user.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base/src/controllers/user/delete-user.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base/src/controllers/user/get-user.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base/src/controllers/user/get-users.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base/src/controllers/user/update-user.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base/src/models/user.model.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base/src/routes/index.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base/src/routes/user.route.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base/src/types/common/api-response.types.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base/src/types/index.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base/src/types/models/user.types.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-bun-native/package.json +0 -0
- /package/{cli/src → dist/templates}/templates/base-bun-native/src/controllers/user/create-user.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-bun-native/src/controllers/user/delete-user.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-bun-native/src/controllers/user/get-user.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-bun-native/src/controllers/user/get-users.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-bun-native/src/controllers/user/update-user.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-bun-native/src/index.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-bun-native/src/models/user.model.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-bun-native/src/routes/index.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-bun-native/src/routes/user.route.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-bun-native/src/types/common/api-response.types.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-bun-native/src/types/index.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-bun-native/src/types/models/user.types.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-express/package.json +0 -0
- /package/{cli/src → dist/templates}/templates/base-express/src/controllers/user/create-user.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-express/src/controllers/user/delete-user.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-express/src/controllers/user/get-user.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-express/src/controllers/user/get-users.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-express/src/controllers/user/update-user.controller.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-express/src/models/user.model.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-express/src/routes/index.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-express/src/routes/user.route.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-express/src/types/common/api-response.types.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-express/src/types/index.ts +0 -0
- /package/{cli/src → dist/templates}/templates/base-express/src/types/models/user.types.ts +0 -0
- /package/{prettier.config.mjs → dist/templates/templates/extras/ai/anthropic/src/routes/ai/claude.ts} +0 -0
package/README.md
CHANGED
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
# 🚀 deploy-bbc (Best Backend Code)
|
|
2
|
+
|
|
3
|
+
Bootstrap production-ready backend projects with Bun, TypeScript, and Docker in seconds.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/deploy-bbc)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
## ✨ Features
|
|
9
|
+
|
|
10
|
+
- 🎯 **Interactive CLI** - Step-by-step project setup with beautiful prompts
|
|
11
|
+
- ⚡ **3 Framework Options** - Choose between Hono, Express, or Bun Native
|
|
12
|
+
- 🗄️ **Multiple Databases** - PostgreSQL, MySQL, MongoDB, Redis with Drizzle ORM/Mongoose
|
|
13
|
+
- 🔐 **Authentication** - JWT, OAuth 2.0, Session-based auth
|
|
14
|
+
- 🤖 **AI Integration** - OpenAI, Anthropic Claude, Google Gemini, Vercel AI SDK
|
|
15
|
+
- ☁️ **Cloud Storage** - AWS S3, Google Cloud, Azure, Cloudflare R2
|
|
16
|
+
- 📧 **Email Services** - Resend, SendGrid, NodeMailer
|
|
17
|
+
- 🔄 **Real-time** - Socket.io, Server-Sent Events
|
|
18
|
+
- 📝 **Validation** - Zod or Yup for request validation
|
|
19
|
+
- 📊 **Background Jobs** - BullMQ, Inngest
|
|
20
|
+
- 📚 **API Documentation** - Swagger/OpenAPI, Scalar
|
|
21
|
+
- 🧪 **Testing** - Vitest with Supertest
|
|
22
|
+
- 🐳 **Docker Ready** - Dockerfile + docker-compose.yml included
|
|
23
|
+
- 📦 **TypeScript** - Full type safety out of the box
|
|
24
|
+
|
|
25
|
+
## 🚀 Quick Start
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Using npx (recommended)
|
|
29
|
+
npx deploy-bbc my-awesome-api
|
|
30
|
+
|
|
31
|
+
# Using npm
|
|
32
|
+
npm create deploy-bbc my-awesome-api
|
|
33
|
+
|
|
34
|
+
# Using bun
|
|
35
|
+
bunx deploy-bbc my-awesome-api
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 📦 Installation
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Install globally
|
|
42
|
+
npm install -g deploy-bbc
|
|
43
|
+
|
|
44
|
+
# Use directly with npx
|
|
45
|
+
npx deploy-bbc
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## 🎨 Usage
|
|
49
|
+
|
|
50
|
+
### Interactive Mode
|
|
51
|
+
|
|
52
|
+
Simply run the command and follow the prompts:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npx deploy-bbc my-project
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
You'll be asked to select:
|
|
59
|
+
1. **Project name** - Your application name
|
|
60
|
+
2. **Framework** - Hono (recommended), Express, or Bun Native
|
|
61
|
+
3. **Database(s)** - PostgreSQL, MySQL, MongoDB, Redis
|
|
62
|
+
4. **Authentication** - JWT, OAuth, Session-based
|
|
63
|
+
5. **AI Providers** - OpenAI, Anthropic, Gemini
|
|
64
|
+
6. **Email Service** - Resend, SendGrid, NodeMailer
|
|
65
|
+
7. **Real-time** - Socket.io or SSE
|
|
66
|
+
8. **Background Jobs** - BullMQ or Inngest
|
|
67
|
+
9. **Validation** - Zod or Yup
|
|
68
|
+
10. **API Docs** - Swagger or Scalar
|
|
69
|
+
11. **Testing** - Vitest setup
|
|
70
|
+
|
|
71
|
+
### CI Mode (Non-Interactive)
|
|
72
|
+
|
|
73
|
+
Perfect for automated deployments:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npx deploy-bbc my-project \
|
|
77
|
+
--CI \
|
|
78
|
+
--express \
|
|
79
|
+
--postgres \
|
|
80
|
+
--redis \
|
|
81
|
+
--jwt \
|
|
82
|
+
--zod \
|
|
83
|
+
--vitest \
|
|
84
|
+
--swagger \
|
|
85
|
+
--noGit
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## 🛠️ Framework Options
|
|
89
|
+
|
|
90
|
+
### Hono (Default)
|
|
91
|
+
```bash
|
|
92
|
+
npx deploy-bbc my-app --hono
|
|
93
|
+
```
|
|
94
|
+
- Ultrafast web framework built for the edge
|
|
95
|
+
- Tiny footprint (~12KB)
|
|
96
|
+
- Express-like API
|
|
97
|
+
- **Recommended for most projects**
|
|
98
|
+
|
|
99
|
+
### Express
|
|
100
|
+
```bash
|
|
101
|
+
npx deploy-bbc my-app --express
|
|
102
|
+
```
|
|
103
|
+
- Battle-tested Node.js framework
|
|
104
|
+
- Huge ecosystem
|
|
105
|
+
- Familiar to most developers
|
|
106
|
+
|
|
107
|
+
### Bun Native
|
|
108
|
+
```bash
|
|
109
|
+
npx deploy-bbc my-app --bun-native
|
|
110
|
+
```
|
|
111
|
+
- Native Bun.serve() API
|
|
112
|
+
- Zero dependencies
|
|
113
|
+
- Maximum performance
|
|
114
|
+
|
|
115
|
+
## 📊 Available Packages
|
|
116
|
+
|
|
117
|
+
### Databases
|
|
118
|
+
- `--postgres` - PostgreSQL with Drizzle ORM
|
|
119
|
+
- `--mysql` - MySQL with Drizzle ORM
|
|
120
|
+
- `--mongodb` - MongoDB with Mongoose
|
|
121
|
+
- `--redis` - Redis for caching & sessions
|
|
122
|
+
|
|
123
|
+
### Authentication
|
|
124
|
+
- `--jwt` - JSON Web Token authentication
|
|
125
|
+
- `--oauth` - OAuth 2.0 (Google, GitHub)
|
|
126
|
+
- `--session` - Session-based auth (requires Redis)
|
|
127
|
+
|
|
128
|
+
### AI & ML
|
|
129
|
+
- `--openai` - OpenAI GPT models
|
|
130
|
+
- `--anthropic` - Anthropic Claude SDK
|
|
131
|
+
- `--gemini` - Google Gemini
|
|
132
|
+
- `--vercelAI` - Vercel AI SDK (unified interface)
|
|
133
|
+
|
|
134
|
+
### Cloud Storage
|
|
135
|
+
- `--aws` - AWS S3 & SES
|
|
136
|
+
- `--gcp` - Google Cloud Storage
|
|
137
|
+
- `--azure` - Azure Blob Storage
|
|
138
|
+
- `--cloudflareR2` - Cloudflare R2
|
|
139
|
+
|
|
140
|
+
### Communication
|
|
141
|
+
- `--resend` - Modern email service
|
|
142
|
+
- `--sendgrid` - Enterprise email
|
|
143
|
+
- `--nodemailer` - SMTP email
|
|
144
|
+
- `--socketio` - WebSockets
|
|
145
|
+
- `--sse` - Server-Sent Events
|
|
146
|
+
|
|
147
|
+
### Infrastructure
|
|
148
|
+
- `--bullmq` - Redis-based job queue
|
|
149
|
+
- `--inngest` - Serverless job orchestration
|
|
150
|
+
- `--upstashRateLimit` - Upstash rate limiting
|
|
151
|
+
- `--customRateLimit` - Custom rate limit middleware
|
|
152
|
+
- `--sentry` - Error tracking
|
|
153
|
+
- `--logtail` - Log aggregation
|
|
154
|
+
|
|
155
|
+
### Developer Experience
|
|
156
|
+
- `--swagger` - Swagger/OpenAPI docs
|
|
157
|
+
- `--scalar` - Modern API documentation
|
|
158
|
+
- `--vitest` - Testing framework
|
|
159
|
+
- `--zod` - Zod validation
|
|
160
|
+
- `--yup` - Yup validation
|
|
161
|
+
|
|
162
|
+
### Options
|
|
163
|
+
- `--noInstall` - Skip dependency installation
|
|
164
|
+
- `--noGit` - Skip git initialization
|
|
165
|
+
- `--CI` - Non-interactive mode
|
|
166
|
+
|
|
167
|
+
## 📝 Examples
|
|
168
|
+
|
|
169
|
+
### Full-Stack API with PostgreSQL + JWT + AI
|
|
170
|
+
```bash
|
|
171
|
+
npx deploy-bbc my-api \
|
|
172
|
+
--hono \
|
|
173
|
+
--postgres \
|
|
174
|
+
--redis \
|
|
175
|
+
--jwt \
|
|
176
|
+
--openai \
|
|
177
|
+
--zod \
|
|
178
|
+
--swagger \
|
|
179
|
+
--vitest
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Microservice with Express + MongoDB
|
|
183
|
+
```bash
|
|
184
|
+
npx deploy-bbc user-service \
|
|
185
|
+
--express \
|
|
186
|
+
--mongodb \
|
|
187
|
+
--session \
|
|
188
|
+
--resend \
|
|
189
|
+
--bullmq \
|
|
190
|
+
--sentry
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Minimal Bun Native API
|
|
194
|
+
```bash
|
|
195
|
+
npx deploy-bbc fast-api \
|
|
196
|
+
--bun-native \
|
|
197
|
+
--postgres \
|
|
198
|
+
--jwt \
|
|
199
|
+
--zod
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### AI-Powered Backend
|
|
203
|
+
```bash
|
|
204
|
+
npx deploy-bbc ai-backend \
|
|
205
|
+
--hono \
|
|
206
|
+
--postgres \
|
|
207
|
+
--jwt \
|
|
208
|
+
--anthropic \
|
|
209
|
+
--vercelAI \
|
|
210
|
+
--aws \
|
|
211
|
+
--zod \
|
|
212
|
+
--scalar
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## 🏗️ Project Structure
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
my-project/
|
|
219
|
+
├── src/
|
|
220
|
+
│ ├── index.ts # Application entry point
|
|
221
|
+
│ ├── config/ # Configuration
|
|
222
|
+
│ ├── middleware/ # Custom middleware
|
|
223
|
+
│ ├── routes/ # API routes
|
|
224
|
+
│ ├── types/ # TypeScript types
|
|
225
|
+
│ └── utils/ # Utility functions
|
|
226
|
+
├── docker-compose.yml # Docker services
|
|
227
|
+
├── Dockerfile # Container configuration
|
|
228
|
+
├── .env.example # Environment variables template
|
|
229
|
+
├── package.json # Dependencies
|
|
230
|
+
├── tsconfig.json # TypeScript config
|
|
231
|
+
└── README.md # Project documentation
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## 🚦 Getting Started with Your Project
|
|
235
|
+
|
|
236
|
+
After creating your project:
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
# Navigate to project
|
|
240
|
+
cd my-project
|
|
241
|
+
|
|
242
|
+
# Copy environment variables
|
|
243
|
+
cp .env.example .env
|
|
244
|
+
|
|
245
|
+
# Edit .env with your credentials
|
|
246
|
+
nano .env
|
|
247
|
+
|
|
248
|
+
# Start development server
|
|
249
|
+
bun run dev
|
|
250
|
+
|
|
251
|
+
# Start with Docker
|
|
252
|
+
docker-compose up -d
|
|
253
|
+
bun run dev
|
|
254
|
+
|
|
255
|
+
# Run tests
|
|
256
|
+
bun test
|
|
257
|
+
|
|
258
|
+
# Build for production
|
|
259
|
+
bun run build
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## 🔧 Validation Example (Zod)
|
|
263
|
+
|
|
264
|
+
When you select Zod validation, you get ready-to-use middleware:
|
|
265
|
+
|
|
266
|
+
```typescript
|
|
267
|
+
import { z } from "zod";
|
|
268
|
+
import { validate, get_validated } from "./middleware/validate.js";
|
|
269
|
+
|
|
270
|
+
const create_user_schema = z.object({
|
|
271
|
+
name: z.string().min(2),
|
|
272
|
+
email: z.string().email(),
|
|
273
|
+
age: z.number().int().min(18).optional(),
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
app.post(
|
|
277
|
+
"/users",
|
|
278
|
+
validate({ target: "body", schema: create_user_schema }),
|
|
279
|
+
(c) => {
|
|
280
|
+
const body = get_validated(c, "body");
|
|
281
|
+
// body is fully typed and validated
|
|
282
|
+
return c.json({ user: body });
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## 🐳 Docker Support
|
|
288
|
+
|
|
289
|
+
Every project includes:
|
|
290
|
+
- **Dockerfile** - Optimized multi-stage build
|
|
291
|
+
- **docker-compose.yml** - Services orchestration
|
|
292
|
+
- Database containers (PostgreSQL, MySQL, Redis)
|
|
293
|
+
- Volume persistence
|
|
294
|
+
- Network configuration
|
|
295
|
+
|
|
296
|
+
Start everything with:
|
|
297
|
+
```bash
|
|
298
|
+
docker-compose up -d
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
## 📚 Documentation
|
|
302
|
+
|
|
303
|
+
Each generated project includes:
|
|
304
|
+
- Comprehensive README.md
|
|
305
|
+
- .env.example with all required variables
|
|
306
|
+
- Example routes and middleware
|
|
307
|
+
- TypeScript types and interfaces
|
|
308
|
+
- Docker setup instructions
|
|
309
|
+
|
|
310
|
+
## 🤝 Contributing
|
|
311
|
+
|
|
312
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
313
|
+
|
|
314
|
+
1. Fork the repository
|
|
315
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
316
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
317
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
318
|
+
5. Open a Pull Request
|
|
319
|
+
|
|
320
|
+
## 📄 License
|
|
321
|
+
|
|
322
|
+
MIT © [Aritra Sarkar](https://github.com/aritra69)
|
|
323
|
+
|
|
324
|
+
## 🙏 Acknowledgments
|
|
325
|
+
|
|
326
|
+
Built with:
|
|
327
|
+
- [Bun](https://bun.sh) - Fast JavaScript runtime
|
|
328
|
+
- [Hono](https://hono.dev) - Ultrafast web framework
|
|
329
|
+
- [Clack](https://github.com/natemoo-re/clack) - Beautiful CLI prompts
|
|
330
|
+
- [Drizzle ORM](https://orm.drizzle.team) - TypeScript ORM
|
|
331
|
+
- [Zod](https://zod.dev) - TypeScript-first validation
|
|
332
|
+
|
|
333
|
+
## 🔗 Links
|
|
334
|
+
|
|
335
|
+
- [GitHub Repository](https://github.com/aritra69/deploy-bbc)
|
|
336
|
+
- [npm Package](https://www.npmjs.com/package/deploy-bbc)
|
|
337
|
+
- [Report Issues](https://github.com/aritra69/deploy-bbc/issues)
|
|
338
|
+
|
|
339
|
+
## ⭐ Show Your Support
|
|
340
|
+
|
|
341
|
+
Give a ⭐️ if this project helped you!
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
**Made with ❤️ by [Aritra Sarkar](https://github.com/aritra69)**
|