crypt-express-app 1.3.20

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 ADDED
@@ -0,0 +1,329 @@
1
+ # crypt-express-app
2
+
3
+ πŸš€ A production-ready Express + TypeScript backend starter CLI with Prisma, Redis, i18n, Swagger, Docker, and scalable modular architecture.
4
+
5
+ ---
6
+
7
+ ## ✨ What is crypt-express-app?
8
+
9
+ `crypt-express-app` is a CLI tool that instantly scaffolds a fully structured, enterprise-grade Express backend application.
10
+
11
+ It generates:
12
+
13
+ - Express + TypeScript setup
14
+ - Prisma ORM configuration
15
+ - PostgreSQL + Redis Docker setup
16
+ - Swagger documentation
17
+ - i18next internationalization
18
+ - Modular folder architecture
19
+ - Logger + Error handling middleware
20
+ - Environment configuration
21
+ - Ready-to-run Docker Compose stack
22
+
23
+ This tool is built for developers who want a clean, scalable backend architecture in seconds.
24
+
25
+ ---
26
+
27
+ # πŸ“¦ Installation
28
+
29
+ You don’t install it globally.
30
+
31
+ Use directly with npx:
32
+
33
+ ```bash
34
+ npx crypt-express-app my-project
35
+ ```
36
+
37
+ Or inside current directory:
38
+
39
+ ```bash
40
+ npx crypt-express-app .
41
+ ```
42
+
43
+ ---
44
+
45
+ # 🧠 What It Generates
46
+
47
+ After running the CLI, your project will include:
48
+
49
+ ```
50
+ my-project/
51
+ β”‚
52
+ β”œβ”€β”€ src/
53
+ β”‚ β”œβ”€β”€ app.ts
54
+ β”‚ β”œβ”€β”€ routes.ts
55
+ β”‚ β”œβ”€β”€ prisma/
56
+ β”‚ β”‚ └── client.ts
57
+ β”‚ β”œβ”€β”€ utils/
58
+ β”‚ β”œβ”€β”€ middlewares/
59
+ β”‚ β”œβ”€β”€ locales/
60
+ β”‚ └── modules/
61
+ β”‚
62
+ β”œβ”€β”€ prisma/
63
+ β”‚ └── schema.prisma
64
+ β”œβ”€β”€ server.ts
65
+ β”œβ”€β”€ .env
66
+ β”œβ”€β”€ .env.dev
67
+ β”œβ”€β”€ .env.prod
68
+ β”œβ”€β”€ example.env
69
+ β”œβ”€β”€ Dockerfile
70
+ β”œβ”€β”€ docker-compose.yml
71
+ β”œβ”€β”€ tsconfig.json
72
+ └── package.json
73
+ ```
74
+
75
+ ---
76
+
77
+ # πŸ”₯ Features
78
+
79
+ ## βœ… Express + TypeScript
80
+ - Clean app architecture
81
+ - Modular routing system
82
+ - Centralized error handling
83
+ - Logger middleware
84
+
85
+ ## βœ… Prisma ORM
86
+ - PostgreSQL configuration
87
+ - Auto Prisma client setup
88
+ - prisma.config.ts support
89
+
90
+ ## βœ… Redis Cache
91
+ - Redis service container
92
+ - Cache service wrapper
93
+ - TTL-based caching support
94
+
95
+ ## βœ… Internationalization (i18n)
96
+ - English + Bengali support
97
+ - Language detection
98
+ - JSON-based translations
99
+
100
+ ## βœ… Swagger API Docs
101
+ - OpenAPI 3.0 setup
102
+ - Bearer auth support
103
+ - Persist authorization enabled
104
+
105
+ Access at:
106
+
107
+ ```
108
+ http://localhost:3000/api/docs
109
+ ```
110
+
111
+ ## βœ… Docker Ready
112
+ - Node service container
113
+ - PostgreSQL container
114
+ - Redis container
115
+ - Volume persistence
116
+ - Production-ready configuration
117
+
118
+ ---
119
+
120
+ # πŸš€ Quick Start
121
+
122
+ After project generation:
123
+
124
+ ```bash
125
+ cd my-project
126
+ ```
127
+
128
+ Start infrastructure:
129
+
130
+ ```bash
131
+ docker compose up -d postgres redis
132
+ ```
133
+
134
+ Generate Prisma client:
135
+
136
+ ```bash
137
+ npx prisma generate
138
+ ```
139
+
140
+ Run development server:
141
+
142
+ ```bash
143
+ pnpm dev
144
+ ```
145
+
146
+ Or build and run:
147
+
148
+ ```bash
149
+ pnpm build
150
+ pnpm start
151
+ ```
152
+
153
+ ---
154
+
155
+ # 🌍 Environment Variables
156
+
157
+ Default `.env`:
158
+
159
+ ```
160
+ PORT=3000
161
+ DATABASE_URL=postgresql://postgres:postgres@localhost:5432/app_db
162
+ IAM_REDIS_URL=redis://localhost:6379
163
+ ```
164
+
165
+ For Docker (`.env.dev`):
166
+
167
+ ```
168
+ DATABASE_URL=postgresql://postgres:postgres@postgres:5432/app_db
169
+ IAM_REDIS_URL=redis://redis:6379
170
+ ```
171
+
172
+ ---
173
+
174
+ # 🐳 Docker Usage
175
+
176
+ Start everything:
177
+
178
+ ```bash
179
+ docker compose up --build
180
+ ```
181
+
182
+ Only database + redis:
183
+
184
+ ```bash
185
+ docker compose up -d postgres redis
186
+ ```
187
+
188
+ Stop:
189
+
190
+ ```bash
191
+ docker compose down
192
+ ```
193
+
194
+ ---
195
+
196
+ # 🧩 Architecture Philosophy
197
+
198
+ crypt-express-app follows a clean separation:
199
+
200
+ - `app.ts` β†’ Express configuration
201
+ - `routes.ts` β†’ Route registration
202
+ - `modules/` β†’ Feature modules
203
+ - `utils/` β†’ Shared services
204
+ - `middlewares/` β†’ Cross-cutting concerns
205
+ - `prisma/` β†’ Database client layer
206
+
207
+ This makes scaling large backend systems easier.
208
+
209
+ ---
210
+
211
+ # πŸ“Œ CLI Behavior
212
+
213
+ If project name contains spaces:
214
+
215
+ ```
216
+ "My App Project"
217
+ ```
218
+
219
+ It auto converts to:
220
+
221
+ ```
222
+ my-app-project
223
+ ```
224
+
225
+ ---
226
+
227
+ # πŸ›  Scripts
228
+
229
+ Generated project includes:
230
+
231
+ ```json
232
+ "dev": "nodemon",
233
+ "build": "tsc && npm run copy-locales",
234
+ "start": "node dist/server.js"
235
+ ```
236
+
237
+ ---
238
+
239
+ # πŸ“š Requirements
240
+
241
+ - Node.js 18+
242
+ - pnpm or npm
243
+ - Docker (optional but recommended)
244
+ - PostgreSQL
245
+ - Redis
246
+
247
+ ---
248
+
249
+ # πŸ” Production Ready
250
+
251
+ This starter includes:
252
+
253
+ - Structured logging
254
+ - Error middleware
255
+ - Swagger security
256
+ - Environment separation
257
+ - Docker orchestration
258
+ - Prisma adapter configuration
259
+
260
+ You can safely use this as a base for:
261
+
262
+ - SaaS backend
263
+ - Microservices
264
+ - Enterprise REST APIs
265
+ - Auth servers
266
+ - Admin panels
267
+
268
+ ---
269
+
270
+ # 🀝 Contributing
271
+
272
+ Pull requests are welcome.
273
+
274
+ 1. Fork repository
275
+ 2. Create feature branch
276
+ 3. Submit PR
277
+
278
+ ---
279
+
280
+ # πŸ“„ License
281
+
282
+ ISC
283
+
284
+ ---
285
+
286
+ # πŸ‘¨β€πŸ’» Author
287
+
288
+ Abir Hosen
289
+
290
+ ---
291
+
292
+ # ⭐ Why crypt-express-app?
293
+
294
+ Because setting up backend boilerplate repeatedly is painful.
295
+
296
+ crypt-express-app removes:
297
+
298
+ - Folder setup time
299
+ - Docker setup time
300
+ - Prisma configuration time
301
+ - Redis setup time
302
+ - Swagger configuration time
303
+ - i18n wiring time
304
+
305
+ Start coding business logic immediately.
306
+
307
+ ---
308
+
309
+ # πŸš€ Future Roadmap
310
+
311
+ - Auth module generator
312
+ - Role-based access control
313
+ - GraphQL support
314
+ - Microservice mode
315
+ - CLI flags support
316
+ - Health check system
317
+ - CI/CD template
318
+
319
+ ---
320
+
321
+ Enjoy building scalable backends πŸš€
322
+
323
+
324
+ ## πŸ”— Links
325
+
326
+ - 🌐 Website: [Cryptdox](https://cryptdox.com)
327
+ - πŸ“¦ NPM Package: [crypt-express-app](https://www.npmjs.com/package/crypt-express-app)
328
+ - πŸ‘€ Portfolio: [abir.cryptdox.com](http://abir.cryptdox.com)
329
+ - πŸ“§ Email: abir71.hosen@gmail.com