Projects Management API
Backend Lead18 weeksEn ligneTeam of 3

Projects Management API

NestJS backend with JWT auth, RBAC guards, and Prisma for academic project lifecycle management

NNestJSPrismaPrismaPostgreSQLPostgreSQLTypeScriptTypeScriptJJWTNext.jsNext.jsRQReact Query
Voir en ligneCode source

Intelligence projet

Durée

18 weeks

Technologies

7

Statut

Production

Défi principal

Layering AuthGuard, VerifiedGuard, RolesGuard, and OwnershipGuard cleanly across 40+ endpoints

Compétences démontrées

API DesignAuthenticationRBACPrisma

En bref

Designed and shipped a NestJS + Prisma + PostgreSQL API for managing users, projects, modules, and workshops with JWT authentication, role-based guards, and an approval workflow—deployed live on Render.

Problème

Academic project tracking lacked centralized auth, roles, and approval workflows

Solution

Layered NestJS guard stack with JWT, email verification, and ownership checks

Résultat

Live API on Render serving projects, users, modules, and workshops

40+

API endpoints

4

Security guards

Résultats clés

8+

API modules

4

Guard types

99.5%

Deploy uptime

Visuels sélectionnés

Screenshot 1
1 / 21

Screenshot 1

Résultats & impact

Production-grade school project API with real security patterns deployed live.

Centralized project lifecycle management for academic teams.

61

Commits

8+

Domain modules

Architecture

Architecture diagram

Three-tier architecture: Next.js frontend, NestJS REST API, and PostgreSQL via Prisma.

Each domain is an isolated NestJS module with controller, service, and DTOs. Guards applied via decorators at controller or method level.

Email verification tokens validated before VerifiedGuard allows access.

Infrastructure & déploiement

Backend on Render with managed PostgreSQL. Frontend on Vercel pointing to Render API URL.

Fonctionnalités

Essentiel

JWT Authentication

Signup, signin, email verification, and password reset.

Essentiel

Role-Based Access

Member, owner, and mentor roles enforced by RolesGuard.

Essentiel

Project CRUD

Create and manage projects with team membership.

Essentiel

Workshop Tracking

Schedule and track upcoming and past workshops.

Secondaire

Approval Workflow

Request and approve team member additions.

Planifié

Audit Logging

Structured audit trail for sensitive operations.

Défis & solutions

1

Guard composition

Le problème

Different endpoints need different guard combinations.

Comment je l'ai résolu

Reusable guards combined with @UseGuards decorator stacks per route.

@UseGuards(AuthGuard, VerifiedGuard, RolesGuard)
@Roles(Role.MENTOR)
@Get(':id/team') getProjectTeam() { ... }
2

Email verification race

Le problème

Users could hit protected routes before verifying email.

Comment je l'ai résolu

VerifiedGuard blocks all non-auth routes until isVerified is true.

if (!user.isVerified) throw new ForbiddenException('Verify email first');
3

Ownership on nested resources

Le problème

Project owners should modify their projects but not others.

Comment je l'ai résolu

OwnershipGuard loads entity and compares ownerId to JWT user id.

@UseGuards(AuthGuard, OwnershipGuard)
@Patch(':id') updateProject() { ... }

Leçons apprises

  1. 1

    Guards compose better than middleware soup

    NestJS guard decorators made it easy to mix auth, verification, role, and ownership checks per endpoint.

  2. 2

    Prisma accelerates iteration

    Schema changes with migrate dev kept the team moving fast without raw SQL drift.

  3. 3

    DTOs at the boundary

    class-validator on every input DTO caught bad payloads before they hit services.

Ce que je ferais différemment

Finish the approval system endpoints and add rate limiting plus structured logging.