A robust, enterprise-grade NestJS API designed for team collaboration. This system is architected with a focus on Type Safety, Automated Orchestration, and CI/CD.
- NestJS (Fastify): High-performance, low-overhead framework for scalable I/O.
- Prisma ORM: Strictly typed database interactions with a centralized schema.
- Dockerized Infrastructure: Containerized MySQL environment for consistent local and production parity.
- Professional Test Suite: Full coverage using Jest with a clear separation between unit, integration, and E2E layers.
I've optimized the onboarding process to ensure you can go from git clone to a fully functional, seeded environment in under two minutes.
cp .env.example .env
docker-compose up -d tapos_dbThis script automates Docker permissions, Prisma client generation, database migrations, and idempotent data seeding.
pnpm run db:setuppnpm run start:dev- API Entry:
http://localhost:3000/api/v1 - Interactive Documentation:
/docs(Swagger/OpenAPI)
Reliability is non-negotiable. This project implements a rigorous testing lifecycle that utilizes dedicated Docker environments to prevent side effects on development data.
| Command | Suite | Focus |
|---|---|---|
pnpm run test |
Unit | Business logic and Service-level isolation. |
pnpm run test:int |
Integration | DB Repository patterns and Prisma hooks. |
pnpm run test:e2e |
E2E | Full HTTP lifecycle using a dedicated test database. |
Note: Run
pnpm run test:setupto automatically spin up thetapos_testdatabase within your MySQL container before running integration or E2E suites.
This repository is built for Continuous Integration. On every pull request or push to main, a GitHub Actions workflow executes the following:
- Static Analysis: Runs ESLint for code quality and Prettier for formatting.
- Infrastructure Sync: Initializes a transient MySQL service in the runner.
- Automated Validation: Executes the full Jest test suite.
- Docker Build & Push: Compiles a production-ready image and pushes it to Docker Hub.
- Automated Deployment: Deploys via SSH to a Singapore-based VPS, performs a health check, and runs zero-downtime migrations.
The following areas are currently under development or identified for future optimization to meet full production standards:
- Session Persistence β The system currently utilizes a single-tier stateless JWT with a 1-hour expiration; a full Refresh Token rotation strategy is earmarked for future implementation.
- Real-time Collaboration β Project updates currently rely on standard request-response cycles; WebSocket integration for live task synchronization is currently in the architectural phase.
- User Profile Management β The "Me" endpoint is functional for auth verification, but the UI and backend logic for updating user profiles and account details are currently placeholders.
- Advanced Invitation Logic β *Project collaboration currently uses a direct-add approach for existing platform users
- Email Verification β Account registration uses basic format validation; a strict double-opt-in email verification process is currently out of scope.
| Script | Purpose |
|---|---|
pnpm run seed |
Idempotent data injection (safe to run multiple times). |
pnpm run db:grant |
Fixes Docker MySQL permission bottlenecks (P3014) automatically. |
pnpm exec prisma studio |
Visual database explorer. |
pnpm run test:all |
Pre-flight check (Lint + Unit + E2E + Build). |
Architecture Note: The project uses Bcrypt for secure password hashing and JWT for stateless authentication. All responses are standardized via NestJS Interceptors to ensure a consistent API contract for frontend consumers.