How iamyasinb/meydounbar works
Midoun Bar is a Persian RTL produce-commerce SPA backed by a separate Django REST service. The main customer journey is browse products, manage a server-backed cart, quote delivery and discounts at checkout, create an order, and complete/verify payment; staff and drivers manage fulfillment, while notifications and reporting support operations. The graph combines sampled frontend routing/auth and backend service relationships with README-documented capabilities. Several feature implementations were not sampled, so their internal call paths are not inferred.
Main entry points: orders/services.py Order processing · urls.py Django REST API · CheckoutPage.tsx Checkout and address · payments/services.py Payment processing
Components 28
Frontend shell
- App shell and routes
src/app/App.tsx - Authentication screens
src/features/auth/pages
Customer commerce
- Product discovery
src/features/products/pages - Shopping cart
src/features/cart/pages/CartPage.tsx - Checkout and address
src/features/checkout/pages/CheckoutPage.tsx - Order history and tracking
src/features/orders/pages/OrdersPages.tsx - Payment return
src/features/payments/pages/PaymentReturnPage.tsx
Fulfillment operations
- Staff management
src/features/staff/pages - Service area editor
src/features/staff/components/ServiceAreaEditor.tsx - Driver orders
src/features/driver/pages/DriverPages.tsx
Backend domain services
- Django REST API
backend/config/urls.py - Product services
backend/apps/products/services.py - Discount rules
backend/apps/discounts/services.py - Delivery quoting
backend/apps/delivery/services.py - Order processing
backend/apps/orders/services.py - Payment processing
backend/apps/payments/services.py - Notification delivery
backend/apps/notifications/services.py - Sales reporting
backend/apps/reports/services.py - Order records
backend/apps/orders/models.py - API error envelope
backend/apps/common/exceptions.py
Integration and state
- API adapter
src/api/adapter.ts - Session provider
src/app/providers/AuthProvider.tsx - Realtime notifications
src/app/providers/RealtimeProvider.tsx
Other components
- Customer
- Cashier / Admin
- Driver
- PostgreSQL
- Payment gateway
Connections 36
- App shell and routes → Session provider: hosts routes
- App shell and routes → API adapter: provides adapter
- App shell and routes → Product discovery: routes to
- App shell and routes → Authentication screens: routes to
- Customer → Product discovery: browses
README.md - Customer → Authentication screens: signs in
README.md - Customer → Shopping cart: manages items
README.md - Shopping cart → Checkout and address: continues to
README.md - Checkout and address → API adapter: requests commerce data
src/features/checkout/pages/CheckoutPage.tsx - Checkout and address → Delivery quoting: requests quote
README.md - Checkout and address → Discount rules: validates code
README.md - Checkout and address → Order processing: submits order
README.md - Order processing → Delivery quoting: calls quote service
backend/apps/orders/services.py - Order processing → Discount rules: calls discount service
backend/apps/orders/services.py - Order processing → Notification delivery: creates notifications
backend/apps/orders/services.py - Order processing → Order records: persists orders
backend/apps/orders/services.py - Order history and tracking → Payment return: retries payment
README.md - Payment return → Payment processing: verifies return
README.md - Payment processing → Payment gateway: uses gateway
backend/apps/payments/services.py - Payment processing → Notification delivery: sends events
backend/apps/payments/services.py - Cashier / Admin → Staff management: manages store
README.md - Staff management → Service area editor: edits boundary
src/features/staff/pages/StaffProductsPage.tsx - Staff management → Sales reporting: views reports
README.md - Driver → Driver orders: updates deliveries
README.md - Session provider → API adapter: calls auth methods
src/app/providers/AuthProvider.tsx - Realtime notifications → API adapter: shares app session
README.md - Django REST API → Product services: routes requests
backend/config/urls.py - Django REST API → Order processing: routes requests
backend/config/urls.py - Django REST API → Payment processing: routes requests
backend/config/urls.py - Django REST API → Notification delivery: routes requests
backend/config/urls.py - Sales reporting → Order records: reads order data
backend/apps/reports/services.py - Payment processing → Order records: reads order data
backend/apps/payments/services.py - Product services → API error envelope: raises business errors
backend/apps/products/services.py - Discount rules → API error envelope: raises business errors
backend/apps/discounts/services.py - Delivery quoting → API error envelope: raises business errors
backend/apps/delivery/services.py - Django REST API → PostgreSQL: stores domain data
README.md