Skip to content

Commit 4dc76ad

Browse files
feat: add enterprise features
BREAKING CHANGE: v2.0.0 release
1 parent 9d888e4 commit 4dc76ad

File tree

127 files changed

+10503
-8810
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+10503
-8810
lines changed

CHANGELOG.md

Lines changed: 227 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,213 @@
1-
## [1.2.1](https://github.com/Dushyant-Khoda/tryappstack-cli/compare/v1.2.0...v1.2.1) (2026-03-05)
1+
# Changelog
22

3+
All notable changes to this project are documented in this file.
34

4-
### Bug Fixes
5+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
56

6-
* publish to npm registry instead of github registry ([ce40a7c](https://github.com/Dushyant-Khoda/tryappstack-cli/commit/ce40a7c79d4934f73646d77c6a0cbc0267a3dfd1))
7+
---
78

8-
# [1.2.0](https://github.com/Dushyant-Khoda/tryappstack-cli/compare/v1.1.0...v1.2.0) (2026-03-05)
9+
## [2.0.0] - 2026-03-24
910

11+
### Major Release
1012

11-
### Features
13+
This release overhauls both the `node-mongo-ts` and `node-mongo-js` templates. It adds TypeScript-first patterns, structured logging, Redis caching, Docker multi-stage builds, CI/CD, database seeders, and project-level documentation.
1214

13-
* test npm publish ([0c630c6](https://github.com/Dushyant-Khoda/tryappstack-cli/commit/0c630c6f55aab51363e2158ed44ac6fc1c798a56))
15+
---
1416

15-
# [1.1.0](https://github.com/Dushyant-Khoda/tryappstack-cli/compare/v1.0.5...v1.1.0) (2026-03-05)
17+
### Added — TypeScript Template (node-mongo-ts)
18+
19+
#### TypeScript
20+
- ✅ Path aliases (`@/`) via `tsconfig-paths` and `tsc-alias`
21+
- ✅ DTOs using `class-validator` and `class-transformer`
22+
- ✅ Generics, Utility Types, Discriminated Unions, Type Guards
23+
- ✅ Strict type checking across the project
24+
- ✅ Type-safe environment variable validation
25+
26+
#### Logging and Observability
27+
- ✅ Structured logging with Pino (JSON in production, pretty-print in dev)
28+
- ✅ Correlation IDs for distributed request tracing
29+
- ✅ Request logging middleware with duration tracking
30+
31+
#### Caching
32+
- ✅ Redis caching layer using `ioredis`
33+
- ✅ Type-safe cache service with TTL support
34+
- ✅ Graceful fallback when Redis is unavailable
35+
- ✅ Response compression middleware
36+
37+
#### Health Checks
38+
-`/health/liveness` — Kubernetes liveness probe
39+
-`/health/readiness` — Readiness probe with DB and cache checks
40+
-`/health` — System metrics (uptime, memory, connection status)
41+
42+
#### Database Seeders
43+
- ✅ Seeder infrastructure with idempotent design
44+
- ✅ User seeder with hashed passwords
45+
-`npm run db:seed` command
46+
47+
#### DevOps and CI/CD
48+
- ✅ Multi-stage Docker builds (~100MB images)
49+
- ✅ Docker Compose with MongoDB, Redis, and Mongo Express
50+
- ✅ GitHub Actions pipeline (lint, typecheck, build, security scan)
51+
- ✅ Husky + lint-staged for pre-commit hooks
52+
- ✅ Commitlint for conventional commits
53+
- ✅ Container health checks
54+
- ✅ Non-root Docker user
55+
56+
#### API Documentation
57+
- ✅ Swagger/OpenAPI configuration
58+
- ✅ Auto-generated API docs
59+
- ✅ Type-safe schemas and examples
60+
61+
#### Graceful Shutdown
62+
- ✅ Signal handling (SIGTERM, SIGINT)
63+
- ✅ Connection draining
64+
- ✅ Clean database and cache disconnection
65+
- ✅ 30-second timeout safeguard
66+
67+
#### Project Documentation
68+
-`SKILLS.md` — Coding standards and patterns
69+
-`SEEDERS.md` — Database seeding guide
70+
-`CONTRIBUTING.md` — Development workflow and standards
71+
-`ARCHITECTURE.md` — System architecture overview
72+
-`TYPESCRIPT_GUIDE.md` — TypeScript patterns and practices
1673

74+
---
1775

18-
### Features
76+
### Added — JavaScript Template (node-mongo-js)
77+
78+
#### Infrastructure
79+
- ✅ Structured logging with Pino
80+
- ✅ Redis caching using `ioredis`
81+
- ✅ Response compression middleware
82+
- ✅ Standardized HTTP status codes
83+
84+
#### Database Seeders
85+
- ✅ ES6+ seeder infrastructure
86+
- ✅ User seeder with bcrypt hashing
87+
-`npm run db:seed` command
88+
89+
#### DevOps and CI/CD
90+
- ✅ Multi-stage Docker builds
91+
- ✅ Docker Compose with MongoDB + Redis
92+
- ✅ GitHub Actions CI/CD pipeline
93+
- ✅ Husky + lint-staged
94+
- ✅ Commitlint for conventional commits
95+
96+
#### Project Documentation
97+
-`SKILLS.md` — JavaScript/ES6+ coding standards
98+
-`SEEDERS.md` — Database seeding guide
99+
-`CONTRIBUTING.md` — Development workflow
100+
101+
---
102+
103+
### Dependencies Added
104+
105+
#### Both Templates
106+
- `compression` — Response compression
107+
- `http-status-codes` — Standardized HTTP status codes
108+
- `ioredis` — Redis client
109+
- `nanoid` — Unique ID generation
110+
- `pino`, `pino-http`, `pino-pretty` — Structured logging
111+
- `@commitlint/cli`, `@commitlint/config-conventional` — Commit message validation
112+
- `husky` — Git hooks
113+
- `lint-staged` — Pre-commit formatting
114+
- `eslint-plugin-import` — Import order linting
115+
116+
#### TypeScript Template Only
117+
- `class-validator` — DTO validation
118+
- `class-transformer` — DTO transformation
119+
- `reflect-metadata` — Decorator metadata
120+
- `tsconfig-paths` — Path alias resolution (runtime)
121+
- `tsc-alias` — Path alias resolution (build time)
122+
123+
---
124+
125+
### Changed
126+
127+
#### Package Scripts
128+
- Added `db:seed` — Run database seeders
129+
- Added `prepare` — Set up git hooks
130+
- Added `docker:build` — Build Docker image
131+
- Added `docker:run` — Start containers
132+
- Added `docker:stop` — Stop containers
133+
- Added `typecheck` — Run TypeScript type checking (TS template)
134+
135+
#### Docker Configuration
136+
- Switched to multi-stage builds for smaller images
137+
- Added container health checks
138+
- Added Redis service
139+
- Added Mongo Express for development use
140+
- Containers now run as non-root users
141+
142+
#### Project Structure
143+
- Added `src/database/seeders/`
144+
- Added `src/dtos/` (TS template)
145+
- Added `src/services/CacheService.ts` (TS template)
146+
- Added `src/utils/logger.util.ts` (TS template)
147+
- Added `src/utils/gracefulShutdown.ts` (TS template)
148+
- Added `.github/workflows/` for CI/CD
149+
- Added `.husky/` for git hooks
150+
151+
---
152+
153+
### Security
154+
- ✅ Environment variable validation at startup
155+
- ✅ Type-safe environment access
156+
- ✅ Non-root Docker users
157+
- ✅ Security headers via Helmet
158+
- ✅ Input validation with DTOs (TS) / Joi (JS)
159+
- ✅ Password hashing in seeders
160+
- ✅ Per-IP/user rate limiting
161+
162+
---
163+
164+
### Breaking Changes
165+
166+
None. This is a new major version, but all changes are additive. Existing projects can adopt new features incrementally.
167+
168+
---
19169

20-
* **docker:** rename dockerignore during init and add docs guide ([8143b41](https://github.com/Dushyant-Khoda/tryappstack-cli/commit/8143b411dc3da03bcb4920bdc29936673c9be1c5))
170+
### Migration Guide
21171

22-
# 1.0.0 (2026-03-05)
172+
For existing users:
23173

174+
1. Install new dependencies: `npm install`
175+
2. Set up git hooks: `npm run prepare`
176+
3. Review new docs: `SKILLS.md`, `SEEDERS.md`, `CONTRIBUTING.md`
177+
4. Optionally adopt seeders, caching, and structured logging
178+
5. Optionally update your Docker setup with the new multi-stage builds
179+
180+
---
181+
182+
### Acknowledgments
183+
184+
Conventions and patterns in this release are influenced by practices at Vercel, Linear, GitHub, and Google.
185+
186+
---
187+
188+
## [1.2.1](https://github.com/Dushyant-Khoda/tryappstack-cli/compare/v1.2.0...v1.2.1) (2026-03-05)
189+
190+
### Bug Fixes
191+
192+
* Publish to npm registry instead of GitHub registry ([ce40a7c](https://github.com/Dushyant-Khoda/tryappstack-cli/commit/ce40a7c79d4934f73646d77c6a0cbc0267a3dfd1))
193+
194+
## [1.2.0](https://github.com/Dushyant-Khoda/tryappstack-cli/compare/v1.1.0...v1.2.0) (2026-03-05)
24195

25196
### Features
26197

27-
* enhance Node.js MongoDB template with authentication, testing, Docker, CI/CD, and update CLI commands to support new features. ([3dd6783](https://github.com/Dushyant-Khoda/tryappstack-cli/commit/3dd678356d54e7dbf960fc86a8b11bc4c5246aa6))
198+
* Test npm publish ([0c630c6](https://github.com/Dushyant-Khoda/tryappstack-cli/commit/0c630c6f55aab51363e2158ed44ac6fc1c798a56))
28199

29-
# Changelog
200+
## [1.1.0](https://github.com/Dushyant-Khoda/tryappstack-cli/compare/v1.0.5...v1.1.0) (2026-03-05)
30201

31-
All notable changes to this project are documented in this file.
202+
### Features
32203

33-
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
204+
* **docker:** Rename dockerignore during init and add docs guide ([8143b41](https://github.com/Dushyant-Khoda/tryappstack-cli/commit/8143b411dc3da03bcb4920bdc29936673c9be1c5))
205+
206+
## 1.0.0 (2026-03-05)
207+
208+
### Features
209+
210+
* Add Node.js MongoDB template with authentication, testing, Docker, CI/CD, and updated CLI commands ([3dd6783](https://github.com/Dushyant-Khoda/tryappstack-cli/commit/3dd678356d54e7dbf960fc86a8b11bc4c5246aa6))
34211

35212
---
36213

@@ -39,57 +216,47 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and
39216
## Added
40217

41218
### Authentication
42-
43-
* Added user registration and login support.
44-
* Implemented token generation for authenticated sessions.
45-
* Added OTP verification for phone and email.
46-
* Added password reset using OTP.
47-
* Added Joi validation for authentication and OTP routes.
219+
* User registration and login
220+
* Token generation for authenticated sessions
221+
* OTP verification for phone and email
222+
* Password reset via OTP
223+
* Joi validation for auth and OTP routes
48224

49225
### Testing
50-
51-
* Added Jest and Supertest for API testing.
52-
* Added a `tests/` directory with base configuration.
53-
* Added initial test examples such as `health.test.js`.
226+
* Jest and Supertest for API testing
227+
* `tests/` directory with base configuration
228+
* Example tests (e.g., `health.test.js`)
54229

55230
### Security
56-
57-
* Added Helmet middleware for HTTP header security.
58-
* Added express-rate-limit for request rate limiting.
59-
* Added mongo-sanitize and xss-clean to prevent injection attacks.
60-
* Added configurable CORS middleware.
231+
* Helmet middleware for HTTP header protection
232+
* express-rate-limit for request throttling
233+
* mongo-sanitize and xss-clean to prevent injection attacks
234+
* Configurable CORS middleware
61235

62236
### Docker
63-
64-
* Added Dockerfile for containerized deployments.
65-
* Added docker-compose configuration for local API and MongoDB setup.
66-
* Added `.dockerignore` for optimized Docker builds.
237+
* Dockerfile for containerized deployments
238+
* docker-compose for local API + MongoDB setup
239+
* `.dockerignore` for optimized builds
67240

68241
### Monitoring
69-
70-
* Added `/health` endpoint for service status.
71-
* Added `/health/ready` endpoint for readiness checks.
242+
* `/health` endpoint for service status
243+
* `/health/ready` endpoint for readiness checks
72244

73245
---
74246

75247
## Changed
76248

77-
### CLI Improvements
78-
79-
* Improved CLI output for better readability.
80-
* Removed unnecessary visual elements from CLI output.
81-
* Moved CLI messages to a centralized constants file.
249+
### CLI
250+
* Improved output readability
251+
* Removed unnecessary visual elements
252+
* Moved CLI messages to a centralized constants file
82253

83-
### API Message Handling
84-
85-
* Added `src/constants/Messages.js` for centralized API messages.
86-
* Controllers and services now use message constants instead of inline text.
254+
### API Messages
255+
* Added `src/constants/Messages.js` for centralized API response messages
256+
* Controllers and services reference constants instead of inline strings
87257

88258
### Logging
89-
90-
* Updated internal logs to follow a structured format.
91-
92-
Example:
259+
* Internal logs now use a structured format:
93260

94261
```
95262
[FileUpload] Upload started
@@ -98,30 +265,30 @@ Example:
98265

99266
### Environment Variables
100267

101-
Updated Cloudinary environment variable names:
268+
Renamed Cloudinary environment variables:
102269

103270
| Old Name | New Name |
104-
| ------------- | ------------------ |
271+
|---------------|--------------------|
105272
| CLOUD_NAME | CLOUDINARY_NAME |
106273
| CLOUD_API_KEY | CLOUDINARY_API_KEY |
107274

108275
---
109276

110277
## Documentation
111278

112-
Added documentation in the `docs/` directory:
279+
Added docs in the `docs/` directory:
113280

114-
* `setup.md` Project setup instructions
115-
* `authentication.md` Authentication and OTP usage
116-
* `services.md` Email, AWS S3, and Cloudinary configuration
117-
* `cli-usage.md` CLI command usage
281+
* `setup.md` Project setup instructions
282+
* `authentication.md` Authentication and OTP usage
283+
* `services.md` Email, AWS S3, and Cloudinary configuration
284+
* `cli-usage.md` CLI command reference
118285

119-
Updated the root `README.md` with clearer setup instructions.
286+
Updated root `README.md` with clearer setup instructions.
120287

121288
---
122289

123290
## Fixed
124291

125-
* Fixed an issue in the CLI `init` command related to inquirer prompt structure.
126-
* Removed duplicate documentation paths.
127-
* Cleaned formatting issues in documentation files.
292+
* Fixed inquirer prompt structure issue in the `init` command
293+
* Removed duplicate documentation paths
294+
* Cleaned up formatting in documentation files

0 commit comments

Comments
 (0)