Welcome to the PERN Stack Task Management System repository. This project is a fully functional, highly secure Task Management API built to demonstrate advanced QA Testing, API Automation, and Backend Architecture.
This project serves as a technical portfolio piece for QA Tester / SDET roles.
- Automated E2E Testing Pipeline: Contains a comprehensive automated testing suite (
test/qa-flow.e2e-spec.ts) that executes a full simulated user journey. - Security Validation: Tests validate JWT Authentication, RBAC (Role-Based Access Control), and Unauthorized Access prevention.
- Database Cleanup Strategy: E2E tests are designed to execute teardown operations (
DELETE) automatically, ensuring test isolation and zero database bloat. - CI/CD Integration: Configured with GitHub Actions. Every single push or pull request triggers a fresh Ubuntu environment, spins up a PostgreSQL service container, runs database migrations, and executes the Jest E2E tests automatically.
- Framework: NestJS (Node.js)
- Database: PostgreSQL
- ORM: Prisma ORM
- Authentication: JWT (JSON Web Tokens) & Passport
- API Docs: Swagger (OpenAPI)
- Test Runner: Jest + Supertest
The API features a fully normalized relational database schema with cascading deletions:
- Auth & Users: Registration, Login, Profile generation.
- Projects: Group tasks logically.
- Categories: Labeling tasks (e.g., "Bug", "Feature").
- Tasks: The core entity, securely tied to Users, Projects, and Categories.
- Comments: Collaboration thread on Tasks.
Ensure you have PostgreSQL running. Set your database URL in a .env file:
```env
DATABASE_URL="postgresql://username:password@localhost:5432/task_management_db?schema=public"
JWT_SECRET="your_secret_key"
```
```bash
pnpm install
npx prisma migrate dev npx prisma generate
npm run start:dev ```
Once the server is running, navigate to the Swagger UI to easily test all endpoints directly from your browser: 👉 http://localhost:3000/api/docs
To execute the End-to-End API Automation tests locally: ```bash npm run test:e2e ``` The test runner will autonomously register a QA user, retrieve the JWT Token, and execute operations across every module while verifying the SQL relational logic.
Developed & Tested by a passionate QA Professional.