CRM Suite
Multi-tenant CRM platform built with NestJS, PostgreSQL, and microservice architecture. Manages leads, deals, contacts, companies, activities, and tasks with organization-scoped data isolation and granular RBAC.
CRM suite screenshorts
Tech Stack
| Layer | Technology |
|---|---|
| Runtime | Node.js, TypeScript (strict) |
| Framework | NestJS 11 (monorepo) |
| Database | PostgreSQL, TypeORM |
| Auth | JWT, Passport.js, bcrypt |
| Authorization | CASL with hierarchical permission scopes |
| BullMQ, MJML, Handlebars, Nodemailer | |
| Validation | class-validator, class-transformer |
| Architecture | CQRS, event-driven microservices |
| Package Manager | pnpm |
Architecture
Multi-Tenancy
- Organization-based data isolation with tenant-aware base service
- Users belong to multiple organizations with distinct roles
- Automatic query scoping per active tenant
RBAC / Permissions
- CASL-powered permission engine with 6 scopes: Global, Company, Department, Team, Self, Owner
- Role-based permission assignment per resource and action
- Permission guard enforced on every protected endpoint
Email Microservice
- Decoupled from main API via NestJS microservices
- BullMQ job queue for reliable async delivery
- MJML templates compiled to responsive HTML
- Event-driven triggers (user registration, etc.)
API
- RESTful with consistent CRUD patterns and DTO validation
- Pagination, filtering, proper HTTP status codes