How boredompeaks/perfume-store-backend works
Perfume Store is an e-commerce product with a Next.js storefront and an independently deployable Django/DRF API. The customer journey spans account access, product discovery, cart, checkout/payment, and order follow-up; the backend also covers inventory, shipping, returns, and operations. Source excerpts and the README support the backend domain links shown. Some frontend-to-API wiring and unsampled subsystem internals are not visible here, so those connections are omitted or marked unverified.
Main entry points: checkout.py Checkout · page.tsx Storefront · products/models.py Catalog and stock · orders/models.py Orders and returns
Components 23
Storefront
- Storefront
frontend/src/app/page.tsx - Account flows
frontend/src/components/auth/LoginForm.tsx - Product browsing
frontend/src/app/products/page.tsx - Cart and checkout
frontend/src/components/checkout/CheckoutView.tsx - Order views
frontend/src/components/orders/OrdersListView.tsx
Commerce API
- Accounts API
backend/accounts/views.py - Catalog and stock
backend/products/models.py - Session cart
backend/cart/models.py - Checkout
backend/orders/views/checkout.py - Orders and returns
backend/orders/models.py - Payment webhooks
backend/orders/webhooks.py - Inventory workflow
backend/orders/inventory.py - Shipping pricing
backend/shipping/pricing.py - Order state machine
backend/orders/state.py
Shared Services
- Business audit
backend/common/models.py - Notifications
backend/common/notifications.py - Money rules
backend/common/money.py
Operations
- Operations dashboard
backend/ops/services.py - Stock alerts
backend/ops/alerts.py - Async sweeps
backend/common/tasks.py
Other components
- Customer
- Razorpay
- Email service
Connections 26
- Customer → Storefront: browses
README.md - Storefront → Account flows: opens account
README.md - Storefront → Product browsing: browses products
README.md - Storefront → Cart and checkout: shops
README.md - Storefront → Order views: tracks orders
README.md - Account flows → Accounts API: uses API
- Product browsing → Catalog and stock: uses API
- Cart and checkout → Session cart: uses API
- Cart and checkout → Checkout: submits checkout
- Order views → Orders and returns: uses API
- Checkout → Session cart: reads cart
backend/orders/views/checkout.py - Checkout → Catalog and stock: reads products
backend/orders/views/checkout.py - Checkout → Shipping pricing: prices shipping
backend/orders/views/checkout.py - Checkout → Orders and returns: creates order
backend/orders/views/checkout.py - Checkout → Money rules: quantizes amounts
backend/orders/views/checkout.py - Orders and returns → Order state machine: uses transitions
backend/orders/models.py - Payment webhooks → Orders and returns: updates payment
backend/orders/webhooks.py - Payment webhooks → Inventory workflow: checks stock
backend/orders/webhooks.py - Payment webhooks → Razorpay: receives callbacks
backend/orders/webhooks.py - Accounts API → Notifications: sends email
backend/accounts/views.py - Notifications → Email service: delivers messages
backend/common/notifications.py - Catalog and stock → Notifications: sends restock email
backend/products/models.py - Operations dashboard → Catalog and stock: counts stock
backend/ops/services.py - Operations dashboard → Stock alerts: dispatches alerts
backend/ops/services.py - Async sweeps → Notifications: drains outbox
README.md - Inventory workflow → Catalog and stock: updates stock
backend/orders/inventory.py