create-charcole 2.1.0 → 2.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.
Files changed (79) hide show
  1. package/.github/workflows/release.yml +26 -26
  2. package/CHANGELOG.md +301 -211
  3. package/LICENSE +21 -21
  4. package/README.md +354 -213
  5. package/bin/index.js +444 -288
  6. package/bin/lib/pkgManager.js +49 -49
  7. package/bin/lib/templateHandler.js +33 -33
  8. package/create-charcole-2.1.0.tgz +0 -0
  9. package/package.json +42 -27
  10. package/packages/swagger/BACKWARD_COMPATIBILITY.md +145 -0
  11. package/packages/swagger/CHANGELOG.md +404 -0
  12. package/packages/swagger/README.md +578 -0
  13. package/packages/swagger/charcole-swagger-1.0.0.tgz +0 -0
  14. package/packages/swagger/package-lock.json +1715 -0
  15. package/packages/swagger/package.json +57 -0
  16. package/packages/swagger/src/helpers.js +427 -0
  17. package/packages/swagger/src/index.d.ts +126 -0
  18. package/packages/swagger/src/index.js +12 -0
  19. package/packages/swagger/src/setup.js +100 -0
  20. package/template/js/.env.example +15 -15
  21. package/template/js/README.md +978 -855
  22. package/template/js/basePackage.json +26 -26
  23. package/template/js/src/app.js +81 -78
  24. package/template/js/src/config/constants.js +20 -20
  25. package/template/js/src/config/env.js +26 -26
  26. package/template/js/src/config/swagger.config.js +15 -0
  27. package/template/js/src/lib/swagger/SWAGGER_GUIDE.md +561 -0
  28. package/template/js/src/middlewares/errorHandler.js +180 -180
  29. package/template/js/src/middlewares/requestLogger.js +33 -33
  30. package/template/js/src/middlewares/validateRequest.js +42 -42
  31. package/template/js/src/modules/auth/auth.constants.js +3 -3
  32. package/template/js/src/modules/auth/auth.controller.js +29 -29
  33. package/template/js/src/modules/auth/auth.middlewares.js +19 -19
  34. package/template/js/src/modules/auth/auth.routes.js +131 -9
  35. package/template/js/src/modules/auth/auth.schemas.js +60 -60
  36. package/template/js/src/modules/auth/auth.service.js +67 -67
  37. package/template/js/src/modules/auth/package.json +6 -6
  38. package/template/js/src/modules/health/controller.js +151 -50
  39. package/template/js/src/modules/swagger/charcole-swagger-1.0.0.tgz +0 -0
  40. package/template/js/src/modules/swagger/package.json +5 -0
  41. package/template/js/src/repositories/user.repo.js +19 -19
  42. package/template/js/src/routes/index.js +25 -25
  43. package/template/js/src/routes/protected.js +57 -13
  44. package/template/js/src/server.js +38 -38
  45. package/template/js/src/utils/AppError.js +182 -182
  46. package/template/js/src/utils/logger.js +73 -73
  47. package/template/js/src/utils/response.js +51 -51
  48. package/template/ts/.env.example +15 -15
  49. package/template/ts/README.md +978 -855
  50. package/template/ts/basePackage.json +36 -36
  51. package/template/ts/build.js +46 -46
  52. package/template/ts/src/app.ts +71 -67
  53. package/template/ts/src/config/constants.ts +27 -27
  54. package/template/ts/src/config/env.ts +40 -40
  55. package/template/ts/src/config/swagger.config.ts +30 -0
  56. package/template/ts/src/lib/swagger/SWAGGER_GUIDE.md +561 -0
  57. package/template/ts/src/middlewares/errorHandler.ts +201 -201
  58. package/template/ts/src/middlewares/requestLogger.ts +38 -38
  59. package/template/ts/src/middlewares/validateRequest.ts +46 -46
  60. package/template/ts/src/modules/auth/auth.constants.ts +6 -6
  61. package/template/ts/src/modules/auth/auth.controller.ts +32 -32
  62. package/template/ts/src/modules/auth/auth.middlewares.ts +46 -46
  63. package/template/ts/src/modules/auth/auth.routes.ts +52 -9
  64. package/template/ts/src/modules/auth/auth.schemas.ts +73 -73
  65. package/template/ts/src/modules/auth/auth.service.ts +106 -106
  66. package/template/ts/src/modules/auth/package.json +10 -10
  67. package/template/ts/src/modules/health/controller.ts +80 -64
  68. package/template/ts/src/modules/swagger/charcole-swagger-1.0.0.tgz +0 -0
  69. package/template/ts/src/modules/swagger/package.json +5 -0
  70. package/template/ts/src/repositories/user.repo.ts +33 -33
  71. package/template/ts/src/routes/index.ts +24 -24
  72. package/template/ts/src/routes/protected.ts +46 -13
  73. package/template/ts/src/server.ts +41 -41
  74. package/template/ts/src/types/express.d.ts +9 -9
  75. package/template/ts/src/utils/AppError.ts +220 -220
  76. package/template/ts/src/utils/logger.ts +55 -55
  77. package/template/ts/src/utils/response.ts +100 -100
  78. package/template/ts/tsconfig.json +26 -26
  79. package/plans/V2_1_PLAN.md +0 -20
