How amerelsabbagh/aws_grocery works
GroceryMate is a grocery storefront with a React client and Flask API. Shoppers browse products, inspect details and reviews, authenticate, manage favorites and a basket, then record purchases; users can also manage avatars. The README describes AWS hosting, PostgreSQL, S3 avatars, and monitoring, but the provided tree contains no Terraform files. The graph therefore focuses on the application runtime and includes documented storage integrations. Some UI-to-API and service-to-storage links are based on explicit endpoints or imports; unsampled implementation details are not inferred.
Main entry points: App.js React app and routes · user_service.py User service · config.js API base URL · __init__.py API route registration
Components 25
Web client
- React app and routes
frontend/src/App.js - Product store
frontend/src/Component/ProductStore/ProductStore.js - Product grid
frontend/src/Component/ProductStore/ProductGrid/ProductGrid.js - Product details
frontend/src/Component/ProductDetail/ProductDetail.js - Reviews and ratings
frontend/src/Component/ProductDetail/ProductComments/ProductComments.js - Submit review
frontend/src/Component/ProductDetail/ProductNewReview/ProductNewReview.js - Authentication UI
frontend/src/Component/Auth/Auth.js - Checkout
frontend/src/Component/Checkout/Checkout.js - User info and avatar
frontend/src/hooks/useUserInfo.js - API base URL
frontend/src/config.js
Flask API
- API route registration
backend/app/__init__.py - Product routes
backend/app/routes/product_routes.py - User routes
backend/app/routes/user_routes.py - Auth routes
backend/app/routes/auth_routes.py - Product controller
backend/app/controllers/product_controller.py - User controller
backend/app/controllers/user_controller.py - Auth controller
backend/app/controllers/auth_controller.py
Domain services
- Product service
backend/app/services/product_service.py - User service
backend/app/services/user_service.py - Auth service
backend/app/services/auth_service.py
Persistence and media
- Product model
backend/app/models/product_model.py - User model
backend/app/models/user_model.py - PostgreSQL
- Avatar object storage
Other components
- Shopper
Connections 34
- Shopper → React app and routes: uses
- React app and routes → Product store: routes to
frontend/src/App.js - React app and routes → Product details: routes to
frontend/src/App.js - React app and routes → Authentication UI: routes to
frontend/src/App.js - React app and routes → Checkout: routes to
frontend/src/App.js - React app and routes → API base URL: requests via
frontend/src/App.js - React app and routes → Product store: passes products
frontend/src/App.js - React app and routes → Checkout: passes basket
frontend/src/App.js - Product store → Product grid: renders
frontend/src/Component/ProductStore/ProductStore.js - Product grid → API base URL: fetches products
frontend/src/Component/ProductStore/ProductGrid/ProductGrid.js - Product details → Reviews and ratings: renders
frontend/src/Component/ProductDetail/ProductDetail.js - Product details → Submit review: renders
frontend/src/Component/ProductDetail/ProductDetail.js - Submit review → API base URL: posts review
frontend/src/Component/ProductDetail/ProductNewReview/ProductNewReview.js - Authentication UI → API base URL: uses API
frontend/src/Component/Auth/Auth.js - Checkout → API base URL: uses API
frontend/src/Component/Checkout/Checkout.js - User info and avatar → API base URL: fetches user data
frontend/src/hooks/useUserInfo.js - API route registration → Product routes: registers
backend/app/__init__.py - API route registration → User routes: registers
backend/app/__init__.py - API route registration → Auth routes: registers
backend/app/__init__.py - Product routes → Product controller: dispatches
backend/app/routes/product_routes.py - User routes → User controller: dispatches
backend/app/routes/user_routes.py - Auth routes → Auth controller: dispatches
backend/app/routes/auth_routes.py - Product controller → Product service: calls
backend/app/controllers/product_controller.py - Product controller → User service: calls
backend/app/controllers/product_controller.py - User controller → User service: calls
backend/app/controllers/user_controller.py - Auth controller → Auth service: calls
backend/app/controllers/auth_controller.py - Auth service → User model: queries
backend/app/services/auth_service.py - Product service → Product model: uses
backend/app/services/product_service.py - User service → User model: uses
backend/app/services/user_service.py - User service → Product model: queries
backend/app/services/user_service.py - Auth service → PostgreSQL: persists users
backend/app/services/auth_service.py - Product service → PostgreSQL: uses ORM
- User service → PostgreSQL: persists account data
- User service → Avatar object storage: stores avatars