GraphQL Entry Gateway
Port 8080
Unified clients entrypoint
Domain APIs
7 Modules
Core functional domains
System Endpoints
21 Actions
GraphQL, gRPC, and REST routes
Event Message Bus
NATS JetStream
Asynchronous event routing
System Architecture Map
Online StackClients communicate exclusively with the API Gateway via GraphQL. The Gateway handles validation and delegates requests using gRPC to independent backend microservices, which run on dedicated databases. High-throughput notifications and search index rebuilds run asynchronously via NATS JetStream.
graph TD
classDef client fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;
classDef gateway fill:#1e1b4b,stroke:#6366f1,stroke-width:2px,color:#f8fafc;
classDef svc fill:#0f172a,stroke:#4f46e5,stroke-width:2px,color:#f8fafc;
classDef db fill:#022c22,stroke:#0d9488,stroke-width:2px,color:#f8fafc;
classDef broker fill:#111827,stroke:#e11d48,stroke-width:2px,color:#f8fafc;
Client[Mobile / Web Clients]:::client
GW[API Gateway :8080]:::gateway
US[User Service :9001]:::svc
SS[Seller Service :9002]:::svc
PS[Product Service :9003]:::svc
OS[Order Service :9005]:::svc
NS[Notification Service :9007]:::svc
MS[Media Service :8087]:::svc
DB_U[(Users DB :5432)]:::db
DB_S[(Sellers DB :5435)]:::db
DB_P[(Products DB :5433)]:::db
DB_O[(Orders DB :5434)]:::db
DB_N[(Notifications DB :5436)]:::db
DB_M[(Media DB :5437)]:::db
NATS((NATS JetStream)):::broker
Redis[(Redis Queue)]:::broker
Client -- HTTP GraphQL --> GW
GW -- gRPC --> US
GW -- gRPC --> SS
GW -- gRPC --> PS
GW -- gRPC --> OS
GW -- HTTP/gRPC --> MS
US --> DB_U
SS --> DB_S
PS --> DB_P
OS --> DB_O
NS --> DB_N
MS --> DB_M
OS -- Async Events --> NATS
PS -- Async Events --> NATS
NATS -- Consume --> NS
NS -- Tasks Queue --> Redis
Redis -- Dispatch --> Workers[FCM Push / Google SMTP]
Available API Reference Catalog
| Icon | API Domain | Functional Overview | Protocol Types | Action |
|---|---|---|---|---|
| 👤 | User & Authentication API | Manages buyer and seller registration, login sessions, address books, profile details, and JWT validation. Buyers log in using passive OTP SMS codes, while sellers register with validated email addresses. The gateway handles token checking for protected resources. | GraphQL gRPC | |
| 🏬 | Seller & Store API | Manages seller storefront registration, logo and banner multimedia paths, geographical location settings, following status tracking, and seller payouts. | GraphQL gRPC | |
| 🏷️ | Product & Catalog API | Governs items taxonomy, categories, variants attributes (price, compare price, options maps), and location-aware distance searches. Integrates PostGIS extensions for spatial queries. | GraphQL gRPC | |
| 📦 | Inventory API | Private internal gRPC microservice managing stock reservation checkouts, replenishments, and low stock alert thresholds. | GraphQL gRPC | |
| 🛒 | Cart & Orders API | Governs buyer shopping carts, checkout transformations, and order histories. Items added to a cart are dynamically hydrated with title and seller details at query time from Product & Seller services. During checkout, an immutable JSON snapshot is generated and frozen inside the order database column to protect receipt history integrity. | GraphQL gRPC | |
| 🔔 | Notification API | Subscribes to NATS JetStream events, queues delivery jobs via Redis-backed Asynq workers, and dispatches multi-channel outputs (Email via Google SMTP on ports 587/465, Push via Firebase Cloud Messaging). Tracks token validity and opt-ins. | GraphQL gRPC | |
| 🖼️ | Media Service API | Governs secure multimedia file uploads. Integrates direct S3 raw bucket transfers, AWS Lambda event triggers for AVIF/WebP image rendering across 6 size variants, HLS video transcoders, and Origin Access Control signed CloudFront serving. | GraphQL gRPC REST HTTP |