deploy-bbc 1.2.1 → 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.
Files changed (243) hide show
  1. package/README.md +253 -266
  2. package/dist/index.js +16870 -0
  3. package/dist/templates/base/.env.example +3 -0
  4. package/dist/templates/base/package.json +20 -0
  5. package/dist/templates/base/src/config/index.ts +8 -0
  6. package/dist/templates/base/src/routes/index.ts +12 -0
  7. package/dist/templates/base/src/types/index.ts +2 -0
  8. package/dist/templates/base-bun-native/.env.example +3 -0
  9. package/dist/templates/base-bun-native/package.json +19 -0
  10. package/dist/templates/base-bun-native/src/config/index.ts +8 -0
  11. package/dist/templates/base-bun-native/src/index.ts +50 -0
  12. package/dist/templates/base-bun-native/src/routes/index.ts +21 -0
  13. package/dist/templates/base-bun-native/src/types/index.ts +2 -0
  14. package/dist/templates/base-express/.env.example +3 -0
  15. package/dist/templates/base-express/package.json +21 -0
  16. package/dist/templates/base-express/src/config/index.ts +8 -0
  17. package/dist/templates/base-express/src/routes/index.ts +12 -0
  18. package/dist/templates/base-express/src/types/index.ts +2 -0
  19. package/dist/templates/templates/base/README.md +31 -0
  20. package/dist/templates/templates/base/src/index.ts +26 -0
  21. package/dist/templates/templates/base/src/middleware/error.ts +13 -0
  22. package/dist/templates/templates/base/src/middleware/logger.ts +8 -0
  23. package/dist/templates/templates/base/src/utils/env.ts +5 -0
  24. package/dist/templates/templates/base/tsconfig.json +20 -0
  25. package/dist/templates/templates/base-bun-native/README.md +31 -0
  26. package/dist/templates/templates/base-bun-native/src/middleware/error.ts +20 -0
  27. package/dist/templates/templates/base-bun-native/src/middleware/logger.ts +6 -0
  28. package/dist/templates/templates/base-bun-native/src/utils/env.ts +5 -0
  29. package/dist/templates/templates/base-bun-native/tsconfig.json +20 -0
  30. package/dist/templates/templates/base-express/README.md +31 -0
  31. package/dist/templates/templates/base-express/src/index.ts +27 -0
  32. package/dist/templates/templates/base-express/src/middleware/error.ts +15 -0
  33. package/dist/templates/templates/base-express/src/middleware/logger.ts +12 -0
  34. package/dist/templates/templates/base-express/src/utils/env.ts +5 -0
  35. package/dist/templates/templates/base-express/tsconfig.json +20 -0
  36. package/dist/templates/templates/extras/ai/anthropic/src/services/ai/anthropic.ts +0 -0
  37. package/dist/templates/templates/extras/ai/gemini/src/services/ai/gemini.ts +0 -0
  38. package/dist/templates/templates/extras/ai/openai/src/routes/ai/chat.ts +0 -0
  39. package/dist/templates/templates/extras/ai/openai/src/services/ai/openai.ts +0 -0
  40. package/dist/templates/templates/extras/ai/vercel-ai/src/routes/ai/generate.ts +0 -0
  41. package/dist/templates/templates/extras/ai/vercel-ai/src/routes/ai/stream.ts +0 -0
  42. package/dist/templates/templates/extras/ai/vercel-ai/src/services/ai/index.ts +0 -0
  43. package/dist/templates/templates/extras/auth/jwt/src/middleware/auth.ts +0 -0
  44. package/dist/templates/templates/extras/auth/jwt/src/routes/auth.ts +0 -0
  45. package/dist/templates/templates/extras/auth/jwt/src/utils/jwt.ts +0 -0
  46. package/dist/templates/templates/extras/auth/oauth/src/config/oauth.ts +0 -0
  47. package/dist/templates/templates/extras/auth/oauth/src/routes/auth.ts +0 -0
  48. package/dist/templates/templates/extras/auth/session/src/config/session.ts +0 -0
  49. package/dist/templates/templates/extras/auth/session/src/middleware/session.ts +0 -0
  50. package/dist/templates/templates/extras/cloud/aws/src/services/aws/s3.ts +0 -0
  51. package/dist/templates/templates/extras/cloud/aws/src/services/aws/ses.ts +0 -0
  52. package/dist/templates/templates/extras/cloud/azure/src/services/azure/blob.ts +0 -0
  53. package/dist/templates/templates/extras/cloud/cloudflare-r2/src/services/cloudflare/r2.ts +0 -0
  54. package/dist/templates/templates/extras/cloud/gcp/src/services/gcp/storage.ts +0 -0
  55. package/dist/templates/templates/extras/database/mongodb/src/db/index.ts +0 -0
  56. package/dist/templates/templates/extras/database/mongodb/src/db/models/user.model.ts +0 -0
  57. package/dist/templates/templates/extras/database/mysql/drizzle.config.ts +0 -0
  58. package/dist/templates/templates/extras/database/postgres/src/db/index.ts +0 -0
  59. package/dist/templates/templates/extras/database/redis/src/db/redis.ts +0 -0
  60. package/dist/templates/templates/extras/docs/scalar/src/openapi/index.ts +0 -0
  61. package/dist/templates/templates/extras/docs/scalar/src/routes/docs.ts +0 -0
  62. package/dist/templates/templates/extras/docs/swagger/src/openapi/index.ts +0 -0
  63. package/dist/templates/templates/extras/docs/swagger/src/routes/docs.ts +0 -0
  64. package/dist/templates/templates/extras/email/nodemailer/src/services/email/nodemailer.ts +0 -0
  65. package/dist/templates/templates/extras/email/resend/src/services/email/resend.ts +0 -0
  66. package/dist/templates/templates/extras/email/resend/src/templates/email/welcome.ts +0 -0
  67. package/dist/templates/templates/extras/email/sendgrid/src/services/email/sendgrid.ts +0 -0
  68. package/dist/templates/templates/extras/observability/logtail/src/config/logger.ts +0 -0
  69. package/dist/templates/templates/extras/observability/sentry/src/config/sentry.ts +0 -0
  70. package/dist/templates/templates/extras/observability/sentry/src/middleware/sentry.ts +0 -0
  71. package/dist/templates/templates/extras/queue/bullmq/src/queue/index.ts +0 -0
  72. package/dist/templates/templates/extras/queue/bullmq/src/queue/jobs/email.job.ts +0 -0
  73. package/dist/templates/templates/extras/queue/bullmq/src/queue/processors/email.processor.ts +0 -0
  74. package/dist/templates/templates/extras/queue/bullmq/src/routes/queue.ts +0 -0
  75. package/dist/templates/templates/extras/queue/inngest/src/inngest/client.ts +0 -0
  76. package/dist/templates/templates/extras/queue/inngest/src/inngest/functions/email.ts +0 -0
  77. package/dist/templates/templates/extras/queue/inngest/src/routes/inngest.ts +0 -0
  78. package/dist/templates/templates/extras/realtime/socketio/src/socket/handlers.ts +0 -0
  79. package/dist/templates/templates/extras/realtime/socketio/src/socket/index.ts +0 -0
  80. package/dist/templates/templates/extras/realtime/sse/src/routes/sse.ts +0 -0
  81. package/dist/templates/templates/extras/testing/vitest/src/__tests__/example.test.ts +0 -0
  82. package/dist/templates/templates/extras/testing/vitest/src/__tests__/setup.ts +0 -0
  83. package/dist/templates/templates/extras/testing/vitest/vitest.config.ts +0 -0
  84. package/dist/templates/templates/extras/validation/yup/src/middleware/index.ts +1 -0
  85. package/dist/templates/templates/extras/validation/yup/src/middleware/validate.ts +83 -0
  86. package/dist/templates/templates/extras/validation/yup/src/routes/users.ts +132 -0
  87. package/dist/templates/templates/extras/validation/zod/src/middleware/index.ts +1 -0
  88. package/dist/templates/templates/extras/validation/zod/src/middleware/validate.ts +80 -0
  89. package/dist/templates/templates/extras/validation/zod/src/routes/users.ts +128 -0
  90. package/package.json +43 -9
  91. package/.cspell.json +0 -38
  92. package/CLAUDE.md +0 -403
  93. package/cli/README.md +0 -345
  94. package/cli/package.json +0 -54
  95. package/cli/src/cli/index.ts +0 -454
  96. package/cli/src/helpers/create-project.ts +0 -66
  97. package/cli/src/helpers/generate-docker-compose.ts +0 -133
  98. package/cli/src/helpers/generate-dockerfile.ts +0 -45
  99. package/cli/src/helpers/init-git.ts +0 -33
  100. package/cli/src/helpers/install-dependencies.ts +0 -28
  101. package/cli/src/helpers/log-next-steps.ts +0 -87
  102. package/cli/src/helpers/scaffold-project.ts +0 -88
  103. package/cli/src/index.ts +0 -18
  104. package/cli/src/installers/ai.ts +0 -123
  105. package/cli/src/installers/auth.ts +0 -132
  106. package/cli/src/installers/base.ts +0 -16
  107. package/cli/src/installers/cloud.ts +0 -127
  108. package/cli/src/installers/database.ts +0 -212
  109. package/cli/src/installers/docs.ts +0 -93
  110. package/cli/src/installers/email.ts +0 -119
  111. package/cli/src/installers/env-variables.ts +0 -27
  112. package/cli/src/installers/index.ts +0 -145
  113. package/cli/src/installers/observability.ts +0 -103
  114. package/cli/src/installers/queue.ts +0 -103
  115. package/cli/src/installers/ratelimit.ts +0 -98
  116. package/cli/src/installers/realtime.ts +0 -79
  117. package/cli/src/installers/testing.ts +0 -88
  118. package/cli/src/installers/validation.ts +0 -85
  119. package/cli/src/types/index.ts +0 -126
  120. package/cli/src/utils/add-package-dependency.ts +0 -56
  121. package/cli/src/utils/dependency-version-map.ts +0 -85
  122. package/cli/src/utils/logger.ts +0 -19
  123. package/cli/src/utils/parse-name-and-path.ts +0 -71
  124. package/cli/src/utils/render-title.ts +0 -11
  125. package/cli/tsconfig.json +0 -35
  126. package/test-cli.sh +0 -56
  127. package/tsconfig.json +0 -15
  128. /package/{cli/src → dist}/templates/base/README.md +0 -0
  129. /package/{cli/src → dist}/templates/base/src/index.ts +0 -0
  130. /package/{cli/src → dist}/templates/base/src/middleware/error.ts +0 -0
  131. /package/{cli/src → dist}/templates/base/src/middleware/logger.ts +0 -0
  132. /package/{cli/src → dist}/templates/base/src/utils/env.ts +0 -0
  133. /package/{cli/src → dist}/templates/base/tsconfig.json +0 -0
  134. /package/{cli/src → dist}/templates/base-bun-native/README.md +0 -0
  135. /package/{cli/src → dist}/templates/base-bun-native/src/middleware/error.ts +0 -0
  136. /package/{cli/src → dist}/templates/base-bun-native/src/middleware/logger.ts +0 -0
  137. /package/{cli/src → dist}/templates/base-bun-native/src/utils/env.ts +0 -0
  138. /package/{cli/src → dist}/templates/base-bun-native/tsconfig.json +0 -0
  139. /package/{cli/src → dist}/templates/base-express/README.md +0 -0
  140. /package/{cli/src → dist}/templates/base-express/src/index.ts +0 -0
  141. /package/{cli/src → dist}/templates/base-express/src/middleware/error.ts +0 -0
  142. /package/{cli/src → dist}/templates/base-express/src/middleware/logger.ts +0 -0
  143. /package/{cli/src → dist}/templates/base-express/src/utils/env.ts +0 -0
  144. /package/{cli/src → dist}/templates/base-express/tsconfig.json +0 -0
  145. /package/{cli/src → dist}/templates/extras/ai/anthropic/src/routes/ai/claude.ts +0 -0
  146. /package/{cli/src → dist}/templates/extras/ai/anthropic/src/services/ai/anthropic.ts +0 -0
  147. /package/{cli/src → dist}/templates/extras/ai/gemini/src/services/ai/gemini.ts +0 -0
  148. /package/{cli/src → dist}/templates/extras/ai/openai/src/routes/ai/chat.ts +0 -0
  149. /package/{cli/src → dist}/templates/extras/ai/openai/src/services/ai/openai.ts +0 -0
  150. /package/{cli/src → dist}/templates/extras/ai/vercel-ai/src/routes/ai/generate.ts +0 -0
  151. /package/{cli/src → dist}/templates/extras/ai/vercel-ai/src/routes/ai/stream.ts +0 -0
  152. /package/{cli/src → dist}/templates/extras/ai/vercel-ai/src/services/ai/index.ts +0 -0
  153. /package/{cli/src → dist}/templates/extras/auth/jwt/src/middleware/auth.ts +0 -0
  154. /package/{cli/src → dist}/templates/extras/auth/jwt/src/routes/auth.ts +0 -0
  155. /package/{cli/src → dist}/templates/extras/auth/jwt/src/utils/jwt.ts +0 -0
  156. /package/{cli/src → dist}/templates/extras/auth/oauth/src/config/oauth.ts +0 -0
  157. /package/{cli/src → dist}/templates/extras/auth/oauth/src/routes/auth.ts +0 -0
  158. /package/{cli/src → dist}/templates/extras/auth/session/src/config/session.ts +0 -0
  159. /package/{cli/src → dist}/templates/extras/auth/session/src/middleware/session.ts +0 -0
  160. /package/{cli/src → dist}/templates/extras/cloud/aws/src/services/aws/s3.ts +0 -0
  161. /package/{cli/src → dist}/templates/extras/cloud/aws/src/services/aws/ses.ts +0 -0
  162. /package/{cli/src → dist}/templates/extras/cloud/azure/src/services/azure/blob.ts +0 -0
  163. /package/{cli/src → dist}/templates/extras/cloud/cloudflare-r2/src/services/cloudflare/r2.ts +0 -0
  164. /package/{cli/src → dist}/templates/extras/cloud/gcp/src/services/gcp/storage.ts +0 -0
  165. /package/{cli/src → dist}/templates/extras/database/mongodb/src/db/index.ts +0 -0
  166. /package/{cli/src → dist}/templates/extras/database/mongodb/src/db/models/user.model.ts +0 -0
  167. /package/{cli/src → dist}/templates/extras/database/mysql/drizzle.config.ts +0 -0
  168. /package/{cli/src → dist}/templates/extras/database/postgres/src/db/index.ts +0 -0
  169. /package/{cli/src → dist}/templates/extras/database/redis/src/db/redis.ts +0 -0
  170. /package/{cli/src → dist}/templates/extras/docs/scalar/src/openapi/index.ts +0 -0
  171. /package/{cli/src → dist}/templates/extras/docs/scalar/src/routes/docs.ts +0 -0
  172. /package/{cli/src → dist}/templates/extras/docs/swagger/src/openapi/index.ts +0 -0
  173. /package/{cli/src → dist}/templates/extras/docs/swagger/src/routes/docs.ts +0 -0
  174. /package/{cli/src → dist}/templates/extras/email/nodemailer/src/services/email/nodemailer.ts +0 -0
  175. /package/{cli/src → dist}/templates/extras/email/resend/src/services/email/resend.ts +0 -0
  176. /package/{cli/src → dist}/templates/extras/email/resend/src/templates/email/welcome.ts +0 -0
  177. /package/{cli/src → dist}/templates/extras/email/sendgrid/src/services/email/sendgrid.ts +0 -0
  178. /package/{cli/src → dist}/templates/extras/observability/logtail/src/config/logger.ts +0 -0
  179. /package/{cli/src → dist}/templates/extras/observability/sentry/src/config/sentry.ts +0 -0
  180. /package/{cli/src → dist}/templates/extras/observability/sentry/src/middleware/sentry.ts +0 -0
  181. /package/{cli/src → dist}/templates/extras/queue/bullmq/src/queue/index.ts +0 -0
  182. /package/{cli/src → dist}/templates/extras/queue/bullmq/src/queue/jobs/email.job.ts +0 -0
  183. /package/{cli/src → dist}/templates/extras/queue/bullmq/src/queue/processors/email.processor.ts +0 -0
  184. /package/{cli/src → dist}/templates/extras/queue/bullmq/src/routes/queue.ts +0 -0
  185. /package/{cli/src → dist}/templates/extras/queue/inngest/src/inngest/client.ts +0 -0
  186. /package/{cli/src → dist}/templates/extras/queue/inngest/src/inngest/functions/email.ts +0 -0
  187. /package/{cli/src → dist}/templates/extras/queue/inngest/src/routes/inngest.ts +0 -0
  188. /package/{cli/src → dist}/templates/extras/realtime/socketio/src/socket/handlers.ts +0 -0
  189. /package/{cli/src → dist}/templates/extras/realtime/socketio/src/socket/index.ts +0 -0
  190. /package/{cli/src → dist}/templates/extras/realtime/sse/src/routes/sse.ts +0 -0
  191. /package/{cli/src → dist}/templates/extras/testing/vitest/src/__tests__/example.test.ts +0 -0
  192. /package/{cli/src → dist}/templates/extras/testing/vitest/src/__tests__/setup.ts +0 -0
  193. /package/{cli/src → dist}/templates/extras/testing/vitest/vitest.config.ts +0 -0
  194. /package/{cli/src → dist}/templates/extras/validation/yup/src/middleware/index.ts +0 -0
  195. /package/{cli/src → dist}/templates/extras/validation/yup/src/middleware/validate.ts +0 -0
  196. /package/{cli/src → dist}/templates/extras/validation/yup/src/routes/users.ts +0 -0
  197. /package/{cli/src → dist}/templates/extras/validation/zod/src/middleware/index.ts +0 -0
  198. /package/{cli/src → dist}/templates/extras/validation/zod/src/middleware/validate.ts +0 -0
  199. /package/{cli/src → dist}/templates/extras/validation/zod/src/routes/users.ts +0 -0
  200. /package/{cli/src → dist/templates}/templates/base/.env.example +0 -0
  201. /package/{cli/src → dist/templates}/templates/base/package.json +0 -0
  202. /package/{cli/src → dist/templates}/templates/base/src/config/index.ts +0 -0
  203. /package/{cli/src → dist/templates}/templates/base/src/controllers/user/create-user.controller.ts +0 -0
  204. /package/{cli/src → dist/templates}/templates/base/src/controllers/user/delete-user.controller.ts +0 -0
  205. /package/{cli/src → dist/templates}/templates/base/src/controllers/user/get-user.controller.ts +0 -0
  206. /package/{cli/src → dist/templates}/templates/base/src/controllers/user/get-users.controller.ts +0 -0
  207. /package/{cli/src → dist/templates}/templates/base/src/controllers/user/update-user.controller.ts +0 -0
  208. /package/{cli/src → dist/templates}/templates/base/src/models/user.model.ts +0 -0
  209. /package/{cli/src → dist/templates}/templates/base/src/routes/index.ts +0 -0
  210. /package/{cli/src → dist/templates}/templates/base/src/routes/user.route.ts +0 -0
  211. /package/{cli/src → dist/templates}/templates/base/src/types/common/api-response.types.ts +0 -0
  212. /package/{cli/src → dist/templates}/templates/base/src/types/index.ts +0 -0
  213. /package/{cli/src → dist/templates}/templates/base/src/types/models/user.types.ts +0 -0
  214. /package/{cli/src → dist/templates}/templates/base-bun-native/.env.example +0 -0
  215. /package/{cli/src → dist/templates}/templates/base-bun-native/package.json +0 -0
  216. /package/{cli/src → dist/templates}/templates/base-bun-native/src/config/index.ts +0 -0
  217. /package/{cli/src → dist/templates}/templates/base-bun-native/src/controllers/user/create-user.controller.ts +0 -0
  218. /package/{cli/src → dist/templates}/templates/base-bun-native/src/controllers/user/delete-user.controller.ts +0 -0
  219. /package/{cli/src → dist/templates}/templates/base-bun-native/src/controllers/user/get-user.controller.ts +0 -0
  220. /package/{cli/src → dist/templates}/templates/base-bun-native/src/controllers/user/get-users.controller.ts +0 -0
  221. /package/{cli/src → dist/templates}/templates/base-bun-native/src/controllers/user/update-user.controller.ts +0 -0
  222. /package/{cli/src → dist/templates}/templates/base-bun-native/src/index.ts +0 -0
  223. /package/{cli/src → dist/templates}/templates/base-bun-native/src/models/user.model.ts +0 -0
  224. /package/{cli/src → dist/templates}/templates/base-bun-native/src/routes/index.ts +0 -0
  225. /package/{cli/src → dist/templates}/templates/base-bun-native/src/routes/user.route.ts +0 -0
  226. /package/{cli/src → dist/templates}/templates/base-bun-native/src/types/common/api-response.types.ts +0 -0
  227. /package/{cli/src → dist/templates}/templates/base-bun-native/src/types/index.ts +0 -0
  228. /package/{cli/src → dist/templates}/templates/base-bun-native/src/types/models/user.types.ts +0 -0
  229. /package/{cli/src → dist/templates}/templates/base-express/.env.example +0 -0
  230. /package/{cli/src → dist/templates}/templates/base-express/package.json +0 -0
  231. /package/{cli/src → dist/templates}/templates/base-express/src/config/index.ts +0 -0
  232. /package/{cli/src → dist/templates}/templates/base-express/src/controllers/user/create-user.controller.ts +0 -0
  233. /package/{cli/src → dist/templates}/templates/base-express/src/controllers/user/delete-user.controller.ts +0 -0
  234. /package/{cli/src → dist/templates}/templates/base-express/src/controllers/user/get-user.controller.ts +0 -0
  235. /package/{cli/src → dist/templates}/templates/base-express/src/controllers/user/get-users.controller.ts +0 -0
  236. /package/{cli/src → dist/templates}/templates/base-express/src/controllers/user/update-user.controller.ts +0 -0
  237. /package/{cli/src → dist/templates}/templates/base-express/src/models/user.model.ts +0 -0
  238. /package/{cli/src → dist/templates}/templates/base-express/src/routes/index.ts +0 -0
  239. /package/{cli/src → dist/templates}/templates/base-express/src/routes/user.route.ts +0 -0
  240. /package/{cli/src → dist/templates}/templates/base-express/src/types/common/api-response.types.ts +0 -0
  241. /package/{cli/src → dist/templates}/templates/base-express/src/types/index.ts +0 -0
  242. /package/{cli/src → dist/templates}/templates/base-express/src/types/models/user.types.ts +0 -0
  243. /package/{prettier.config.mjs → dist/templates/templates/extras/ai/anthropic/src/routes/ai/claude.ts} +0 -0
