deploy-bbc 1.2.0 → 1.2.1

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/.cspell.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "version": "0.2",
3
+ "language": "en",
4
+ "words": [
5
+ "Aritra",
6
+ "Sarkar",
7
+ "aritra",
8
+ "bunx",
9
+ "hono",
10
+ "drizzle",
11
+ "bullmq",
12
+ "inngest",
13
+ "upstash",
14
+ "logtail",
15
+ "resend",
16
+ "sendgrid",
17
+ "nodemailer",
18
+ "socketio",
19
+ "vitest",
20
+ "postgres",
21
+ "mongodb",
22
+ "redis",
23
+ "Cloudflare",
24
+ "openai",
25
+ "anthropic",
26
+ "gemini",
27
+ "vercel",
28
+ "clack",
29
+ "natemoo"
30
+ ],
31
+ "ignorePaths": [
32
+ "node_modules",
33
+ "dist",
34
+ "build",
35
+ "*.min.js",
36
+ ".git"
37
+ ]
38
+ }
package/README.md CHANGED
@@ -0,0 +1,358 @@
1
+ # deploy-bbc
2
+
3
+ > A powerful CLI tool to bootstrap production-ready backend applications with Bun
4
+
5
+ ## Overview
6
+
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
+
9
+ ## Features
10
+
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
20
+
21
+ ```bash
22
+ # Using npx (recommended)
23
+ npx deploy-bbc my-backend
24
+
25
+ # Using bun
26
+ bunx deploy-bbc my-backend
27
+
28
+ # Using npm
29
+ npm create backend-app my-backend
30
+ ```
31
+
32
+ Follow the interactive prompts to select your framework and integrations.
33
+
34
+ ## Installation
35
+
36
+ ### As a CLI Tool
37
+
38
+ ```bash
39
+ # Install globally
40
+ npm install -g deploy-bbc
41
+
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
61
+ ```
62
+
63
+ ## Usage
64
+
65
+ ### Interactive Mode
66
+
67
+ Simply run the CLI and answer the prompts:
68
+
69
+ ```bash
70
+ deploy-bbc my-backend
71
+ ```
72
+
73
+ You'll be prompted to:
74
+
75
+ 1. Choose a framework (Hono, Express, or Bun Native)
76
+ 2. Select integrations (databases, auth, AI services, etc.)
77
+ 3. Configure additional options
78
+
79
+ ### CLI Flags
80
+
81
+ ```bash
82
+ deploy-bbc my-backend [options]
83
+ ```
84
+
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
145
+
146
+ ```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
158
+ ```
159
+
160
+ ## Framework Options
161
+
162
+ ### Hono (Default)
163
+
164
+ Ultra-fast web framework optimized for Bun and edge runtimes. Lightweight and type-safe.
165
+
166
+ ### Express
167
+
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.
173
+
174
+ ## Available Integrations
175
+
176
+ ### 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
182
+
183
+ ### 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
202
+
203
+ ### 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
210
+
211
+ ### 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
218
+
219
+ ### Developer Experience
220
+
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
226
+
227
+ ## Project Structure
228
+
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
247
+ ```
248
+
249
+ ## Development
250
+
251
+ ### Prerequisites
252
+
253
+ - Node.js >= 18.0.0
254
+ - Bun >= 1.0.0 (recommended)
255
+
256
+ ### Commands
257
+
258
+ ```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
267
+
268
+ # Lint code
269
+ bun run lint
270
+
271
+ # Format code
272
+ bun run format
273
+ ```
274
+
275
+ ### Contributing
276
+
277
+ We welcome contributions! Please follow these steps:
278
+
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
285
+
286
+ #### Coding Conventions
287
+
288
+ This project follows specific naming conventions:
289
+
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`
295
+
296
+ See `CLAUDE.md` for complete guidelines.
297
+
298
+ ## Docker Support
299
+
300
+ Every generated project includes Docker configuration:
301
+
302
+ ```bash
303
+ # Build and run with Docker Compose
304
+ docker-compose up
305
+
306
+ # Build Docker image
307
+ docker build -t my-backend .
308
+
309
+ # Run container
310
+ docker run -p 8000:8000 my-backend
311
+ ```
312
+
313
+ ## Environment Variables
314
+
315
+ Each integration adds its required environment variables to `.env.example`. Copy it to `.env` and fill in your values:
316
+
317
+ ```bash
318
+ cp .env.example .env
319
+ ```
320
+
321
+ ## License
322
+
323
+ MIT License - see LICENSE file for details
324
+
325
+ ## Author
326
+
327
+ ### Aritra Sarkar
328
+
329
+ - GitHub: [@aritra69](https://github.com/aritra69)
330
+ - Email: <aritrasarkar2002@gmail.com>
331
+
332
+ ## Contributors
333
+
334
+ This project exists thanks to all the people who contribute.
335
+
336
+ [![Contributors](https://contrib.rocks/image?repo=aritra69/deploy-bbc)](https://github.com/aritra69/deploy-bbc/graphs/contributors)
337
+
338
+ ### How to Contribute
339
+
340
+ We appreciate all contributions! See the [Contributing](#contributing) section above for guidelines.
341
+
342
+ ## Support
343
+
344
+ - Issues: [GitHub Issues](https://github.com/aritra69/deploy-bbc/issues)
345
+ - Discussions: [GitHub Discussions](https://github.com/aritra69/deploy-bbc/discussions)
346
+
347
+ ## Acknowledgments
348
+
349
+ Built with:
350
+
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
355
+
356
+ ---
357
+
358
+ **Star this repository if you find it helpful!**
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deploy-bbc",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "CLI to bootstrap production-ready backends with Bun (Best Backend Code)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,7 +33,7 @@ services:
33
33
  composeContent += ` app:
34
34
  build: .
35
35
  ports:
36
- - "3000:3000"
36
+ - "8000:8000"
37
37
  environment:
38
38
  - NODE_ENV=production
39
39
  env_file:
@@ -34,7 +34,7 @@ COPY --from=dependencies /app/node_modules ./node_modules
34
34
  COPY --from=build /app .
35
35
 
36
36
  # Expose port
37
- EXPOSE 3000
37
+ EXPOSE 8000
38
38
 
39
39
  # Run the application
40
40
  CMD ["bun", "run", "src/index.ts"]
@@ -77,7 +77,7 @@ export function log_next_steps(
77
77
  packages.includes(AvailablePackages.scalar)
78
78
  ) {
79
79
  console.log(
80
- chalk.bold("📚 API Documentation:") + " http://localhost:3000/docs"
80
+ chalk.bold("📚 API Documentation:") + " http://localhost:8000/docs"
81
81
  );
82
82
  console.log();
83
83
  }
@@ -76,7 +76,7 @@ async function install_oauth(projectDir: string): Promise<void> {
76
76
 
77
77
  await append_env_example(
78
78
  projectDir,
79
- "\n# OAuth Configuration\nOAUTH_CLIENT_ID=your-client-id\nOAUTH_CLIENT_SECRET=your-client-secret\nOAUTH_CALLBACK_URL=http://localhost:3000/auth/callback\n"
79
+ "\n# OAuth Configuration\nOAUTH_CLIENT_ID=your-client-id\nOAUTH_CLIENT_SECRET=your-client-secret\nOAUTH_CALLBACK_URL=http://localhost:8000/auth/callback\n"
80
80
  );
81
81
  }
82
82
 
@@ -1,3 +1,3 @@
1
1
  # Server Configuration
2
- PORT=3000
2
+ PORT=8000
3
3
  NODE_ENV=development
@@ -3,6 +3,6 @@ import { load_env } from "../utils/env.js";
3
3
  load_env();
4
4
 
5
5
  export const config = {
6
- port: parseInt(process.env.PORT || "3000", 10),
6
+ port: parseInt(process.env.PORT || "8000", 10),
7
7
  nodeEnv: process.env.NODE_ENV || "development",
8
8
  } as const;
@@ -1,3 +1,3 @@
1
1
  # Server Configuration
2
- PORT=3000
2
+ PORT=8000
3
3
  NODE_ENV=development
@@ -3,6 +3,6 @@ import { load_env } from "../utils/env.js";
3
3
  load_env();
4
4
 
5
5
  export const config = {
6
- port: parseInt(process.env.PORT || "3000", 10),
6
+ port: parseInt(process.env.PORT || "8000", 10),
7
7
  nodeEnv: process.env.NODE_ENV || "development",
8
8
  } as const;
@@ -1,3 +1,3 @@
1
1
  # Server Configuration
2
- PORT=3000
2
+ PORT=8000
3
3
  NODE_ENV=development
@@ -3,6 +3,6 @@ import { load_env } from "../utils/env.js";
3
3
  load_env();
4
4
 
5
5
  export const config = {
6
- port: parseInt(process.env.PORT || "3000", 10),
6
+ port: parseInt(process.env.PORT || "8000", 10),
7
7
  nodeEnv: process.env.NODE_ENV || "development",
8
8
  } as const;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deploy-bbc",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "CLI to bootstrap production-ready backends with Bun (Best Backend Code)",
5
5
  "workspaces": [
6
6
  "cli"