How chandan-me/dhee-store works
Dhee Stores is a React storefront backed by FastAPI microservices, a JWT/RBAC API gateway, and separate MySQL databases. The principal workflow runs from sign-in or catalog browsing through cart checkout, payment, and order history; the order service verifies users and products and coordinates stock changes. Admin catalog/user controls and analytics are additional product branches. Edges follow the README and shown source references; unsampled gateway routing and other feature details are limited to documented behavior.
Main entry points: App.jsx App Coordinator · order_service/main.py Checkout & Orders API · user_service/main.py Identity & Account API · gateway_service/main.py JWT Gateway
Components 22
Storefront
- App Coordinator
frontend/src/App.jsx - Sign-in & Registration
frontend/src/components/AuthScreen.jsx - Catalog & Cart UI
frontend/src/components/ProductCard.jsx - Cart Page
frontend/src/components/CartPage.jsx - Order History
frontend/src/components/OrdersPage.jsx - Admin Dashboard
frontend/src/components/AdminDashboard.jsx - Profile & User Tools
frontend/src/components/ProfileModal.jsx - Product Editor
frontend/src/components/ProductModal.jsx - User Directory
frontend/src/components/UsersModal.jsx - Gateway API Client
frontend/src/services/api.js
API Gateway
- JWT Gateway
gateway_service/main.py - JWT Utilities
gateway_service/auth.py
User Service
- Identity & Account API
user_service/main.py - User Schemas
user_service/schemas.py - User Model
user_service/models.py
Commerce Services
- Catalog & Inventory API
product_service/main.py - Checkout & Orders API
order_service/main.py
Data Stores
- Users MySQL
user_service/database.py - Products MySQL
product_service/database.py - Orders MySQL
order_service/database.py
Other components
- Shopper / Admin
- Razorpay
Connections 27
- Shopper / Admin → App Coordinator: uses storefront
README.md - App Coordinator → Sign-in & Registration: renders
frontend/src/App.jsx - App Coordinator → Catalog & Cart UI: renders
frontend/src/App.jsx - App Coordinator → Cart Page: renders
frontend/src/App.jsx - App Coordinator → Order History: renders
frontend/src/App.jsx - App Coordinator → Admin Dashboard: renders
frontend/src/App.jsx - App Coordinator → Profile & User Tools: renders
frontend/src/App.jsx - App Coordinator → Product Editor: renders
frontend/src/App.jsx - App Coordinator → User Directory: renders
frontend/src/App.jsx - Sign-in & Registration → App Coordinator: submits credentials
frontend/src/components/AuthScreen.jsx - App Coordinator → Gateway API Client: calls API client
frontend/src/App.jsx - Gateway API Client → JWT Gateway: sends API requests
README.md - JWT Gateway → JWT Utilities: validates tokens
gateway_service/main.py - JWT Gateway → Identity & Account API: proxies requests
README.md - JWT Gateway → Catalog & Inventory API: proxies requests
README.md - JWT Gateway → Checkout & Orders API: proxies requests
README.md - Identity & Account API → User Schemas: validates payloads
user_service/main.py - Identity & Account API → User Model: queries users
user_service/main.py - Identity & Account API → Users MySQL: uses database session
user_service/main.py - User Model → Users MySQL: uses ORM base
user_service/models.py - Checkout & Orders API → Orders MySQL: uses database session
order_service/main.py - Checkout & Orders API → Identity & Account API: verifies user
order_service/main.py - Checkout & Orders API → Catalog & Inventory API: checks and adjusts stock
order_service/main.py - Catalog & Inventory API → Products MySQL: uses database session
product_service/main.py - Catalog & Inventory API → Checkout & Orders API: checks order references
product_service/main.py - Identity & Account API → Checkout & Orders API: checks orders before deletion
user_service/main.py - Checkout & Orders API → Razorpay: creates and verifies payments
README.md