Back to ProjectsStack:Node.jsTypeScriptFastifyPrisma ORMPostgreSQLJWTZodVitestDocker
Node.jsTypeScriptFastifyBackend
Gym Pass
Backend API focused on gym check-ins, with user registration/authentication, gym search by name or proximity, and check-in flows with strict business rules. It includes RBAC for admin actions, JWT authentication with refresh token via cookie, Swagger/OpenAPI documentation, and unit/e2e test coverage.
$ npm testPASS
✓ Check-in only within 100m distance
✓ Only one daily check-in per gym
✓ Refresh token rotation and validation
The Problem
"Managing gym check-ins requires enforcing rules like maximum distance, one check-in per day, limited validation window, and role-based permissions, while keeping the API secure and maintainable."
The Solution
Implemented a layered architecture with Fastify controllers, use cases, and repository abstractions using Prisma + PostgreSQL. Added JWT/refresh-token authentication, RBAC middleware, geolocation-based validation, and automated testing with Vitest.
RBAC for admin-only operations
JWT with refresh token via cookies
Swagger and OpenAPI docs
Unit and E2E coverage with Vitest
// End of fileView All Projects ->