How hoangnhattruyen/24ct1-hoangnhattruyen works
This Django e-commerce application serves a mother-and-baby storefront, with customer shopping and checkout as its main workflow: customers browse and search the catalog, manage a cart, apply vouchers, and place orders. Separate capabilities cover account and address management, flash sales and banners, store locations, AI/staff chat, and staff administration. Django models provide the domain and persistence layer; the README identifies Supabase PostgreSQL as the database, though the sampled code does not show its connection configuration. Some capability links are documented rather than verified in sampled implementation.
Main entry points: products/models.py Product Catalog and Reviews · orders/views.py Cart and Checkout · orders/models.py Cart and Order Records · dashboard/views.py Staff and Admin Dashboard
Components 18
Shopping
- Catalog and Product Pages
apps/products/views.py - Banners and Promotions
apps/promotions/models.py - Promotion Views
apps/promotions/views.py - Cart and Checkout
apps/orders/views.py - Storefront JavaScript
static/js/main.js
Accounts and Support
- Account Management
apps/accounts/views.py - Chat Support
apps/chat/views.py - AI Product Advisor
apps/chat/ai_advisor.py
Store Operations
- Staff and Admin Dashboard
apps/dashboard/views.py - Store Location Views
apps/stores/views.py
Shared Commerce Data
- Product Catalog and Reviews
apps/products/models.py - Cart and Order Records
apps/orders/models.py - Profiles and Addresses
apps/accounts/models.py - Chat Sessions and Messages
apps/chat/models.py - Store Locations
apps/stores/models.py - Shared Storefront Context
ecommerce_core/context_processors.py
Other components
- Customer
- Supabase PostgreSQL
Connections 30
- Customer → Catalog and Product Pages: browses
- Catalog and Product Pages → Product Catalog and Reviews: queries catalog
apps/products/views.py - Catalog and Product Pages → Promotion Views: loads promotions
apps/products/views.py - Promotion Views → Banners and Promotions: queries promotions
apps/promotions/views.py - Customer → Cart and Checkout: manages cart
- Cart and Checkout → Product Catalog and Reviews: loads products
apps/orders/views.py - Cart and Checkout → Banners and Promotions: checks vouchers
apps/orders/views.py - Cart and Checkout → Profiles and Addresses: loads addresses
apps/orders/views.py - Cart and Checkout → Cart and Order Records: creates orders
apps/orders/views.py - Customer → Account Management: registers or signs in
- Account Management → Profiles and Addresses: manages profile
apps/accounts/views.py - Customer → Chat Support: requests advice
- Chat Support → Chat Sessions and Messages: stores messages
apps/chat/views.py - Chat Support → AI Product Advisor: requests response
apps/chat/views.py - AI Product Advisor → Product Catalog and Reviews: finds products
apps/chat/ai_advisor.py - Staff and Admin Dashboard → Cart and Order Records: updates orders
apps/dashboard/views.py - Staff and Admin Dashboard → Chat Sessions and Messages: handles chats
apps/dashboard/views.py - Staff and Admin Dashboard → Product Catalog and Reviews: reports inventory
apps/dashboard/views.py - Customer → Store Location Views: finds stores
- Store Location Views → Store Locations: queries locations
apps/stores/views.py - Shared Storefront Context → Product Catalog and Reviews: loads categories
ecommerce_core/context_processors.py - Shared Storefront Context → Cart and Order Records: counts cart items
ecommerce_core/context_processors.py - Shared Storefront Context → Store Locations: counts stores
ecommerce_core/context_processors.py - Customer → Storefront JavaScript: uses storefront
README.md - Product Catalog and Reviews → Supabase PostgreSQL: persists data
README.md - Cart and Order Records → Supabase PostgreSQL: persists data
README.md - Profiles and Addresses → Supabase PostgreSQL: persists data
README.md - Chat Sessions and Messages → Supabase PostgreSQL: persists data
README.md - Banners and Promotions → Supabase PostgreSQL: persists data
README.md - Store Locations → Supabase PostgreSQL: persists data
README.md