A production-grade microservices application with micro-frontend architecture, built with Node.js, TypeScript, React, and PostgreSQL.
- API Gateway: Single entry point for all client requests
- Auth Service: Handles authentication and authorization (JWT-based)
- User Service: Manages user profiles and user-related operations
- Shell Application: Main container application
- Auth Module: Authentication UI (login/register)
- Profile Module: User profile management
- Node.js 18+ with TypeScript
- Express.js
- PostgreSQL with Sequelize ORM
- JWT for authentication
- Zod for validation
- Clean Architecture pattern
- React 18+ with TypeScript
- Tailwind CSS
- Framer Motion
- Micro-frontend architecture
- Docker & Docker Compose
- GitHub Actions for CI/CD
- Node.js 18+ and npm
- Docker and Docker Compose
- PostgreSQL (if running locally without Docker)
- Clone the repository:
git clone https://github.com/vishalranaut/micro-stack-app.git
cd microstack-app- Create environment files:
cp backend/services/auth-service/.env.example backend/services/auth-service/.env
cp backend/services/user-service/.env.example backend/services/user-service/.env
cp backend/api-gateway/.env.example backend/api-gateway/.env- Start all services:
docker-compose up -d- Run database migrations:
docker-compose exec auth-service npm run migrate
docker-compose exec user-service npm run migrate- Access the application:
- Frontend: http://localhost:4000
- API Gateway: http://localhost:3000
- Auth Service: http://localhost:3001
- User Service: http://localhost:3002
- Install dependencies:
npm install- Start PostgreSQL (or use Docker):
docker-compose up -d postgres-
Setup environment variables (see
.env.examplefiles) -
Run migrations:
cd backend/services/auth-service && npm run migrate
cd backend/services/user-service && npm run migrate- Start services in development mode:
npm run devmicrostack-app/
├── backend/
│ ├── api-gateway/ # API Gateway service
│ └── services/
│ ├── auth-service/ # Authentication service
│ └── user-service/ # User profile service
├── frontend/
│ ├── shell/ # Main application shell
│ └── modules/
│ ├── auth/ # Auth micro-frontend
│ └── profile/ # Profile micro-frontend
├── docker-compose.yml # Docker orchestration
└── .github/
└── workflows/ # CI/CD pipelines
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/refresh- Refresh JWT token
GET /api/users/profile- Get current user profilePUT /api/users/profile- Update user profileGET /api/users/:id- Get user by ID (protected)
npm testnpm run lintnpm run formatSee .github/workflows/ for CI/CD pipeline configuration.
MIT