How thymuoyhak/minishopcambodia-fullstackweb works
MiniShop is a multi-tenant commerce platform: customers discover a shop, browse products, authenticate or check out, and receive order/payment outcomes; shop staff also manage sales through a POS and dashboards. Shop creation and plan payments, platform administration, reseller commissions, backups, invoices, stock alerts, and Telegram storefront/bot capabilities form distinct branches. The README documents the overall integrations and capabilities; sampled sources confirm storefront routing, Mini App checkout, backend startup, authentication, and backup behavior. Several routers and frontend pages were not sampled, so their internal call paths are not asserted.
Main entry points: main.py FastAPI entry · orders.py Order handling · App.js Storefront · plans.py Plans and signup
Components 27
Customer commerce
- Storefront
Frontend_User/src/App.js - Shop context
Frontend_User/src/contexts/ShopContext.js - Checkout
Frontend_User/src/pages/Checkout.js - Storefront API
Frontend_User/src/api.js
Shop operations
- Owner dashboard
Frontend_Dashboard_User/src/App.js - POS
Frontend_Dashboard_User/src/pages/POS.js
Platform management
- Admin console
Frontend_Admin/src/App.js - Shop administration
Frontend_Admin/src/pages/ShopDetail.js - Reseller console
Frontend_Reseller/src/App.js
API and domain services
- FastAPI entry
Backend_API/main.py - Authentication
Backend_API/routers/auth.py - Order handling
Backend_API/routers/orders.py - Plans and signup
Backend_API/routers/plans.py - Payments
Backend_API/routers/payments.py - Catalog management
Backend_API/routers/products.py - Backup endpoints
Backend_API/routers/backup.py - Backup service
Backend_API/services/backup_service.py - Invoice and PDF
Backend_API/services/pdf_service.py - Stock service
Backend_API/services/stock_service.py - ABA payment service
Backend_API/services/aba_service.py - Telegram notifications
Backend_API/services/telegram_service.py - Commerce models
Backend_API/models.py - Database
Backend_API/database.py
Telegram channels
- Telegram storefront
Frontend_Telegram_Mini_APP/src/App.js - Shop bot worker
Backend_Telegram_Mini_App/bot_worker.py
Other components
- Shopper
- ABA PayWay
Connections 36
- Shopper → Storefront: browses
- Storefront → Shop context: loads shop
Frontend_User/src/App.js - Shop context → Storefront API: requests shop
Frontend_User/src/contexts/ShopContext.js - Storefront → Checkout: routes to
Frontend_User/src/App.js - Checkout → Storefront API: submits orders
- Owner dashboard → POS: routes to
Frontend_Dashboard_User/src/App.js - Shopper → Owner dashboard: staff operates
- Shopper → Admin console: administers
- Admin console → Shop administration: routes to
Frontend_Admin/src/App.js - Shopper → Reseller console: manages referrals
- Shopper → Telegram storefront: opens in Telegram
- Telegram storefront → FastAPI entry: requests API
- Telegram storefront → FastAPI entry: creates order and payment
Frontend_Telegram_Mini_APP/src/App.js - Shop bot worker → FastAPI entry: polls bot config
- Storefront → FastAPI entry: uses platform API
- Owner dashboard → FastAPI entry: uses platform API
- Admin console → FastAPI entry: uses platform API
- Reseller console → FastAPI entry: uses platform API
- FastAPI entry → Authentication: mounts router
Backend_API/main.py - FastAPI entry → Order handling: mounts router
Backend_API/main.py - FastAPI entry → Plans and signup: mounts router
Backend_API/main.py - FastAPI entry → Payments: mounts router
Backend_API/main.py - FastAPI entry → Catalog management: mounts router
Backend_API/main.py - FastAPI entry → Backup endpoints: mounts router
Backend_API/main.py - Authentication → Database: uses sessions
Backend_API/routers/auth.py - Order handling → Database: uses sessions
Backend_API/routers/orders.py - Plans and signup → Database: uses sessions
Backend_API/routers/plans.py - Database → Commerce models: defines ORM base
Backend_API/database.py - Backup endpoints → Backup service: delegates backup
- Order handling → Invoice and PDF: generates invoices
Backend_API/routers/orders.py - Plans and signup → ABA payment service: creates plan payments
Backend_API/routers/plans.py - Payments → ABA payment service: handles ABA payment
- ABA payment service → ABA PayWay: connects gateway
- Order handling → Stock service: updates inventory
- Order handling → Telegram notifications: notifies shop
- Plans and signup → Backup service: uses backup support
Backend_API/routers/plans.py