Backend API for a multi-tenant task management system similar to Jira / Trello.
Built with:
- NestJS
- PostgreSQL
- Sequelize
Each organization has its own users, projects, boards, tasks, and comments.
npm installCreate .env and update values.
You can refer to .env.example.
Using terminal:
psql -U postgres -c "CREATE DATABASE multi_tenant_task_db;"Or create it using pgAdmin.
npm run start:devServer runs at:
http://localhost:3000/api/v1
Recommended order while testing APIs.
Register first. This creates organization + admin user.
POST /auth/register
Copy the token from response and use it as:
Authorization: Bearer <token>
Other auth endpoints:
POST /auth/login
POST /auth/join
GET /auth/me
/auth/join creates a member user inside the organization.
Organization is created automatically during registration.
Endpoints:
GET /organization
PATCH /organization
GET /organization/members
Admin can update organization details.
Create a project first.
A default board is automatically created inside the project.
POST /projects
GET /projects
GET /projects/:id
PATCH /projects/:id
Project members management:
POST /projects/:id/members
DELETE /projects/:id/members/:userId
Each project contains boards.
POST /projects/:projectId/boards
GET /projects/:projectId/boards
GET /projects/:projectId/boards/:id
PATCH /projects/:projectId/boards/:id
DELETE /projects/:projectId/boards/:id
Tasks are created inside boards.
POST /boards/:boardId/tasks
GET /boards/:boardId/tasks
GET /boards/:boardId/tasks/:id
PATCH /boards/:boardId/tasks/:id
DELETE /boards/:boardId/tasks/:id
Task filtering supported via query params:
?status=todo
?status=in_progress
?priority=high
?search=login bug
?assigneeId=<uuid>
?page=1&limit=10
Assign users to tasks:
POST /boards/:boardId/tasks/:id/assignees
DELETE /boards/:boardId/tasks/:id/assignees/:userId
Tasks support comments.
POST /tasks/:taskId/comments
GET /tasks/:taskId/comments
PATCH /tasks/:taskId/comments/:id
DELETE /tasks/:taskId/comments/:id
Users can edit their own comments. Admin can delete any comment.
GET /users/:id
PATCH /users/me
PATCH /users/me/password
PATCH /users/:id/role
DELETE /users/:id
Only Admin can change roles or deactivate users.
A Postman collection is included in the repo. Import it and start testing the APIs.