How codyvijay/grocery_store works
This is a role-based grocery-store web application: visitors can register or log in, shoppers browse and order products, managers maintain catalog data and handle requests, and administrators manage manager roles. Flask serves role-specific pages and API endpoints; separate Vue entry points provide the public, shopper, manager, and admin interfaces. The tree and excerpts support the app wiring, role routing, manager catalog/request actions, and scheduled email/report tasks. Most API handlers, shopper checkout behavior, persistence details, and admin wiring are unsampled, so those links are shown only at the subsystem level where supported.
Main entry points: api.py REST API · app.py Flask application · user_main.js Shopper interface · manager_main.js Manager interface
Components 22
Web interfaces
- Public entry
grocery_store_v2/static/vue/main.js - Shopper interface
grocery_store_v2/static/vue/user_main.js - Manager interface
grocery_store_v2/static/vue/manager_main.js - Admin interface
grocery_store_v2/static/vue/admin_main.js
Application server
- Flask application
grocery_store_v2/app.py - Role page routes
grocery_store_v2/application/controllers.py - REST API
grocery_store_v2/application/api.py - Authentication
grocery_store_v2/application/security.py - Domain models
grocery_store_v2/application/models.py - Application database
grocery_store_v2/application/database.py
Store operations
- Browse catalog
grocery_store_v2/static/vue/user_components/user_products.js - Cart and checkout
grocery_store_v2/static/vue/user_components/user_checkout.js - Order history
grocery_store_v2/static/vue/user_components/my_orders.js - Catalog management
grocery_store_v2/static/vue/manager_components/manager_products.js - Category management
grocery_store_v2/static/vue/manager_components/manager_categories.js - Manager requests
grocery_store_v2/static/vue/manager_components/manager_requests.js - Manager approvals
grocery_store_v2/static/vue/admin_components/managers.js
Background services
- Scheduled tasks
grocery_store_v2/application/tasks.py - Celery worker
grocery_store_v2/application/workers.py
Other components
- Visitor / user
- SMTP mail service
- Web browser
Connections 31
- Visitor / user → Web browser: uses
- Web browser → Public entry: loads
- Web browser → Shopper interface: loads
- Web browser → Manager interface: loads
- Web browser → Admin interface: loads
- Public entry → Flask application: HTTP requests
- Shopper interface → REST API: API requests
- Manager interface → REST API: API requests
- Admin interface → REST API: API requests
- Flask application → REST API: imports
- Flask application → Role page routes: imports
- Flask application → Application database: initializes
- Flask application → Authentication: initializes
- Role page routes → Application database: queries and commits
- Role page routes → Web browser: redirects or renders
- Manager interface → Catalog management: routes to
- Manager interface → Category management: routes to
- Manager interface → Manager requests: routes to
- Shopper interface → Browse catalog: routes to
- Shopper interface → Cart and checkout: routes to
- Shopper interface → Order history: routes to
- Catalog management → REST API: sends requests
- Category management → REST API: sends requests
- Manager requests → REST API: sends requests
- Manager approvals → REST API: sends requests
- REST API → Application database: uses
- REST API → Domain models: uses
- Flask application → Celery worker: configures
- Celery worker → Scheduled tasks: runs
- Scheduled tasks → Application database: queries
- Scheduled tasks → SMTP mail service: sends email