ProTask is a NestJS task-management API with JWT authentication, organization membership, project and task workflows, comments, invitations, activity logs, Prisma/PostgreSQL persistence, and Redis-backed queues.
- NestJS 11
- Prisma + PostgreSQL
- Redis + BullMQ
- Jest + ts-jest
- Swagger at
/docs
- User signup, login, and refresh-token exchange
- Organization creation, lookup, and member invitations
- Project listing, creation, and soft deletion
- Task listing with pagination and filters
- Task creation, editing, status transitions, and soft deletion
- Comment creation, listing, and deletion
- Activity feed listing
- Health checks for PostgreSQL and Redis
- Node.js
- npm
- PostgreSQL
- Redis
The repository also includes a docker-compose.yml that starts the API, PostgreSQL, and Redis together.
Create .env from .env.example.
PORT=3000
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/protask?schema=public
REDIS_URL=redis://localhost:6379
JWT_ACCESS_SECRET=access-secret
JWT_REFRESH_SECRET=refresh-secret
JWT_ACCESS_TTL=15m
JWT_REFRESH_TTL_DAYS=7
APP_URL=http://localhost:3000
INVITATION_EXPIRY_HOURS=72Install dependencies and prepare Prisma:
npm install
npm run prisma:generate
npm run prisma:pushStart the API:
npm run start:devThe server listens on http://localhost:3000 by default, and Swagger is available at http://localhost:3000/docs.
Run the full local stack:
docker compose up --buildThe compose setup runs Prisma generation, pushes the schema, and starts the app in watch mode.
The repository is set up for container-based deployment. The production Dockerfile now:
- installs dependencies
- generates the Prisma client
- builds the NestJS app
- starts the compiled server from
dist/ - runs
prisma db pushon container startup so the database schema is applied
Build and run the production image locally with:
docker build -t protask .
docker run --env-file .env -p 3000:3000 protaskRequired deployment environment variables:
PORTDATABASE_URLREDIS_URLJWT_ACCESS_SECRETJWT_REFRESH_SECRETJWT_ACCESS_TTLJWT_REFRESH_TTL_DAYSAPP_URLINVITATION_EXPIRY_HOURS
Any platform that can deploy a Docker container will work cleanly here, including Render, Railway, Fly.io, ECS, or a VPS.
npm run build
npm run start:dev
npm run lint
npm run test
npm run test:cov
npm run test:e2e
npm run prisma:generate
npm run prisma:pushAuthentication
POST /auth/signupPOST /auth/loginPOST /auth/refresh
Users
GET /users/mePATCH /users/me
Organizations and Invitations
POST /orgsGET /orgs/:orgIdPOST /orgs/:orgId/invitePOST /invites/accept/:token
Projects
GET /orgs/:orgId/projectsPOST /orgs/:orgId/projectsDELETE /projects/:projectId
Tasks
GET /projects/:projectId/tasksPOST /projects/:projectId/tasksPATCH /tasks/:taskIdPATCH /tasks/:taskId/statusDELETE /tasks/:taskId
Comments
POST /tasks/:taskId/commentsGET /tasks/:taskId/commentsDELETE /comments/:commentId
Activity and Health
GET /orgs/:orgId/activityGET /health
Unit tests run with:
npm run test -- --runInBandThe test:e2e command currently covers lightweight controller validation only. Full end-to-end coverage against live PostgreSQL and Redis is not wired into this repository yet.