How epireve/grocerygo works
Project type and purpose
• GroceryGo is a monolithic Django web application (MVT pattern) for online grocery shopping, with separate apps for user accounts, products, cart, orders, and shared “core” logic.
• It also includes an enhanced Admin Dashboard exposing custom API endpoints (e.g. sales trends, low-stock alerts) and a static frontend built with Tailwind CSS and Shadcn/ui, plus Chart.js visualizations.
Main components
A. Presentation Layer
• Web Browser / Client
• Static Assets Server (Tailwind CSS, JS bundles, images)
• Templates (HTML + Shadcn/ui)
B. Application Layer (Django services)
• Django Core (URL routing, middleware)
• Accounts app (authentication, profiles, password reset)
• Products app (product & category models, management)
• Cart app (cart management, coupon logic)
• Orders app (order placement, status history)
• Admin Dashboard (custom BI APIs + Chart.js data endpoints)
C. Data Layer
• SQLite database (all models consolidated; migrations managed per app)
Relationships and data flow
• Browser → HTTP requests → Django URL router
• Router → appropriate app view → ORM queries → SQLite → view logic
• View → renders Template + Context → Browser
• Browser (Admin UI) → AJAX to Admin API endpoints → JSON (sales trend, order status, low-stock)
• Static assets served directly (or via collectstatic) to Browser
• Scripts (run-dev, import, tests) interact directly with management commands and database
Architectural patterns and design principles
• Layered architecture (Presentation / Application / Data)
• Monolithic Django MVT with clearly separated apps per domain
• Custom API layer within Django admin for real-time BI
• Theme management and data visualization decoupled via CSS variables and Chart.js
• Migration-aware testing infrastructure (custom test runner, schema fixes)