Shop Microservers is a full-stack e-commerce platform that demonstrates a production-grade microservices architecture. The system is composed of four independent backend services — auth, catalog, cart, and orders — each owning its own data store, exposed through a single Nginx reverse-proxy gateway, and paired with a Next.js 15 frontend. Every component is containerized and wired together with Docker Compose, so you can spin up the entire platform with a single command and explore how real-world services communicate, authenticate, and share data without being tightly coupled.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/astrxnomo/shop-microservers/llms.txt
Use this file to discover all available pages before exploring further.
Services at a glance
The platform is divided into four backend microservices, each with a single, well-defined responsibility:- Auth handles user registration and login, issuing signed JWTs that every other protected service validates.
- Catalog manages the product inventory, exposing endpoints to list products and adjust stock levels. It auto-seeds 12 products on first boot.
- Cart provides a per-user ephemeral shopping cart backed by Redis, with a 7-day TTL. No database migration required — carts live and expire in memory.
- Orders implements the checkout flow: it verifies available stock against the catalog, decrements it, persists the order to PostgreSQL, and clears the user’s cart — all in a single coordinated operation.
Nginx gateway
All external traffic enters the system through a single Nginx gateway listening on port 80. The gateway routes requests to the correct upstream service based on URL prefix, strips the prefix before forwarding, and passes real client IP headers downstream. The frontend route additionally supports WebSocket upgrades, enabling Next.js hot-module replacement in development. No service is directly accessible from outside the Docker network.Next.js frontend
The frontend is a Next.js 15 application using the App Router. It communicates exclusively through the Nginx gateway — never directly with any backend service — and stores the user’s JWT inlocalStorage. It is built with React 19, styled with Tailwind CSS, and uses Radix UI primitives for accessible component composition.
Routing table
| Path | Service | Internal port | Responsibility |
|---|---|---|---|
/api/auth/ | auth | 3004 | Registration, login, JWT issuance |
/api/catalog/ | catalog | 3001 | Product listing and stock management |
/api/cart/ | cart | 3002 | Per-user ephemeral cart (Redis, 7-day TTL) |
/api/orders/ | orders | 3003 | Checkout: verify stock → decrement → persist order → clear cart |
/ | frontend | 3000 | Next.js App Router SPA |
Explore the services
Auth Service
User registration, login, and JWT issuance backed by PostgreSQL.
Catalog Service
Product listing, stock management, and automatic seeding.
Cart Service
Ephemeral per-user cart stored in Redis with a 7-day TTL.
Orders Service
Checkout orchestration across catalog, cart, and the orders database.
Nginx Gateway
Single public entry point routing all traffic by URL prefix.
Frontend
Next.js 15 App Router SPA communicating through the gateway.
Tech stack
| Layer | Technologies |
|---|---|
| Backend | Node.js, TypeScript, Express, Prisma |
| Frontend | Next.js 15, React 19, Tailwind CSS, Radix UI |
| Databases | PostgreSQL 16, Redis 7 |
| Gateway | Nginx |
| Orchestration | Docker Compose |