A production-grade, multi-tenant pizza ordering platform built with a microservices architecture. Customers can browse menus, customize pizzas with toppings, place orders via COD or Stripe card payments, and track delivery in real-time. Admins and managers get a live dashboard with instant order notifications.
Live:
- 🛒 Customer UI → [mern-pizza-app.cyou]
- 🧑💼 Admin Dashboard → [admin.mern-pizza-app.cyou]
┌───────────────────────────────────────────────────┐
│ KUBERNETES CLUSTER (AWS EKS) │
│ NGINX Ingress · api.mern-pizza-app.cyou │
┌─────────────┐ │ ┌────────────┐ ┌─────────────┐ │
│ Client UI │──────>│ │Auth Service│ │Catalog Svc │──> MongoDB │
│ (Next.js) │ │ │ PostgreSQL │ │+ Kafka Prod │──> AWS S3 │
│ Vercel │ │ └────────────┘ └──────┬──────┘ │
└─────────────┘ │ │ Kafka Events │
┌───────────────┐ │ ┌─────────────┐ ┌─────▼──────────┐ │
│Admin Dashboard|────>│ │ WS Service │ │ Order Service │──> MongoDB │
│ (React+Vite) │<────│ │ Socket.io │<─│ + Stripe │ │
│ Vercel │ │ └─────────────┘ └──────┬─────────┘ │
└───────────────┘ │ ┌─────────────┐ │ Kafka Events │
│ │Notif Service│<────────┘ │
│ │ Nodemailer │ │
│ └─────────────┘ │
└───────────────────────────────────────────────────┘
| Service | Repo | Tech | DB |
|---|---|---|---|
| Auth Service | pizza-delivery-app-auth-service | Node.js + Express | PostgreSQL |
| Catalog Service | pizza-delivery-catalog-service | Node.js + Express | MongoDB |
| Order Service | pizza-delivery-order-service | Node.js + Express | MongoDB |
| WebSocket Service | pizza-delivery-websocket-service | Node.js + Socket.io | — |
| Notification Service | pizza-app-notification-service | Node.js + Nodemailer | — |
| Client UI | pizza-delivery-client-UI | Next.js 14 | Vercel |
| Admin Dashboard | pizza-app-admin-dashboard | React + Vite | Vercel |
Multi-tenancy — Admins create tenants and assign managers. Every product, topping, and order is scoped by tenantId extracted from the JWT.
Event-driven cache — Catalog Service publishes a Kafka event on every product/topping create, update, or delete. Order Service consumes these events and maintains a local price cache in MongoDB — so prices at checkout are always validated locally without cross-service HTTP calls.
Stripe payments — Card orders create a Stripe PaymentIntent and return a checkout URL to the client. A webhook endpoint (POST /api/payments/webhook) verifies the Stripe signature and confirms payment before publishing the order event.
Real-time updates — WebSocket Service consumes Kafka order events and pushes them to Socket.io rooms. Managers see new orders appear in the Admin Dashboard instantly. Customers see live delivery status on the Client UI.
Notification emails — Notification Service consumes Kafka events and sends HTML order confirmation and status update emails via Nodemailer + SMTP.
| Layer | Technology |
|---|---|
| Backend | Node.js 18 + Express |
| Auth DB | PostgreSQL (users, tenants, roles) |
| Catalog & Order DB | MongoDB |
| Event Bus | Apache Kafka |
| Payments | Stripe (PaymentIntent + Webhooks) |
| Image Storage | AWS S3 |
| Real-time | Socket.io |
| Nodemailer + SMTP | |
| Containers | Docker (multi-stage builds) |
| Orchestration | Kubernetes — AWS EKS |
| Ingress | NGINX Ingress Controller |
| CI/CD | GitHub Actions + ArgoCD v3.3.2 |
| Frontend Hosting | Vercel |
| Customer UI | Next.js 14 (App Router) |
| Admin UI | React + Vite |
| Role | Scope | Can Do |
|---|---|---|
| ADMIN | Global | Create tenants, assign managers, manage all products |
| MANAGER | Tenant-scoped | Manage products/toppings, update order statuses |
| CUSTOMER | Self | Browse menu, place orders, track delivery |
Push to GitHub
→ GitHub Actions builds Docker image
→ Pushes to DockerHub (roshan798/<service>:<sha>)
→ Updates K8s deployment manifest (image tag)
→ ArgoCD detects manifest change
→ Auto-syncs to Kubernetes cluster (rolling update)
Frontend (Vercel)
→ Push to main → Vercel auto-builds and deploys
- Docker + Docker Compose
- Node.js 18+
- A running Kafka broker (see
/brokers) - PostgreSQL instance (for auth-service)
- MongoDB instance (for catalog + order services)
git clone --recurse-submodules https://github.com/roshan798/pizza-delivery-app
cd pizza-delivery-appcd brokers
docker-compose up -dEach service has its own .env. Copy the example and fill in your values:
# Auth Service
cd auth-service
cp .env.example .env
# Fill in: DB_HOST, DB_USER, DB_PASS, DB_NAME, JWT_SECRET, REFRESH_TOKEN_SECRET
# Catalog Service
cd catalog\ service
cp .env.example .env
# Fill in: MONGO_URI, KAFKA_BROKER, AWS_ACCESS_KEY, S3_BUCKET
# Order Service
cd order-service
cp .env.example .env
# Fill in: MONGO_URI, KAFKA_BROKER, JWT_SECRET, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET# In each service directory
npm install
npm run devA full Postman collection is included at the root:
mernspace-pizza-delivery.postman_collection.json
Import it into Postman to test all API endpoints.
| Topic | Event | Producer | Consumers |
|---|---|---|---|
catalog |
PRODUCT_CREATED |
Catalog | Order (cache) |
catalog |
PRODUCT_UPDATED |
Catalog | Order (cache) |
catalog |
PRODUCT_DELETED |
Catalog | Order (cache) |
catalog |
TOPPING_CREATED |
Catalog | Order (cache) |
catalog |
TOPPING_UPDATED |
Catalog | Order (cache) |
catalog |
TOPPING_DELETED |
Catalog | Order (cache) |
orders |
ORDER_PLACED |
Order | WS, Notification |
orders |
ORDER_STATUS_CHANGED |
Order | WS, Notification |
payments |
PAYMENT_COMPLETED |
Order | WS |
Backend is deployed on AWS EKS managed by ArgoCD. See pizza-app-deployment for Kubernetes manifests.
Frontends are deployed on Vercel with the following environment variables:
# Client UI
NEXT_PUBLIC_API_URL=https://api.mern-pizza-app.cyou
# Admin Dashboard
VITE_API_URL=https://api.mern-pizza-app.cyou
VITE_WS_URL=wss://api.mern-pizza-app.cyou| Repo | Purpose |
|---|---|
| pizza-app-deployment | Kubernetes manifests, ArgoCD apps, NGINX Ingress config |
Roshan Kumar — GitHub