A production-ready microservices monorepo that eliminates the complexity of setting up enterprise-grade Node.js backends. Built by developers, for developers who value clean architecture, type safety, and developer experience.
- Battle-tested Architecture - CQRS + DDD patterns that scale with your team
- Nx Monorepo - Share code efficiently across multiple microservices
- Type-Safe Everything - Strict TypeScript with custom CQRS decorators
- Auto-Generated Docs - Swagger UI with versioned APIs out of the box
- Production Ready - Docker, logging, error tracking, and migrations included
| Category | Technology | Purpose |
|---|---|---|
| Framework | NestJS v11 | Enterprise Node.js framework |
| Monorepo | Nx | Code sharing and build optimization |
| Architecture | CQRS + DDD | Scalable command/query separation |
| Database | CockroachDB | Cloud-native distributed SQL |
| ORM | TypeORM | Type-safe database operations |
| Validation | class-validator | DTO validation and transformation |
| Documentation | Swagger/OpenAPI | Auto-generated API docs |
| Logging | Pino + Sentry | Structured logging and error tracking |
- Node.js 20+
- Docker
- pnpm package manager
git clone https://github.com/vanguard-lab/VanguardNX.git
cd VanguardNXdocker-compose upcd workspace
pnpm installcp apps/users-ms/temp.env apps/users-ms/.envpnpm users:migration:uppnpm users:start- API: http://localhost:3000/users/v1
- Swagger Docs: http://localhost:3000/users/docs
# Create a user
curl -X POST http://localhost:3000/users/v1/users \
-H "Content-Type: application/json" \
-d '{"username":"johndoe","email":"[email protected]"}'
# Get user by ID
curl http://localhost:3000/users/v1/users/{id}| Library | Purpose | Key Features |
|---|---|---|
| shared-core-lib | CQRS foundation | Strict decorators, base classes, mediator |
| shared-utils-lib | Common utilities | Parsers, validators, helper functions |
# Generate new NestJS application
nx generate @nrwl/nest:application my-service
# Add shared dependencies
# Import VanguardNxSharedCoreLibModule in your AppModule# Generate migration
pnpm users:migration:generate
# Apply migrations
pnpm users:migration:up
# Rollback migration
pnpm users:migration:downSee Structure for complete file organization and architectural patterns.
We welcome contributions from the community!
- Follow existing code patterns and architecture
- Use conventional commits (
feat:,fix:,docs:, etc.) - Update documentation for API changes
see FAQ
- Authentication & Authorization module
- Event-driven communication between services
- Redis caching integration
- Message queue patterns (RabbitMQ/Kafka)
- Multi-database support
- Advanced testing utilities
LICENSE Β© VanguardNX. 2025. All rights reserved.
Built with β€οΈ by developers who believe in:
- Clean Architecture that stands the test of time
- Developer Experience that makes coding enjoyable
- Community-Driven open source development
- Enterprise-Grade solutions accessible to everyone
VanguardNX provides the foundation β you focus on the features that matter.
β Star this repo if it helped you!
π Report issues to help us improve
π Contribute to make it even better
Happy coding! π