A scalable and production-ready Kynetic built with modern backend technologies and best practices.
One of the core engineering challenges solved in this project was the Supabase + PgBouncer connectivity orchestration.
Unlike standard implementations, this backend implements a Dual-Connection Strategy:
- Application Layer (Runtime): Utilizes
@prisma/adapter-pgwith a Transaction-mode Pooler (port 6543) viaDATABASE_URL. This allows the application to scale to thousands of concurrent users without exhausting database connections. - Migration Layer (CLI): Implements a Direct Connection (port 5432) via
DIRECT_URLand@prisma/config. This bypasses PgBouncer limitations, allowing complex DDL operations and schema migrations that require prepared statements.
- Modular Architecture: Organized into domain-driven modules (Auth, Users, Tasks) for high maintainability and separation of concerns.
- Advanced Security: - JWT-based stateless authentication with Passport strategies.
- Salted password hashing using Bcrypt.
- Protected routes via Auth Guards.
- Data Integrity: - Strict DTO enforcement with
class-validatorandclass-transformer.- Prisma as a Single Source of Truth for database schema and TypeScript types.
- Performance: Optimized SQL queries and connection management via transaction pooling to minimize latency and resource overhead.
- Auth System: Secure Login/Register with dynamic user profiles and password encryption.
- Task Lifecycle: Advanced CRUD operations with status-based filtering (Pending, In-Progress, Completed).
- Ownership Logic: Native multi-tenancy support where users can only access and manage their own resources (Secure Scoping).
- Error Handling: Global Exception Filters providing consistent and informative API responses.
- Framework: NestJS (Node.js)
- Language: TypeScript 5
- ORM: Prisma 7
- Database: PostgreSQL (Supabase)
- Deployment: Render (CI/CD integrated)
- Node.js (v25+)
- PostgreSQL or Supabase account
$ npm install
$ npx prisma generate
$ npm build# development
$ npm run start
# watch mode
$ npm run start:dev| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /auth/register |
Create a new account | No |
| POST | /auth/login |
Obtain JWT token | No |
| GET | /tasks |
List user tasks | Yes |
| POST | /tasks |
Create a new task | Yes |
| PATCH | /tasks/:id |
Update status | Yes |
| DELETE | /tasks/:id |
Delete task | Yes |
This project serves as a showcase of modern backend patterns: Infrastructure as Code, Type-Safe ORMs, and Scalable Connection Management. It demonstrates the ability to move beyond simple CRUDs into professional-level systems architecture, ready for cloud-native deployment.