Production-grade multi-tenant SaaS project management platform built with Next.js, NestJS, PostgreSQL, Redis, Socket.IO, Stripe, Docker, and CI/CD.
TaskForge provides organizations with project and task management, role-based access control, Kanban workflows, real-time notifications, email automation, activity tracking, and subscription billing.
- Multi-tenant organization architecture
- JWT authentication with refresh-token rotation
- Role-based access control
- Organization membership and invitations
- Project and task management
- Kanban board with drag-and-drop
- Real-time notifications with Socket.IO
- Transactional email notifications with Nodemailer
- Stripe subscription billing
- Activity and audit logging
- Redis caching
- BullMQ background workers
- Responsive dashboard and analytics
- Docker development and production environments
- GitHub Actions CI/CD
- Next.js 15
- React 19
- TypeScript
- Tailwind CSS
- Zustand
- TanStack React Query
- Socket.IO Client
- dnd-kit
- NestJS 11
- TypeScript
- PostgreSQL 16
- TypeORM
- Redis 7
- BullMQ
- Socket.IO
- Nodemailer
- Stripe SDK
- Docker
- Nginx
- GitHub Actions
- Pino structured logging
- JWT
- Passport
- Argon2
- Role-based authorization
- Request throttling
- Refresh-token rotation
Next.js Frontend
|
v
NestJS API
|
+-----+-----+
| | |
v v v
PostgreSQL Redis Socket.IO | v BullMQ Workers
TaskForge/
├── frontend/
│ └── src/
│ ├── app/
│ ├── components/
│ ├── features/
│ ├── hooks/
│ ├── lib/
│ ├── store/
│ └── types/
│
├── backend/
│ └── src/
│ ├── modules/
│ │ ├── auth/
│ │ ├── users/
│ │ ├── organizations/
│ │ ├── projects/
│ │ ├── tasks/
│ │ ├── activity/
│ │ ├── realtime/
│ │ ├── notifications/
│ │ ├── mail/
│ │ ├── billing/
│ │ └── health/
│ ├── infrastructure/
│ ├── common/
│ └── shared/
│
├── nginx/
├── scripts/
├── docs/
├── screenshots/
├── docker-compose.yml
└── docker-compose.prod.yml
TaskForge uses organization-based multi-tenancy.
Every request is validated through the authorization layer before accessing organization resources.
Request
|
v
Authentication
|
v
Organization Membership
|
v
Role Authorization
|
v
Service Layer
|
v
PostgreSQL
Organization context is validated before services access tenant-specific resources.
Authentication includes:
- JWT access tokens
- Refresh tokens
- Refresh-token rotation
- Token theft detection
- Passport authentication
- Argon2 password hashing
- Role-based authorization
- Request throttling
TaskForge uses Socket.IO for real-time communication.
Users can connect to personal and organization-specific rooms.
user:{userId}
org:{organizationId}
Domain events can trigger:
- Real-time WebSocket broadcasts
- Persistent notifications
- Email notifications
- Activity logging
Example events:
task.created
task.updated
member.joined
notification.created
Mutations can emit domain events that are consumed by multiple services.
Domain Event
|
+------> Activity Log
|
+------> Socket.IO
|
+------> Notification
|
+------> BullMQ Worker
|
v
Email
Background processing is handled through BullMQ and Redis to keep asynchronous operations outside the main request lifecycle.
TaskForge supports:
- Projects
- Tasks
- Task assignment
- Task priorities
- Due dates
- Kanban workflows
- Drag-and-drop task management
- Project analytics
- Activity history
POST /api/v1/auth/register
POST /api/v1/auth/login
POST /api/v1/auth/refresh
GET /api/v1/auth/me
POST /api/v1/auth/logout
POST /api/v1/organizations
GET /api/v1/organizations
POST /api/v1/organizations/switch
GET /api/v1/organizations/current
GET /api/v1/organizations/members
POST /api/v1/organizations/invites
POST /api/v1/projects
GET /api/v1/projects
POST /api/v1/projects/{id}/tasks
GET /api/v1/tasks
PATCH /api/v1/tasks/{id}
GET /api/v1/notifications
GET /api/v1/notifications/unread-count
POST /api/v1/notifications/{id}/read
POST /api/v1/notifications/read-all
- Node.js 20+
- PostgreSQL 16+
- Redis 7+
- npm
- Docker (optional)
cd backend
cp .env.example .env
npm install
npm run migration:run
npm run start:dev
Start the background worker:
cd backend
npm run start:worker:dev
The API runs on:
http://localhost:3000
cd frontend
cp .env.local.example .env.local
npm install
npm run dev
The frontend runs on:
http://localhost:3001
Start the development environment:
docker compose up --build
Start the production environment:
docker compose -f docker-compose.prod.yml up --build -d
PORT=3000
NODE_ENV=development
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_NAME=taskforge
REDIS_HOST=localhost
REDIS_PORT=6379
JWT_SECRET=your-secret-key
ACCESS_TOKEN_TTL=15m
REFRESH_TOKEN_TTL=7d
SMTP_HOST=
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=
SMTP_PASS=
SMTP_FROM=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
FRONTEND_URL=http://localhost:3001
NEXT_PUBLIC_API_URL=http://localhost:3000
NEXT_PUBLIC_SOCKET_URL=http://localhost:3000
TaskForge demonstrates production-oriented full-stack engineering patterns:
- Multi-tenant SaaS architecture
- Modular NestJS backend
- Next.js App Router
- Organization-scoped authorization
- JWT authentication and token rotation
- RBAC
- PostgreSQL relational data modeling
- Redis caching
- Background job processing with BullMQ
- WebSocket-based real-time communication
- Event-driven architecture
- Transactional email workflows
- Stripe billing integration
- Structured logging
- Dockerized infrastructure
- CI/CD automation
- Responsive frontend architecture
TaskForge can be used as a reference implementation for:
- Multi-tenant SaaS applications
- Project management platforms
- Team collaboration systems
- Kanban applications
- Organization-based RBAC
- Real-time web applications
- Event-driven backend systems
- Stripe subscription platforms
- Next.js + NestJS applications
MIT