How mohamed-imran-12/microservices-demo works
This repository is a React storefront and admin console backed by Spring Boot microservices. The main customer workflow is browsing products, managing a cart, checking out, and viewing orders; the admin area manages products, inventory, orders, users, and sales reports. The README documents the backend service topology and service-to-service calls. Frontend routing and selected API/context behavior are supported by excerpts and the source index; unsampled frontend details are represented at subsystem level.
Main entry points: APIGateway API Gateway · OrderService Order service · pages Customer storefront · client.ts HTTP client
Components 21
Web application
- Route application
frontend/src/App.tsx - Customer storefront
frontend/src/pages - Admin console
frontend/src/pages/admin - Authentication state
frontend/src/context/AuthContext.tsx - Cart state
frontend/src/context/CartContext.tsx - User API
frontend/src/api/userApi.ts - Product API
frontend/src/api/productApi.ts - Order API
frontend/src/api/orderApi.ts - Analytics API
frontend/src/api/analyticsApi.ts - HTTP client
frontend/src/api/client.ts
Gateway and discovery
- API Gateway
APIGateway - Eureka registry
ServiceRegistry
Commerce services
- User service
UserService - Product service
ProductService - Order service
OrderService - Users database
- Products database
- Orders database
Analytics
- Analytics service
AnalyticsService - Analytics database
Other components
- Browser
Connections 31
- Browser → Route application: uses
README.md - Route application → Customer storefront: routes to
frontend/src/App.tsx - Route application → Admin console: routes to
frontend/src/App.tsx - Customer storefront → Cart state: updates
frontend/src/pages/CartPage.tsx - Customer storefront → Order API: submits checkout
frontend/src/pages/CheckoutPage.tsx - Customer storefront → Product API: loads products
frontend/src/pages/ProductsPage.tsx - Customer storefront → User API: updates profile
frontend/src/pages/ProfilePage.tsx - Admin console → Product API: manages inventory
frontend/src/pages/admin/AdminInventoryPage.tsx - Admin console → Order API: loads orders
frontend/src/pages/admin/AdminOrdersPage.tsx - Admin console → Analytics API: loads metrics
frontend/src/pages/admin/AdminDashboardPage.tsx - User API → HTTP client: sends requests
frontend/src/api/userApi.ts - Product API → HTTP client: sends requests
frontend/src/api/productApi.ts - Order API → HTTP client: sends requests
- Analytics API → HTTP client: sends requests
frontend/src/api/analyticsApi.ts - HTTP client → API Gateway: calls
README.md - API Gateway → User service: routes requests
README.md - API Gateway → Product service: routes requests
README.md - API Gateway → Order service: routes requests
README.md - API Gateway → Analytics service: routes requests
README.md - Order service → User service: calls via Feign
README.md - Order service → Product service: calls via Feign
README.md - Order service → Analytics service: calls via Feign
README.md - User service → Users database: persists users
README.md - Product service → Products database: persists catalog
README.md - Order service → Orders database: persists orders
README.md - Analytics service → Analytics database: persists reports
README.md - API Gateway → Eureka registry: discovers services
README.md - User service → Eureka registry: registers with
README.md - Product service → Eureka registry: registers with
README.md - Order service → Eureka registry: registers with
README.md - Analytics service → Eureka registry: registers with
README.md