This project is a full-stack authentication system built using an Nx monorepo architecture, designed with enterprise-grade structure and scalability in mind.
The goal is not just to implement login and registration, but to provide a clean, modular and reusable architecture for real-world applications.
It demonstrates:
- Proper monorepo organization
- Clear frontend/backend separation
- Shared type-safe contracts
- Database schema management with Drizzle ORM
- JWT-based authentication
- Structured technical documentation
Organized as an Nx monorepo:
apps/web→ React frontendapps/api→ NestJS backendlibs/api/db→ Database schema and configuration (Drizzle)libs/shared/contracts→ Shared contracts between frontend and backendlibs/web/auth→ Authentication logiclibs/web/auth-ui→ Reusable UI components
Design principles:
- Modularity
- Separation of concerns
- Shared typed contracts
- Future scalability
- Nx – Monorepo orchestration
- React – Frontend
- NestJS – Backend
- TypeScript – Static typing
- Drizzle ORM – Database access
- PostgreSQL – Database
- JWT – Authentication
- pnpm – Package manager
- shadcn/ui + daisyUI – UI system
- User registration with validation
- JWT-based login
- Remember me
- Protected routes
- Logout
- Password recovery (UI)
- Authenticated user area
- Profile editing
- Access logs (last 5 logins)
- Avatar upload
- Input validation
- Secure password hashing
- JWT middleware
- Database migrations with Drizzle
- Brute-force protection
- Image metadata stripping (GDPR compliance)
- Extended backend test coverage
- Social authentication
- Full password recovery flow
pnpm install
pnpm nx serve web
pnpm nx serve apiThe project documentation is organized modularly in the docs/ folder:
-
docs/en/SETUP.md
Guide to environment configuration and project startup (local and Docker). -
docs/en/ROADMAP.md
Operational development checklist, milestones, and progress status. -
docs/en/ARCHITECTURE.md
Overview of Nx architecture, library organization, and design choices. -
docs/en/DATABASE.md
Details on PostgreSQL (Neon), Drizzle ORM schema, and migration management. -
docs/en/COMMANDS.md
Log of technical decisions and main commands executed during development. -
docs/en/TESTING.md
Testing strategy, current coverage, and adopted philosophy. -
docs/en/CLOUD_UPLOAD.md
File upload approach (local vs cloud) and migration strategy.
The structure is fully available in Italian as well (docs/it/).
This repository serves as:
- Nx full-stack architecture showcase
- Authentication starter template
- Enterprise-ready structural example