package/README.md CHANGED
@@ -1,358 +1,345 @@
1
- # deploy-bbc
1
+ # 🚀 deploy-bbc (Best Backend Code)
2
2
 
3
- > A powerful CLI tool to bootstrap production-ready backend applications with Bun
3
+ Bootstrap production-ready backend projects with Bun, TypeScript, and Docker in seconds.
4
4
 
5
- ## Overview
5
+ [![npm version](https://img.shields.io/npm/v/deploy-bbc.svg)](https://www.npmjs.com/package/deploy-bbc)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
7
 
7
- `deploy-bbc` (Best Backend Code) is an interactive command-line tool that scaffolds modern, type-safe backend applications using Bun. It provides a comprehensive set of integrations for databases, authentication, AI services, cloud providers, and more - all configured and ready to use.
8
+ ## Features
8
9
 
9
- ## Features
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
10
24
 
11
- - **Three Framework Options**: Choose between Hono, Express, or Bun Native HTTP
12
- - **Production-Ready Templates**: Pre-configured with best practices and error handling
13
- - **30+ Integrations**: Databases, auth, AI, cloud storage, queues, and more
14
- - **Type-Safe**: Full TypeScript support with strict typing
15
- - **Docker Ready**: Automatic Dockerfile and docker-compose generation
16
- - **Developer Experience**: Built-in validation, testing, and API documentation options
17
- - **Zero Config**: Works out of the box with sensible defaults
18
-
19
- ## Quick Start
25
+ ## 🚀 Quick Start
20
26
 
21
27
  ```bash
22
28
  # Using npx (recommended)
23
- npx deploy-bbc my-backend
24
-
25
- # Using bun
26
- bunx deploy-bbc my-backend
29
+ npx deploy-bbc my-awesome-api
27
30
 
28
31
  # Using npm
29
- npm create backend-app my-backend
30
- ```
31
-
32
- Follow the interactive prompts to select your framework and integrations.
32
+ npm create deploy-bbc my-awesome-api
33
33
 
34
- ## Installation
34
+ # Using bun
35
+ bunx deploy-bbc my-awesome-api
36
+ ```
35
37
 
36
- ### As a CLI Tool
38
+ ## 📦 Installation
37
39
 
38
40
  ```bash
39
41
  # Install globally
40
42
  npm install -g deploy-bbc
41
43
 
42
- # Run
43
- deploy-bbc my-app-name
44
- ```
45
-
46
- ### From Source
47
-
48
- ```bash
49
- # Clone the repository
50
- git clone https://github.com/aritra69/deploy-bbc.git
51
- cd deploy-bbc
52
-
53
- # Install dependencies
54
- bun install
55
-
56
- # Build
57
- bun run build
58
-
59
- # Link for local development
60
- npm link
44
+ # Use directly with npx
45
+ npx deploy-bbc
61
46
  ```
62
47
 
63
- ## Usage
48
+ ## 🎨 Usage
64
49
 
65
50
  ### Interactive Mode
66
51
 
67
- Simply run the CLI and answer the prompts:
52
+ Simply run the command and follow the prompts:
68
53
 
69
54
  ```bash
70
- deploy-bbc my-backend
55
+ npx deploy-bbc my-project
71
56
  ```
72
57
 
73
- You'll be prompted to:
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
74
70
 
75
- 1. Choose a framework (Hono, Express, or Bun Native)
76
- 2. Select integrations (databases, auth, AI services, etc.)
77
- 3. Configure additional options
71
+ ### CI Mode (Non-Interactive)
78
72
 
79
- ### CLI Flags
73
+ Perfect for automated deployments:
80
74
 
81
75
  ```bash
82
- deploy-bbc my-backend [options]
76
+ npx deploy-bbc my-project \
77
+ --CI \
78
+ --express \
79
+ --postgres \
80
+ --redis \
81
+ --jwt \
82
+ --zod \
83
+ --vitest \
84
+ --swagger \
85
+ --noGit
83
86
  ```
84
87
 
85
- #### General Options
86
-
87
- - `--no-git` - Skip Git initialization
88
- - `--no-install` - Skip dependency installation
89
- - `--default` - Use default configuration (Hono with no extras)
90
- - `--CI` - Run in CI mode (non-interactive)
91
-
92
- #### Database Options
93
-
94
- - `--postgres` - Add PostgreSQL with Drizzle ORM
95
- - `--mysql` - Add MySQL with Drizzle ORM
96
- - `--mongodb` - Add MongoDB with Mongoose
97
- - `--redis` - Add Redis support
98
-
99
- #### Authentication Options
100
-
101
- - `--jwt` - Add JWT authentication
102
- - `--oauth` - Add OAuth 2.0 support
103
- - `--session` - Add session-based authentication
104
-
105
- #### AI Integration Options
106
-
107
- - `--openai` - Add OpenAI integration
108
- - `--anthropic` - Add Anthropic Claude integration
109
- - `--gemini` - Add Google Gemini integration
110
- - `--vercel-ai` - Add Vercel AI SDK
111
-
112
- #### Cloud Provider Options
113
-
114
- - `--aws` - Add AWS SDK (S3, SES)
115
- - `--gcp` - Add Google Cloud Platform SDK
116
- - `--azure` - Add Azure SDK
117
- - `--cloudflare-r2` - Add Cloudflare R2 storage
118
-
119
- #### Communication Options
120
-
121
- - `--resend` - Add Resend email service
122
- - `--sendgrid` - Add SendGrid email service
123
- - `--nodemailer` - Add Nodemailer
124
- - `--socketio` - Add Socket.IO for WebSockets
125
- - `--sse` - Add Server-Sent Events
126
-
127
- #### Infrastructure Options
128
-
129
- - `--bullmq` - Add BullMQ job queue
130
- - `--inngest` - Add Inngest workflow engine
131
- - `--upstash-ratelimit` - Add Upstash rate limiting
132
- - `--custom-ratelimit` - Add custom rate limiting
133
- - `--sentry` - Add Sentry error tracking
134
- - `--logtail` - Add Logtail logging
135
-
136
- #### Developer Experience Options
137
-
138
- - `--swagger` - Add Swagger/OpenAPI documentation
139
- - `--scalar` - Add Scalar API documentation
140
- - `--vitest` - Add Vitest testing framework
141
- - `--zod` - Add Zod validation
142
- - `--yup` - Add Yup validation
143
-
144
- ### Example Commands
88
+ ## 🛠️ Framework Options
145
89
 
90
+ ### Hono (Default)
146
91
  ```bash
147
- # Create a Hono app with PostgreSQL and JWT auth
148
- deploy-bbc my-api --postgres --jwt
149
-
150
- # Create an Express app with full stack
151
- deploy-bbc my-app --postgres --redis --jwt --openai --aws --swagger
152
-
153
- # Create a minimal Bun native app
154
- deploy-bbc my-api --default
155
-
156
- # Create without Git initialization
157
- deploy-bbc my-api --no-git --postgres --jwt
92
+ npx deploy-bbc my-app --hono
158
93
  ```
159
-
160
- ## Framework Options
161
-
162
- ### Hono (Default)
163
-
164
- Ultra-fast web framework optimized for Bun and edge runtimes. Lightweight and type-safe.
94
+ - Ultrafast web framework built for the edge
95
+ - Tiny footprint (~12KB)
96
+ - Express-like API
97
+ - **Recommended for most projects**
165
98
 
166
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
167
106
 
168
- Battle-tested Node.js framework with extensive ecosystem and middleware support.
169
-
170
- ### Bun Native HTTP
171
-
172
- Use Bun's native HTTP server for maximum performance with minimal overhead.
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
173
114
 
174
- ## Available Integrations
115
+ ## 📊 Available Packages
175
116
 
176
117
  ### Databases
177
-
178
- - **PostgreSQL** - Relational database with Drizzle ORM
179
- - **MySQL** - Relational database with Drizzle ORM
180
- - **MongoDB** - Document database with Mongoose ODM
181
- - **Redis** - In-memory data store for caching and sessions
118
+ - `--postgres` - PostgreSQL with Drizzle ORM
119
+ - `--mysql` - MySQL with Drizzle ORM
120
+ - `--mongodb` - MongoDB with Mongoose
121
+ - `--redis` - Redis for caching & sessions
182
122
 
183
123
  ### Authentication
184
-
185
- - **JWT** - JSON Web Token authentication with utilities
186
- - **OAuth 2.0** - Third-party authentication (Google, GitHub, etc.)
187
- - **Session** - Traditional session-based authentication
188
-
189
- ### AI & Machine Learning
190
-
191
- - **OpenAI** - GPT models integration
192
- - **Anthropic** - Claude AI integration
193
- - **Google Gemini** - Gemini AI models
194
- - **Vercel AI SDK** - Multi-provider AI SDK with streaming support
195
-
196
- ### Cloud & Storage
197
-
198
- - **AWS** - S3 storage, SES email, and more
199
- - **Google Cloud Platform** - Cloud Storage and services
200
- - **Azure** - Blob storage and Azure services
201
- - **Cloudflare R2** - S3-compatible object storage
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
202
139
 
203
140
  ### Communication
204
-
205
- - **Resend** - Modern transactional email
206
- - **SendGrid** - Email delivery service
207
- - **Nodemailer** - Flexible email sending
208
- - **Socket.IO** - Real-time bidirectional communication
209
- - **Server-Sent Events** - Server-to-client streaming
141
+ - `--resend` - Modern email service
142
+ - `--sendgrid` - Enterprise email
143
+ - `--nodemailer` - SMTP email
144
+ - `--socketio` - WebSockets
145
+ - `--sse` - Server-Sent Events
210
146
 
211
147
  ### Infrastructure
212
-
213
- - **BullMQ** - Redis-based job queue
214
- - **Inngest** - Durable workflow engine
215
- - **Rate Limiting** - Upstash or custom implementation
216
- - **Sentry** - Error tracking and monitoring
217
- - **Logtail** - Log management and analytics
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
218
154
 
219
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
220
161
 
221
- - **Swagger/OpenAPI** - Interactive API documentation
222
- - **Scalar** - Beautiful API documentation
223
- - **Vitest** - Fast unit testing framework
224
- - **Zod** - TypeScript-first schema validation
225
- - **Yup** - Object schema validation
162
+ ### Options
163
+ - `--noInstall` - Skip dependency installation
164
+ - `--noGit` - Skip git initialization
165
+ - `--CI` - Non-interactive mode
226
166
 
227
- ## Project Structure
167
+ ## 📝 Examples
228
168
 
229
- ```plaintext
230
- my-backend/
231
- ├── src/
232
- │ ├── config/ # Configuration files
233
- │ ├── middleware/ # Express/Hono middleware
234
- │ ├── routes/ # API routes
235
- │ ├── services/ # Business logic
236
- │ ├── db/ # Database configuration
237
- │ ├── utils/ # Utility functions
238
- │ ├── types/ # TypeScript types
239
- │ └── index.ts # Application entry point
240
- ├── .env.example # Environment variables template
241
- ├── .gitignore
242
- ├── package.json
243
- ├── tsconfig.json
244
- ├── Dockerfile # Docker configuration
245
- ├── docker-compose.yml # Docker Compose setup
246
- └── README.md
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
247
180
  ```
248
181
 
249
- ## Development
250
-
251
- ### Prerequisites
252
-
253
- - Node.js >= 18.0.0
254
- - Bun >= 1.0.0 (recommended)
255
-
256
- ### Commands
257
-
182
+ ### Microservice with Express + MongoDB
258
183
  ```bash
259
- # Development mode with hot reload
260
- bun run dev
261
-
262
- # Build the project
263
- bun run build
264
-
265
- # Type checking
266
- bun run type-check
184
+ npx deploy-bbc user-service \
185
+ --express \
186
+ --mongodb \
187
+ --session \
188
+ --resend \
189
+ --bullmq \
190
+ --sentry
191
+ ```
267
192
 
268
- # Lint code
269
- bun run lint
193
+ ### Minimal Bun Native API
194
+ ```bash
195
+ npx deploy-bbc fast-api \
196
+ --bun-native \
197
+ --postgres \
198
+ --jwt \
199
+ --zod
200
+ ```
270
201
 
271
- # Format code
272
- bun run format
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
273
213
  ```
274
214
 
275
- ### Contributing
215
+ ## 🏗️ Project Structure
276
216
 
277
- We welcome contributions! Please follow these steps:
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
+ ```
278
233
 
279
- 1. Fork the repository
280
- 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
281
- 3. Follow the coding conventions in `CLAUDE.md`
282
- 4. Commit your changes (`git commit -m 'Add amazing feature'`)
283
- 5. Push to the branch (`git push origin feature/amazing-feature`)
284
- 6. Open a Pull Request
234
+ ## 🚦 Getting Started with Your Project
285
235
 
286
- #### Coding Conventions
236
+ After creating your project:
287
237
 
288
- This project follows specific naming conventions:
238
+ ```bash
239
+ # Navigate to project
240
+ cd my-project
289
241
 
290
- - **Files/Folders**: `kebab-case`
291
- - **Functions**: `snake_case`
292
- - **Variables**: `snake_case`
293
- - **Types**: `PascalCase` (use `type`, not `interface`)
294
- - **Constants**: `SCREAMING_SNAKE_CASE`
242
+ # Copy environment variables
243
+ cp .env.example .env
295
244
 
296
- See `CLAUDE.md` for complete guidelines.
245
+ # Edit .env with your credentials
246
+ nano .env
297
247
 
298
- ## Docker Support
248
+ # Start development server
249
+ bun run dev
299
250
 
300
- Every generated project includes Docker configuration:
251
+ # Start with Docker
252
+ docker-compose up -d
253
+ bun run dev
301
254
 
302
- ```bash
303
- # Build and run with Docker Compose
304
- docker-compose up
255
+ # Run tests
256
+ bun test
305
257
 
306
- # Build Docker image
307
- docker build -t my-backend .
258
+ # Build for production
259
+ bun run build
260
+ ```
308
261
 
309
- # Run container
310
- docker run -p 8000:8000 my-backend
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
+ );
311
285
  ```
312
286
 
313
- ## Environment Variables
287
+ ## 🐳 Docker Support
314
288
 
315
- Each integration adds its required environment variables to `.env.example`. Copy it to `.env` and fill in your values:
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
316
295
 
296
+ Start everything with:
317
297
  ```bash
318
- cp .env.example .env
298
+ docker-compose up -d
319
299
  ```
320
300
 
321
- ## License
322
-
323
- MIT License - see LICENSE file for details
324
-
325
- ## Author
301
+ ## 📚 Documentation
326
302
 
327
- ### Aritra Sarkar
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
328
309
 
329
- - GitHub: [@aritra69](https://github.com/aritra69)
330
- - Email: <aritrasarkar2002@gmail.com>
310
+ ## 🤝 Contributing
331
311
 
332
- ## Contributors
312
+ Contributions are welcome! Please feel free to submit a Pull Request.
333
313
 
334
- This project exists thanks to all the people who contribute.
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
335
319
 
336
- [![Contributors](https://contrib.rocks/image?repo=aritra69/deploy-bbc)](https://github.com/aritra69/deploy-bbc/graphs/contributors)
320
+ ## 📄 License
337
321
 
338
- ### How to Contribute
322
+ MIT © [Aritra Sarkar](https://github.com/aritra69)
339
323
 
340
- We appreciate all contributions! See the [Contributing](#contributing) section above for guidelines.
324
+ ## 🙏 Acknowledgments
341
325
 
342
- ## Support
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
343
332
 
344
- - Issues: [GitHub Issues](https://github.com/aritra69/deploy-bbc/issues)
345
- - Discussions: [GitHub Discussions](https://github.com/aritra69/deploy-bbc/discussions)
333
+ ## 🔗 Links
346
334
 
347
- ## Acknowledgments
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)
348
338
 
349
- Built with:
339
+ ## ⭐ Show Your Support
350
340
 
351
- - [Bun](https://bun.sh) - Fast all-in-one JavaScript runtime
352
- - [Hono](https://hono.dev) - Ultra-fast web framework
353
- - [Drizzle ORM](https://orm.drizzle.team) - TypeScript ORM
354
- - [Clack](https://github.com/natemoo-re/clack) - Interactive CLI prompts
341
+ Give a ⭐️ if this project helped you!
355
342
 
356
343
  ---
357
344
 
358
- **Star this repository if you find it helpful!**
345
+ **Made with ❤️ by [Aritra Sarkar](https://github.com/aritra69)**