Architecture Overview

The Whole System

This capstone puts every level together. ShopEase is split by business capability; each service owns its data, talks synchronously only when it needs an answer right now, and uses Kafka events for everything else.

React web app                    Android app
              |                               |
        web-bff (BFF, OAuth2 client)     mobile-bff
              \_______________ ____________/
                              v
             Ingress (TLS, api.shopease.in)  ->  API Gateway (JWT check, rate limit, routes)
                              |
     +-------------+----------+-----------+--------------+----------------+
     v             v                      v              v                v
 product-svc   user-svc             order-svc       inventory-svc    payment-svc --> Razorpay
 (catalogue)   (profile, address)   (saga orchestr.) (stock)          (payments)
  Postgres      Postgres             Postgres         Postgres         Postgres
  + Redis       |                    + outbox          + outbox         + outbox
  + Elastic     |                         \               |              /
                |                          +------> Kafka (order-events, inventory-*, payment-*)
                |                                         |
                +--------------------------------> notification-svc (SMS, email, push)

 Platform: Keycloak (auth) | Kubernetes | Prometheus + Grafana | Zipkin/Tempo | Loki | Argo CD

Technology Choices

ConcernChoiceLearned in
Service frameworkSpring Boot 3.x, Java 21, virtual threadsSpring Boot material
PersistenceSpring Data JPA + PostgreSQL, Flyway migrationsHibernate & JPA material
EdgeSpring Cloud Gateway + Kubernetes IngressMedium level + this level
Discovery and configKubernetes Services/DNS, ConfigMaps, SecretsContainers module
Sync callsRestClient / OpenFeign + Resilience4jMedium level
Async eventsApache Kafka, transactional outbox, idempotent consumersMedium level + Distributed Data module
Distributed transactionsOrchestrated saga in order-serviceDistributed Data module
SecurityKeycloak (OIDC), JWT resource servers, client credentialsSpring Security material + Security module
ObservabilityMicrometer Tracing, Prometheus, Grafana, Loki, structured logsObservability module
DeliveryGitHub Actions, GHCR, Argo CD, Argo Rollouts canaryCI/CD module