Multi-tenant workflow API for company-wide task, project, chat, and meeting coordination.
TaskPilot is a multi-tenant company workflow platform. The backend exposes a typed REST API and a real-time Socket.IO gateway powering tasks, projects, documents, meetings, chat, and notifications, with a 5-role hierarchy enforced end-to-end.
Roles: CEO → ASSISTANT → DEPARTMENT_HEAD → TEAM_LEAD → EMPLOYEE
- Strict multi-tenancy — every entity scoped by
companyId, enforced in guards and Prisma. - State-machine task lifecycle (
PENDING → IN_PROGRESS → SUBMITTED → REVIEW → COMPLETED/REJECTED) with full audit trail. - Scope-aware meetings with RSVP and notification fan-out (company / role / department / team).
- Real-time chat namespace — typing indicators, reactions, mentions, mute, attachments.
- Uniform response envelope (
{ success, data }), Swagger docs, throttling, validation, JWT auth.
Drop images into
res/screenshots/using the names below.
| API docs | ER diagram | WebSocket activity |
|---|---|---|
![]() |
![]() |
![]() |
| Layer | Tech |
|---|---|
| Framework | NestJS 11, TypeScript 5 |
| Data | Prisma 7, PostgreSQL |
| Realtime | Socket.IO via @nestjs/websockets |
| Auth | JWT (passport-jwt), bcrypt |
| Nodemailer (SMTP) | |
| Docs | Swagger / OpenAPI |
| Container | Docker (multi-stage) |
| Tests | Jest |
Prerequisites: Node 22, PostgreSQL 14+, npm 10.
git clone https://github.com/samayine/taskpilot-backend.git
cd taskpilot-backend
npm install
cp .env.example .env # fill in DATABASE_URL, JWT_SECRET, SMTP_*
npx prisma migrate deploy
npm run start:devServer: http://localhost:3000 · API: /api/v1 · Docs: /api/docs
docker compose up --build| Script | Purpose |
|---|---|
npm run start:dev |
Hot-reload development |
npm run build |
Compile to dist/ |
npm run start:prod |
Run compiled build |
npm run lint |
ESLint + autofix |
npm test |
Unit tests |
npm run test:e2e |
End-to-end tests |
npx prisma migrate deploy |
Apply migrations |
npx prisma studio |
Open DB explorer |
src/
modules/ # auth, users, tasks, projects, chat, meetings, …
common/ # guards, interceptors, decorators, pipes
prisma/ # PrismaService
main.ts
prisma/
schema.prisma
migrations/
- Releases — Tagged on GitHub. See the Releases page for changelogs.
- Container image — Published to GitHub Container Registry as
ghcr.io/samayine/taskpilot-backend. Pin to a tag in production; avoidlatest. - Deployment — Any Node 22 host (Render, Railway, Fly.io, Docker on VPS). Required environment matches
.env.example. Runprisma migrate deployas part of every release. - CI/CD — GitHub Actions runs lint, type-check, tests, and image build on each pull request.
- Code of Conduct — Contributor Covenant v2.1.
- Contributing Guide — branch naming, Conventional Commits, PR checklist.
- Security Policy — please report vulnerabilities privately rather than opening a public issue.
- Issue & PR templates live under
.github/.
MIT © TaskPilot contributors.


