How wafiur06/pharma-b2b-react-fastapi-postgres works
This is a Pharma B2B procurement platform: pharmacy users browse a supplier catalog, build a cart, and check out into a master order split by supplier; the wider application also covers identity, organizations, inventory, invoices, returns, offers, support, and tracking. The frontend route map and backend router registration are visible, but most page-to-API wiring and unsampled router/service relationships are not, so those links are omitted. The sampled services show database-backed catalog, cart, inventory, organization, and order behavior.
Main entry points: main.py FastAPI app · App.jsx Web routes · router.py Auth endpoints · service.py Order service
Components 21
Web application
- Web routes
frontend/src/App.jsx - App layout
frontend/src/components/Layout.jsx - Login and signup
frontend/src/pages/Login.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Catalog
frontend/src/pages/Catalog.jsx - Inventory
frontend/src/pages/Inventory.jsx - Orders
frontend/src/pages/Orders.jsx - Service pages
frontend/src/pages/Returns.jsx
Identity and organizations
- Auth endpoints
backend/app/modules/auth/router.py - Auth service
backend/app/modules/auth/service.py - User endpoints
backend/app/modules/users/router.py - Organizations
backend/app/modules/organizations/service.py
Procurement
- Catalog service
backend/app/modules/catalog/service.py - Cart service
backend/app/modules/cart/service.py - Order service
backend/app/modules/orders/service.py
Operations and services
- Inventory service
backend/app/modules/inventory/service.py - Client services
backend/app/modules/client_services/router.py - Invoices
backend/app/modules/invoices/router.py
API and persistence
- FastAPI app
backend/app/main.py - PostgreSQL
Other components
- Pharmacy user
Connections 27
- Pharmacy user → Web routes: uses
- Web routes → Login and signup: routes
- Web routes → App layout: wraps pages
- Web routes → Dashboard: routes
- Web routes → Catalog: routes
- Web routes → Inventory: routes
- Web routes → Orders: routes
- Web routes → Service pages: routes
- FastAPI app → Auth endpoints: registers
- FastAPI app → User endpoints: registers
- FastAPI app → Organizations: registers router
- FastAPI app → Catalog service: registers router
- FastAPI app → Cart service: registers router
- FastAPI app → Order service: registers router
- FastAPI app → Inventory service: registers router
- FastAPI app → Client services: registers
- FastAPI app → Invoices: registers
- Auth endpoints → Auth service: calls
- Auth endpoints → Organizations: calls user service
- Catalog service → PostgreSQL: reads and writes
- Cart service → PostgreSQL: reads and writes
- Order service → PostgreSQL: reads and writes
- Order service → Inventory service: updates lots
- Inventory service → PostgreSQL: reads and writes
- Organizations → PostgreSQL: reads and writes
- Client services → PostgreSQL: reads and writes
- Invoices → PostgreSQL: uses