package/README.md CHANGED
@@ -1,213 +1,354 @@
1
- # Charcole API v2.1
2
-
3
- > **Charcole v2.1 is a production-grade Node.js backend starter CLI that scaffolds enterprise-ready Express APIs with first-class TypeScript or JavaScript support, centralized error handling, Zod validation, structured logging, optional JWT authentication, and a revolutionary repository pattern for database abstraction.**
4
-
5
- [![Node.js](https://img.shields.io/badge/Node.js-18+-green.svg)](https://nodejs.org/)
6
- [![Express.js](https://img.shields.io/badge/Express-4.18+-blue.svg)](https://expressjs.com/)
7
- [![Zod](https://img.shields.io/badge/Zod-3.22+-purple.svg)](https://zod.dev/)
8
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
9
- [![License: ISC](https://img.shields.io/badge/License-ISC-yellow.svg)](LICENSE)
10
-
11
- ## What's New in v2.1
12
-
13
- ### Revolutionary Repository Pattern
14
-
15
- - **Database abstraction layer** - Switch databases without changing business logic
16
- - **In-memory repository included** - Test APIs instantly without database setup
17
- - **Clean separation** - Business logic stays independent of database implementation
18
- - **Future-proof** - Easy migration between MongoDB, PostgreSQL, MySQL, etc.
19
-
20
- ### Optional JWT Authentication Module
21
-
22
- - **Complete auth system** - Register, login, logout, protected routes
23
- - **JWT-based authentication** - Stateless, scalable token management
24
- - **Password hashing** - Secure bcrypt password handling
25
- - **Ready-to-use** - Production-ready auth APIs out of the box
26
- - **Modular design** - Include/exclude during project creation
27
-
28
- ### Bug Fixes & Improvements
29
-
30
- - **Fixed TypeScript compilation** - Clean builds with proper type definitions
31
- - **Enhanced error handling** - Better error messages and debugging
32
- - **Improved CLI experience** - Smoother project creation flow
33
- - **Better dependency management** - Cleaner package.json merging
34
-
35
- ## Quick Start
36
-
37
- ```bash
38
- # Create your charcole app now (with or without project name)
39
- npx create-charcole@latest my-awesome-api
40
-
41
- # OR (interactive mode)
42
- npx create-charcole@latest
43
-
44
- # Follow prompts to select:
45
- # 1. Language: TypeScript or JavaScript
46
- # 2. JWT Authentication: Yes/No (includes complete auth system)
47
-
48
- # Configure environment
49
- cp .env.example .env
50
-
51
- # Start development server (with auto-reload)
52
- npm run dev
53
-
54
- # OR start production server
55
- npm start
56
- ```
57
-
58
- Server runs on http://localhost:3000 by default.
59
-
60
- ## Repository Pattern: A Game Changer
61
-
62
- ### The Problem
63
-
64
- Traditional apps mix database logic with business logic. Switching databases means rewriting everything.
65
-
66
- ### The Solution
67
-
68
- Charcole v2.1 introduces a Repository Pattern that abstracts database operations:
69
-
70
- ```javascript
71
- // Traditional approach (tightly coupled)
72
- // app.ts
73
- import mongoose from 'mongoose';
74
-
75
- async function getUser(id: string) {
76
-   return await UserModel.findById(id); // Direct MongoDB dependency
77
- }
78
-
79
- // Charcole v2.1 approach (abstracted)
80
- // repositories/user.repo.ts
81
- const users: User[] = [];
82
-
83
- type CreateUserData = {
84
-   email: string;
85
-   name: string;
86
-   passwordHash: string;
87
- };
88
-
89
- export const userRepo = {
90
-   async findByEmail(email: string): Promise<User | undefined> {
91
-     return users.find((u) => u.email === email);
92
-   },
93
-
94
-   async create(data: CreateUserData): Promise<User> {
95
-     const user: User = {
96
-       id: randomUUID(),
97
-       email: data.email,
98
-       name: data.name,
99
-       passwordHash: data.passwordHash,
100
-       role: "user",
101
-       provider: "credentials",
102
-       isEmailVerified: false,
103
-       createdAt: new Date(),
104
-       updatedAt: new Date(),
105
-     };
106
-
107
-     users.push(user);
108
-     return user;
109
-   },
110
- };
111
-
112
- // controller.js
113
- async login(req, res) {
114
-     try {
115
-       const result = await AuthService.login(req.body, req.app.locals.userRepo);
116
-
117
-       res.json(result);
118
-     } catch (err) {
119
-       res.status(401).json({ message: err.message });
120
-     }
121
-   },
122
- ```
123
-
124
- ### Benefits
125
-
126
- - Test instantly - In-memory repository works without database setup
127
-
128
- - Switch databases easily - Change MongoDB to PostgreSQL by updating one file
129
-
130
- - Clean architecture - Business logic stays pure
131
-
132
- - Better testing - Mock repositories for unit tests
133
-
134
- - Future-proof - Adapt to any database technology
135
-
136
- ## JWT Authentication Module (Optional)
137
-
138
- ### What's Included
139
-
140
- When you select "Yes" for authentication during project creation:
141
-
142
- src/modules/auth/
143
- │ ├── auth.controller.ts # Register, login, logout, me endpoints
144
- └── auth.middleware.ts # JWT verification, protected routes
145
- │ └── auth.service.ts # Business logic for authentication
146
- | └── auth.routes.ts # Auth API routes
147
- | └── auth.schemas.ts # Auth API Schemas
148
- | └── auth.constants.ts # Auth API constants
149
-
150
- ### Available Endpoints
151
-
152
- POST /api/auth/register # Create new account
153
- POST /api/auth/login # Get JWT token
154
- GET /api/protected/me # Get current user (protected)
155
-
156
- ## Golder Rules (Updated for v2.1)
157
-
158
- 1. Wrap async handlers with asyncHandler
159
-    `router.get("/users/:id", asyncHandler(async (req, res) => { ... }))`
160
- 2. Throw AppError (never use res.status().json())
161
-    `throw new NotFoundError("User", { id });`
162
- 3. Validate requests with validateRequest
163
-    `router.post("/users", validateRequest(schema), handler);`
164
- 4. Use repositories for database operations
165
-
166
- ```typescript
167
- // Direct database calls
168
- const user = await UserModel.findById(id);
169
-
170
- // Repository pattern
171
- const user = await AuthService.login(req.body, req.app.locals.userRepo);
172
- ```
173
-
174
- ## Why Choose Charcole v2.1?
175
-
176
- ### For Startups
177
-
178
- - Launch faster - Production-ready API in minutes
179
- - Test without DB - In-memory repository for rapid prototyping
180
- - Built-in auth - User management out of the box
181
- - Clean code - Follows best practices from day one
182
-
183
- ### For Enterprises
184
-
185
- - Maintainable - Repository pattern enables easy database migrations
186
- - Scalable - Modular architecture grows with your needs
187
- - Reliable - Battle-tested error handling
188
- - Type-safe - Full TypeScript support reduces bugs
189
-
190
- ### For Developers
191
-
192
- - Learn best practices - Production patterns built-in
193
-
194
- - Easy to extend - Add modules, databases, features
195
-
196
- - Great DX - Excellent error messages and logging
197
-
198
- - Future-proof - Designed for long-term maintenance
199
-
200
- ## 🤝 Contributing
201
-
202
- We welcome contributions! Please:
203
-
204
- 1. Fork the repository, create new branch and raise a pull request. If it fits with the goals of **charcole** we'll merge it
205
- 2. Follow the repository pattern for database operations
206
- 3. Use TypeScript for new features
207
- 4. Include tests with in-memory repositories
208
- 5. Document new modules thoroughly
209
- 6. Update README.md for significant changes
210
-
211
- ## 📄 License
212
-
213
- ISC
1
+ # Charcole API v2.2
2
+
3
+ > **Charcole v2.2 is a production-grade Node.js backend starter CLI that scaffolds enterprise-ready Express APIs with first-class TypeScript or JavaScript support, centralized error handling, Zod validation, structured logging, optional JWT authentication, **auto-generated Swagger documentation**, and a revolutionary repository pattern for database abstraction.**
4
+
5
+ [![Node.js](https://img.shields.io/badge/Node.js-18+-green.svg)](https://nodejs.org/)
6
+ [![Express.js](https://img.shields.io/badge/Express-4.18+-blue.svg)](https://expressjs.com/)
7
+ [![Zod](https://img.shields.io/badge/Zod-3.22+-purple.svg)](https://zod.dev/)
8
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
9
+ [![License: ISC](https://img.shields.io/badge/License-ISC-yellow.svg)](LICENSE)
10
+
11
+ ## What's New in v2.2
12
+
13
+ ### 🎯 Auto-Generated Swagger Documentation (@charcoles/swagger)
14
+
15
+ The game-changing feature that eliminates 60-80% of API documentation overhead:
16
+
17
+ - **Zero schema duplication** - Define Zod schemas once, auto-generate OpenAPI specs
18
+ - **Effortless documentation** - Minimal JSDoc comments with `$ref` to Zod schemas
19
+ - **Built-in response templates** - Common responses (Success, ValidationError, Unauthorized, NotFound) included
20
+ - **Always in sync** - Impossible for docs to drift from validation schemas
21
+ - **Optional module** - Include/exclude during project creation
22
+ - **Framework agnostic** - Works with any Express.js project via `npm install @charcoles/swagger`
23
+
24
+ **Before (76 lines of manual duplication):**
25
+
26
+ ```typescript
27
+ // Zod schema for validation
28
+ const registerSchema = z.object({
29
+ email: z.string().email(),
30
+ password: z.string().min(8),
31
+ });
32
+
33
+ // Manual OpenAPI schema (duplicate!)
34
+ /**
35
+ * @swagger
36
+ * /api/auth/register:
37
+ * post:
38
+ * requestBody:
39
+ * schema:
40
+ * type: object
41
+ * properties:
42
+ * email:
43
+ * type: string
44
+ * format: email
45
+ * password:
46
+ * type: string
47
+ * minLength: 8
48
+ * ... 60 more lines
49
+ */
50
+ ```
51
+
52
+ **After with @charcoles/swagger (20 lines, zero duplication):**
53
+
54
+ ```typescript
55
+ // 1. Register schema once in swagger.config.ts
56
+ setupSwagger(app, {
57
+ schemas: { registerSchema }, // Auto-converted!
58
+ });
59
+
60
+ // 2. Reference in JSDoc
61
+ /**
62
+ * @swagger
63
+ * /api/auth/register:
64
+ * post:
65
+ * summary: Register user
66
+ * requestBody:
67
+ * content:
68
+ * application/json:
69
+ * schema:
70
+ * $ref: '#/components/schemas/registerSchema'
71
+ * responses:
72
+ * 201:
73
+ * $ref: '#/components/responses/Success'
74
+ * 400:
75
+ * $ref: '#/components/responses/ValidationError'
76
+ */
77
+ ```
78
+
79
+ **Result:** Change your Zod schema → Swagger updates automatically! 🎉
80
+
81
+ ### Previous Features (v2.1)
82
+
83
+ #### Revolutionary Repository Pattern
84
+
85
+ - **Database abstraction layer** - Switch databases without changing business logic
86
+ - **In-memory repository included** - Test APIs instantly without database setup
87
+ - **Clean separation** - Business logic stays independent of database implementation
88
+ - **Future-proof** - Easy migration between MongoDB, PostgreSQL, MySQL, etc.
89
+
90
+ #### Optional JWT Authentication Module
91
+
92
+ - **Complete auth system** - Register, login, logout, protected routes
93
+ - **JWT-based authentication** - Stateless, scalable token management
94
+ - **Password hashing** - Secure bcrypt password handling
95
+ - **Ready-to-use** - Production-ready auth APIs out of the box
96
+ - **Modular design** - Include/exclude during project creation
97
+
98
+ ## Quick Start
99
+
100
+ ```bash
101
+ # Create your charcole app now (with or without project name)
102
+ npx create-charcole@latest my-awesome-api
103
+
104
+ # OR (interactive mode)
105
+ npx create-charcole@latest
106
+
107
+ # Follow prompts to select:
108
+ # 1. Language: TypeScript or JavaScript
109
+ # 2. JWT Authentication: Yes/No (includes complete auth system)
110
+ # 3. Swagger Documentation: Yes/No (auto-generated from Zod schemas)
111
+
112
+ # Configure environment
113
+ cp .env.example .env
114
+
115
+ # Start development server (with auto-reload)
116
+ npm run dev
117
+
118
+ # Visit Swagger UI (if swagger enabled)
119
+ # http://localhost:3000/api-docs
120
+
121
+ # OR start production server
122
+ npm start
123
+ ```
124
+
125
+ Server runs on http://localhost:3000 by default.
126
+
127
+ ## Swagger Documentation (New in v2.2)
128
+
129
+ ### The Problem
130
+
131
+ Traditional API documentation requires writing the same schema twice:
132
+
133
+ 1. Once in Zod for validation
134
+ 2. Again in OpenAPI/Swagger YAML
135
+
136
+ This leads to:
137
+
138
+ - Massive duplication (76+ lines per endpoint)
139
+ - ❌ Out-of-sync documentation
140
+ - High maintenance burden
141
+
142
+ ### The Solution
143
+
144
+ @charcoles/swagger automatically converts your Zod schemas to OpenAPI:
145
+
146
+ ```typescript
147
+ // Before: Register schema in swagger.config.ts
148
+ import { registerSchema, loginSchema } from "./schemas";
149
+
150
+ setupSwagger(app, {
151
+ schemas: {
152
+ registerSchema, // Auto-converted to OpenAPI!
153
+ loginSchema,
154
+ },
155
+ });
156
+
157
+ // After: Use $ref everywhere
158
+ /**
159
+ * @swagger
160
+ * schema:
161
+ * $ref: '#/components/schemas/registerSchema'
162
+ */
163
+ ```
164
+
165
+ ### Benefits
166
+
167
+ | Aspect | Before | After | Improvement |
168
+ | ---------------------- | --------------- | -------------- | ------------------ |
169
+ | **Lines per endpoint** | 45-76 lines | 10-20 lines | **60-75% less** |
170
+ | **Schema duplication** | 100% | 0% | **Eliminated** |
171
+ | **Maintenance** | Update 2 places | Update 1 place | **50% less work** |
172
+ | **Sync issues** | Common | Impossible | **Always in sync** |
173
+
174
+ **See complete guide:** `src/lib/swagger/SWAGGER_GUIDE.md` (when swagger is enabled)
175
+
176
+ ## Repository Pattern: A Game Changer
177
+
178
+ ### The Problem
179
+
180
+ Traditional apps mix database logic with business logic. Switching databases means rewriting everything.
181
+
182
+ ### The Solution
183
+
184
+ Charcole introduces a Repository Pattern that abstracts database operations:
185
+
186
+ ```javascript
187
+ // Traditional approach (tightly coupled)
188
+ // app.ts
189
+ import mongoose from 'mongoose';
190
+
191
+ async function getUser(id: string) {
192
+ return await UserModel.findById(id); // Direct MongoDB dependency
193
+ }
194
+
195
+ // Charcole v2.2 approach (abstracted)
196
+ // repositories/user.repo.ts
197
+ const users: User[] = [];
198
+
199
+ type CreateUserData = {
200
+ email: string;
201
+ name: string;
202
+ passwordHash: string;
203
+ };
204
+
205
+ export const userRepo = {
206
+ async findByEmail(email: string): Promise<User | undefined> {
207
+ return users.find((u) => u.email === email);
208
+ },
209
+
210
+ async create(data: CreateUserData): Promise<User> {
211
+ const user: User = {
212
+ id: randomUUID(),
213
+ email: data.email,
214
+ name: data.name,
215
+ passwordHash: data.passwordHash,
216
+ role: "user",
217
+ provider: "credentials",
218
+ isEmailVerified: false,
219
+ createdAt: new Date(),
220
+ updatedAt: new Date(),
221
+ };
222
+
223
+ users.push(user);
224
+ return user;
225
+ },
226
+ };
227
+
228
+ // controller.js
229
+ async login(req, res) {
230
+ try {
231
+ const result = await AuthService.login(req.body, req.app.locals.userRepo);
232
+
233
+ res.json(result);
234
+ } catch (err) {
235
+ res.status(401).json({ message: err.message });
236
+ }
237
+ },
238
+ ```
239
+
240
+ ### Benefits
241
+
242
+ - ✅ Test instantly - In-memory repository works without database setup
243
+ - ✅ Switch databases easily - Change MongoDB to PostgreSQL by updating one file
244
+ - ✅ Clean architecture - Business logic stays pure
245
+ - ✅ Better testing - Mock repositories for unit tests
246
+ - ✅ Future-proof - Adapt to any database technology
247
+
248
+ ## JWT Authentication Module (Optional)
249
+
250
+ ### What's Included
251
+
252
+ When you select "Yes" for authentication during project creation:
253
+
254
+ ```
255
+ src/modules/auth/
256
+ │ ├── auth.controller.ts # Register, login, logout, me endpoints
257
+ │ ├── auth.middleware.ts # JWT verification, protected routes
258
+ │ ├── auth.service.ts # Business logic for authentication
259
+ │ ├── auth.routes.ts # Auth API routes
260
+ │ ├── auth.schemas.ts # Auth API Schemas (auto-documented if Swagger enabled!)
261
+ │ └── auth.constants.ts # Auth API constants
262
+ ```
263
+
264
+ ### Available Endpoints
265
+
266
+ ```
267
+ POST /api/auth/register # Create new account
268
+ POST /api/auth/login # Get JWT token
269
+ GET /api/protected/me # Get current user (protected)
270
+ ```
271
+
272
+ ## Golden Rules (Updated for v2.2)
273
+
274
+ 1. **Wrap async handlers with asyncHandler**
275
+
276
+ ```typescript
277
+ router.get("/users/:id", asyncHandler(async (req, res) => { ... }))
278
+ ```
279
+
280
+ 2. **Throw AppError (never use res.status().json())**
281
+
282
+ ```typescript
283
+ throw new NotFoundError("User", { id });
284
+ ```
285
+
286
+ 3. **Validate requests with validateRequest**
287
+
288
+ ```typescript
289
+ router.post("/users", validateRequest(schema), handler);
290
+ ```
291
+
292
+ 4. **Use repositories for database operations**
293
+
294
+ ```typescript
295
+ // ❌ Direct database calls
296
+ const user = await UserModel.findById(id);
297
+
298
+ // ✅ Repository pattern
299
+ const user = await AuthService.login(req.body, req.app.locals.userRepo);
300
+ ```
301
+
302
+ 5. **Define schemas once in Zod (if Swagger enabled)**
303
+
304
+ ```typescript
305
+ // ✅ Single source of truth
306
+ const userSchema = z.object({ ... });
307
+
308
+ // Register in swagger.config.ts
309
+ setupSwagger(app, { schemas: { userSchema } });
310
+
311
+ // ❌ Never duplicate in JSDoc
312
+ ```
313
+
314
+ ## Why Choose Charcole v2.2?
315
+
316
+ ### For Startups
317
+
318
+ - **Launch faster** - Production-ready API with auto-generated docs in minutes
319
+ - **Test without DB** - In-memory repository for rapid prototyping
320
+ - **Built-in auth** - User management out of the box
321
+ - **Clean code** - Follows best practices from day one
322
+ - **Free documentation** - Swagger UI generated automatically
323
+
324
+ ### For Enterprises
325
+
326
+ - **Maintainable** - Repository pattern enables easy database migrations
327
+ - **Scalable** - Modular architecture grows with your needs
328
+ - **Reliable** - Battle-tested error handling
329
+ - **Type-safe** - Full TypeScript support reduces bugs
330
+ - **Always in sync** - Documentation can't get outdated
331
+
332
+ ### For Developers
333
+
334
+ - **Learn best practices** - Production patterns built-in
335
+ - **Effortless docs** - 60-80% less documentation work
336
+ - **Easy to extend** - Add modules, databases, features
337
+ - **Great DX** - Excellent error messages and logging
338
+ - **Future-proof** - Designed for long-term maintenance
339
+
340
+ ## 🤝 Contributing
341
+
342
+ We welcome contributions! Please:
343
+
344
+ 1. Fork the repository, create new branch and raise a pull request. If it fits with the goals of **charcole** we'll merge it
345
+ 2. Follow the repository pattern for database operations
346
+ 3. Use TypeScript for new features
347
+ 4. Include tests with in-memory repositories
348
+ 5. Document new modules thoroughly
349
+ 6. Update README.md for significant changes
350
+ 7. If adding Swagger docs, use Zod schemas as single source of truth
351
+
352
+ ## 📄 License
353
+
354
+ ISC