A full-stack, distributed microservices Auth/Profile system implementing secure Google OAuth, JWT management as httpOnly cookie.
Prerequisites: Docker & Docker Compose
The entire infrastructure is containerized using Docker.
# 1. Clone repo
git clone https://github.com/TheLubab/nestjs-microservices-starter.git
cd nestjs-microservices-starter
# 2. Copy .env.example to .env, and put your google secrets
# 3. Start everything
docker-compose up -d --build
# 4. Read logs of services
docker-compose logs api-gateway auth-service user-service -f
docker-compose logs frontend -f
# 5. Access the app
#
# Frontend: http://localhost:4000
# API Gateway: http://localhost:4001note: if you're on MacOs, you may need to let docker use more memory
- Frontend: Next.js
- API Gateway: NestJS (Public) - The entry point
- Auth Service: NestJS Microservice (Private) - Handles OAuth & JWT
- User Service: NestJS Microservice (Private) - Handles User Data
- Broker: Redis
- Database: PostgreSQL
- Google OAuth 2.0 login flow.
- JWT using HttpOnly cookie
- Secure Profile Management (View & Edit).
- Distributed Microservices (Gateway, Auth, User).
- PostgreSQL and TypeORM.
- Dockerized development environment.
- Next.js proxy for instant redirects.
- Logout.