How dipeshsuwal9/mobile-phone-online-store works
This is a Django REST and React e-commerce application for browsing phones and accessories, authenticating customers, managing carts, creating and tracking orders, and recording payments. The main customer workflow runs from catalog browsing through cart and checkout to order and payment tracking; admin-managed product and order capabilities are also represented. The README documents the backend domains and API capabilities, while sampled source confirms frontend routing and several service calls. Unsampled page and backend implementations limit detail about their internal call wiring.
Main entry points: App.tsx Application routes · urls.py API routing · api.ts HTTP API client · PhoneCatalog.tsx Catalog pages
Components 27
Web application
- Application routes
frontend/src/App.tsx - Auth context
frontend/src/context/AuthContext.tsx - Cart context
frontend/src/context/CartContext.tsx - Catalog pages
frontend/src/pages/PhoneCatalog.tsx - Cart and checkout
frontend/src/pages/Checkout.tsx - Order pages
frontend/src/pages/Orders.tsx - Login and signup
frontend/src/pages/Login.tsx
Product catalog
- Phone service
frontend/src/services/phoneService.ts - Accessory service
frontend/src/services/accessoryService.ts - Phones and brands API
backend/phones/views.py - Phone and brand records
backend/phones/models.py - Accessories API
backend/accessories/views.py - Accessory records
backend/accessories/models.py
Customer identity
- Authentication service
frontend/src/services/authService.ts - Customer auth API
backend/customers/views.py - Customer records
backend/customers/models.py
Commerce operations
- Cart service
frontend/src/services/cartService.ts - Cart API
backend/cart/views.py - Cart records
backend/cart/models.py - Order API
backend/orders/views.py - Order records
backend/orders/models.py - Payment service
frontend/src/services/paymentService.ts - Payment API
backend/payments/views.py - Payment records
backend/payments/models.py
API platform
- HTTP API client
frontend/src/services/api.ts - API routing
backend/mobile_store/urls.py
Other components
- Shopper
Connections 32
- Shopper → Application routes: uses
- Application routes → Catalog pages: routes
- Application routes → Cart and checkout: routes
- Application routes → Order pages: routes
- Application routes → Login and signup: routes
- Application routes → Auth context: provides
- Application routes → Cart context: provides
- Catalog pages → Phone service: requests
- Catalog pages → Accessory service: requests
- Login and signup → Authentication service: authenticates
- Cart and checkout → Cart service: manages cart
- Cart and checkout → Payment service: creates payment
- Order pages → HTTP API client: loads orders
- Phone service → HTTP API client: sends requests
- Accessory service → HTTP API client: sends requests
- Authentication service → HTTP API client: sends requests
- Cart service → HTTP API client: sends requests
- Payment service → HTTP API client: sends requests
- HTTP API client → API routing: calls API
- API routing → Phones and brands API: dispatches
- API routing → Accessories API: dispatches
- API routing → Customer auth API: dispatches
- API routing → Cart API: dispatches
- API routing → Order API: dispatches
- API routing → Payment API: dispatches
- Phones and brands API → Phone and brand records: reads and writes
- Accessories API → Accessory records: reads and writes
- Customer auth API → Customer records: reads and writes
- Cart API → Cart records: reads and writes
- Order API → Order records: reads and writes
- Order API → Cart records: creates from cart
- Payment API → Payment records: records payments