How viharidas/sangley-admin-reseller-web-new works
SANGLEY combines a consumer storefront and checkout with a reseller business portal. Shoppers browse products, submit leads or place orders; the backend serves catalogue/content and commerce operations. Resellers authenticate, track attributed sales and commissions, while staff administer settings, rules, payouts, support and reporting. MongoDB is the shared persistence layer. The README contains no product documentation, so capability scope comes from the source index and excerpts; unsampled components are represented only where paths and roles are supported.
Main entry points: App.js Storefront app · server.py HTTP API · db.py MongoDB · store.js Store data & API
Components 28
Storefront
- Storefront app
frontend/src/App.js - Home & content
frontend/src/pages/Home.jsx - Product catalogue
frontend/src/pages/Shop.jsx - Product detail
frontend/src/pages/Product.jsx - Reseller landing
frontend/src/pages/Resell.jsx - Checkout
frontend/src/pages/Checkout.jsx - Store data & API
frontend/src/lib/store.js - Product card
frontend/src/components/ProductCard.jsx - Store elements
frontend/src/components/Elements.jsx
Commerce backend
- HTTP API
backend/server.py - Admin authentication
backend/auth.py - Orders & commerce
backend/commerce.py - Catalogue administration
backend/admin_routes.py
Reseller portal
- Portal application
frontend/src/portal/PortalApp.jsx - Portal sign-in
frontend/src/portal/Auth.jsx - Portal API client
frontend/src/portal/api.js - Reseller services
backend/portal/reseller_routes.py - Referral attribution
backend/portal/referrals.py - Portal authentication
backend/portal/auth_routes.py - Access control
backend/portal/security.py
Portal operations
- Business administration
backend/portal/admin_routes.py - Finance operations
backend/portal/finance_routes.py - Commission & payout ledger
backend/portal/financial.py - Sales metrics
backend/portal/metrics.py - Business settings
backend/portal/settings.py - Audit & notifications
backend/portal/audit.py
Persistence
- MongoDB
backend/db.py
Other components
- Shopper
Connections 41
- Shopper → Storefront app: browses
frontend/src/App.js - Storefront app → Home & content: routes to
frontend/src/App.js - Storefront app → Product catalogue: routes to
frontend/src/App.js - Storefront app → Product detail: routes to
frontend/src/App.js - Storefront app → Reseller landing: routes to
frontend/src/App.js - Storefront app → Checkout: routes to
frontend/src/App.js - Storefront app → Store data & API: provides data
frontend/src/App.js - Home & content → Store data & API: reads content
frontend/src/pages/Home.jsx - Home & content → Product card: renders
frontend/src/pages/Home.jsx - Home & content → Store elements: renders
frontend/src/pages/Home.jsx - Product catalogue → Product card: renders
- Product detail → Store data & API: uses API
- Checkout → Store data & API: submits via
- Store data & API → HTTP API: sends requests
frontend/src/lib/store.js - HTTP API → Orders & commerce: routes commerce
backend/server.py - HTTP API → Catalogue administration: routes admin
backend/server.py - HTTP API → Portal authentication: routes portal auth
backend/server.py - HTTP API → Reseller services: routes reseller
backend/server.py - HTTP API → Business administration: routes business admin
backend/server.py - Portal application → Portal sign-in: renders
- Portal sign-in → Portal API client: calls
frontend/src/portal/Auth.jsx - Portal API client → HTTP API: sends requests
- Reseller services → Access control: authenticates
backend/portal/reseller_routes.py - Portal authentication → Access control: uses
backend/portal/auth_routes.py - Reseller services → Sales metrics: queries metrics
backend/portal/reseller_routes.py - Reseller services → MongoDB: reads & updates
backend/portal/reseller_routes.py - Orders & commerce → Referral attribution: uses attribution
backend/commerce.py - Orders & commerce → MongoDB: persists orders
backend/commerce.py - Catalogue administration → MongoDB: manages catalogue
backend/admin_routes.py - Catalogue administration → Admin authentication: requires admin
backend/admin_routes.py - Business administration → Sales metrics: builds reports
backend/portal/admin_routes.py - Business administration → Business settings: reads settings
backend/portal/admin_routes.py - Business administration → MongoDB: reads records
backend/portal/admin_routes.py - Finance operations → Commission & payout ledger: executes ledger actions
backend/portal/finance_routes.py - Finance operations → Sales metrics: gets summaries
backend/portal/finance_routes.py - Commission & payout ledger → Audit & notifications: records changes
backend/portal/financial.py - Commission & payout ledger → MongoDB: updates ledger
backend/portal/financial.py - Business settings → MongoDB: loads settings
backend/portal/settings.py - Audit & notifications → MongoDB: writes audit logs
backend/portal/audit.py - Sales metrics → MongoDB: aggregates records
backend/portal/metrics.py - Access control → Business settings: checks permissions
backend/portal/security.py