How arian-nmi/django-shop works
Django Shop is an e-commerce application. The primary customer journey is browsing the catalog, managing a cart, checking out into an order, and completing payment; customers can then review orders and manage their account, while staff manage catalog, orders, coupons, and reviews. The graph also includes the documented REST API and background email capability. Links are limited to relationships stated in the README or visible in sampled source and the source index; unsampled checkout, payment, and storefront wiring is not inferred.
Main entry points: shop/models.py Products and wishlist · order/models.py Orders, coupons, addresses · order/views.py Checkout and orders · customer/views.py Customer dashboard
Components 26
Storefront and catalog
- Storefront
core/shop/views.py - Products and wishlist
core/shop/models.py - Product API
core/shop/api/views.py
Cart, checkout, payment
- Cart
core/cart/cart.py - Cart records
core/cart/models.py - Cart API
core/cart/api/views.py - Checkout and orders
core/order/views.py - Orders, coupons, addresses
core/order/models.py - Payment flow
core/payment/views.py - Zarinpal client
core/payment/zarinpal_client.py
Accounts and dashboards
- Accounts and profiles
core/accounts/models.py - Authentication
core/accounts/views.py - Customer dashboard
core/dashboard/customer/views.py - Admin dashboard
core/dashboard/admin/views.py
Reviews
- Reviews and ratings
core/review/models.py - Review submission
core/review/views.py
API and background work
- JWT and API routes
core/api/auth_urls.py - Order API
core/order/api/views.py - Order email task
core/order/tasks.py - Celery configuration
core/core/celery.py
Other components
- Customer
- Staff
- PostgreSQL
- Redis broker
- Zarinpal sandbox
- SMTP email
Connections 40
- Customer → Storefront: browses
- Storefront → Products and wishlist: queries
- Customer → Cart: manages cart
- Cart → Cart records: persists
- Customer → Checkout and orders: checks out
- Checkout and orders → Orders, coupons, addresses: creates order
- Checkout and orders → Cart: validates cart
- Checkout and orders → Payment flow: starts payment
- Payment flow → Zarinpal client: requests verification
- Zarinpal client → Zarinpal sandbox: calls gateway
- Customer → Authentication: authenticates
- Authentication → Accounts and profiles: uses accounts
- Customer → Customer dashboard: manages account
- Customer dashboard → Accounts and profiles: updates profile
core/dashboard/customer/views.py - Customer dashboard → Orders, coupons, addresses: reads orders
core/dashboard/customer/views.py - Customer dashboard → Products and wishlist: reads wishlist
core/dashboard/customer/views.py - Staff → Admin dashboard: administers shop
- Admin dashboard → Products and wishlist: manages products
core/dashboard/admin/views.py - Admin dashboard → Orders, coupons, addresses: manages orders
core/dashboard/admin/views.py - Admin dashboard → Reviews and ratings: moderates reviews
core/dashboard/admin/views.py - Customer → Review submission: submits review
- Review submission → Reviews and ratings: uses reviews
core/review/views.py - Review submission → Products and wishlist: selects product
core/review/views.py - Customer → Product API: requests products
- Product API → Products and wishlist: queries
core/shop/api/views.py - Customer → Cart API: uses cart API
- Cart API → Cart records: reads and writes
core/cart/api/views.py - Cart API → Products and wishlist: validates products
core/cart/api/views.py - Customer → Order API: uses order API
- Order API → Orders, coupons, addresses: uses order models
- Customer → JWT and API routes: gets JWT
- Orders, coupons, addresses → Order email task: loads order details
core/order/tasks.py - Order email task → SMTP email: sends email
core/order/tasks.py - Order email task → Celery configuration: runs as task
core/order/tasks.py - Celery configuration → Redis broker: uses broker
- Products and wishlist → PostgreSQL: stores catalog
- Orders, coupons, addresses → PostgreSQL: stores commerce data
- Accounts and profiles → PostgreSQL: stores accounts
- Cart records → PostgreSQL: stores cart data
- Reviews and ratings → PostgreSQL: stores reviews