# lokeshpolani777/foodflow-cicd-aws architecture

> Architecture diagram of the GitHub repository lokeshpolani777/foodflow-cicd-aws, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lokeshpolani777/foodflow-cicd-aws
- Repository: https://github.com/lokeshpolani777/foodflow-cicd-aws

## Overview

FoodFlow is a restaurant-discovery and food-ordering application: a customer browses categories and restaurants, selects menu items, manages a cart, authenticates, and submits an order. The React app calls a Spring REST API; backend services handle authentication, catalog queries, and orders, with repositories backed by the documented MySQL/RDS database. The README also describes cloud deployment infrastructure, but that is delivery architecture rather than an application runtime subsystem. Some frontend page implementations and backend controllers were not sampled, so those links are limited to visible API calls and indexed references.

Main entry points: [`frontend/src/api/api.js`](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/frontend/src/api/api.js) (API client), [`backend/src/main/java/com/foodflow/repository`](https://github.com/lokeshpolani777/foodflow-cicd-aws/tree/main/backend/src/main/java/com/foodflow/repository) (JPA repositories), [`backend/src/main/java/com/foodflow/controller/RestaurantController.java`](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/controller/RestaurantController.java) (Catalog endpoints), [`backend/src/main/java/com/foodflow/controller/CategoryController.java`](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/controller/CategoryController.java) (Category endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Customer experience"]
  node_react["React entry<br/>[main.jsx]"]
  node_app["App and browsing<br/>[App.jsx]"]
  node_home["Home discovery<br/>[Home.jsx]"]
  node_cart["Cart and checkout<br/>[Cart.jsx]"]
  node_login["Sign in<br/>[Login.jsx]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["REST application"]
  node_auth_controller["Auth endpoints"]
  node_catalog_controllers["Catalog endpoints"]
  node_category_controller["Category endpoints"]
  node_food_controller["Food endpoints"]
  node_order_controller["Order endpoints"]
  node_user_controller["User endpoints"]
end

subgraph group_identity["Identity and access"]
  node_auth_service["Authentication<br/>[AuthService.java]"]
  node_jwt["JWT service<br/>[JwtService.java]"]
  node_security["JWT request security"]
end

subgraph group_persistence["Domain persistence"]
  node_catalog_services["Catalog services"]
  node_food_service["Food queries"]
  node_category_service["Category queries"]
  node_order_service["Order management<br/>[OrderService.java]"]
  node_user_service["User management<br/>[UserService.java]"]
  node_repositories["JPA repositories"]
  node_domain["Order and catalog entities"]
end

node_customer(("Customer"))
node_database[("MySQL / RDS")]

node_customer -->|"uses"| node_react
node_react -->|"renders"| node_app
node_app -->|"requests catalog"| node_api_client
node_home -->|"loads discovery"| node_api_client
node_cart -->|"submits order"| node_api_client
node_login -->|"authenticates"| node_api_client
node_api_client -->|"POST auth"| node_auth_controller
node_api_client -->|"GET restaurants"| node_catalog_controllers
node_api_client -->|"GET categories"| node_category_controller
node_api_client -->|"GET foods"| node_food_controller
node_api_client -->|"POST orders"| node_order_controller
node_auth_controller -->|"delegates auth"| node_auth_service
node_auth_service -->|"reads and saves users"| node_repositories
node_auth_service -->|"generates token"| node_jwt
node_security -.->|"validates token"| node_jwt
node_catalog_controllers -->|"delegates restaurant queries"| node_catalog_services
node_catalog_controllers -->|"loads restaurant foods"| node_food_service
node_category_controller -->|"delegates categories"| node_category_service
node_category_controller -->|"queries category foods"| node_food_service
node_order_controller -->|"delegates orders"| node_order_service
node_user_controller -->|"delegates users"| node_user_service
node_user_controller -->|"gets user orders"| node_order_service
node_catalog_services -->|"queries restaurants"| node_repositories
node_food_service -->|"queries foods"| node_repositories
node_category_service -->|"queries categories"| node_repositories
node_order_service -->|"loads and saves orders"| node_repositories
node_user_service -->|"queries users"| node_repositories
node_repositories -->|"persists entities"| node_domain
node_repositories -.->|"reads and writes"| node_database

click node_react "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/frontend/src/main.jsx"
click node_app "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/frontend/src/App.jsx"
click node_home "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/frontend/src/pages/Home.jsx"
click node_cart "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/frontend/src/pages/Cart.jsx"
click node_login "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/frontend/src/pages/Login.jsx"
click node_api_client "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/frontend/src/api/api.js"
click node_auth_controller "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/auth/AuthController.java"
click node_catalog_controllers "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/controller/RestaurantController.java"
click node_category_controller "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/controller/CategoryController.java"
click node_food_controller "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/controller/FoodItemController.java"
click node_order_controller "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/controller/OrderController.java"
click node_user_controller "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/controller/UserController.java"
click node_auth_service "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/auth/AuthService.java"
click node_jwt "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/security/JwtService.java"
click node_security "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/security/JwtAuthenticationFilter.java"
click node_catalog_services "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/service/RestaurantService.java"
click node_food_service "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/service/FoodItemService.java"
click node_category_service "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/service/CategoryService.java"
click node_order_service "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/service/OrderService.java"
click node_user_service "https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/service/UserService.java"
click node_repositories "https://github.com/lokeshpolani777/foodflow-cicd-aws/tree/main/backend/src/main/java/com/foodflow/repository"
click node_domain "https://github.com/lokeshpolani777/foodflow-cicd-aws/tree/main/backend/src/main/java/com/foodflow/model"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_react,node_app,node_home,node_cart,node_login,node_api_client toneBlue
class node_auth_controller,node_catalog_controllers,node_category_controller,node_food_controller,node_order_controller,node_user_controller,node_database toneAmber
class node_auth_service,node_jwt,node_security toneMint
class node_catalog_services,node_food_service,node_category_service,node_order_service,node_user_service,node_repositories,node_domain toneRose
class node_customer toneIndigo
```

## Components

### Customer experience

- [React entry](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [App and browsing](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Home discovery](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Cart and checkout](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/frontend/src/pages/Cart.jsx): `frontend/src/pages/Cart.jsx`
- [Sign in](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [API client](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/frontend/src/api/api.js): `frontend/src/api/api.js`

### REST application

- [Auth endpoints](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/auth/AuthController.java): `backend/src/main/java/com/foodflow/auth/AuthController.java`
- [Catalog endpoints](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/controller/RestaurantController.java): `backend/src/main/java/com/foodflow/controller/RestaurantController.java`
- [Category endpoints](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/controller/CategoryController.java): `backend/src/main/java/com/foodflow/controller/CategoryController.java`
- [Food endpoints](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/controller/FoodItemController.java): `backend/src/main/java/com/foodflow/controller/FoodItemController.java`
- [Order endpoints](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/controller/OrderController.java): `backend/src/main/java/com/foodflow/controller/OrderController.java`
- [User endpoints](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/controller/UserController.java): `backend/src/main/java/com/foodflow/controller/UserController.java`

### Identity and access

- [Authentication](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/auth/AuthService.java): `backend/src/main/java/com/foodflow/auth/AuthService.java`
- [JWT service](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/security/JwtService.java): `backend/src/main/java/com/foodflow/security/JwtService.java`
- [JWT request security](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/security/JwtAuthenticationFilter.java): `backend/src/main/java/com/foodflow/security/JwtAuthenticationFilter.java`

### Domain persistence

- [Catalog services](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/service/RestaurantService.java): `backend/src/main/java/com/foodflow/service/RestaurantService.java`
- [Food queries](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/service/FoodItemService.java): `backend/src/main/java/com/foodflow/service/FoodItemService.java`
- [Category queries](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/service/CategoryService.java): `backend/src/main/java/com/foodflow/service/CategoryService.java`
- [Order management](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/service/OrderService.java): `backend/src/main/java/com/foodflow/service/OrderService.java`
- [User management](https://github.com/lokeshpolani777/foodflow-cicd-aws/blob/main/backend/src/main/java/com/foodflow/service/UserService.java): `backend/src/main/java/com/foodflow/service/UserService.java`
- [JPA repositories](https://github.com/lokeshpolani777/foodflow-cicd-aws/tree/main/backend/src/main/java/com/foodflow/repository): `backend/src/main/java/com/foodflow/repository`
- [Order and catalog entities](https://github.com/lokeshpolani777/foodflow-cicd-aws/tree/main/backend/src/main/java/com/foodflow/model): `backend/src/main/java/com/foodflow/model`

### Other components

- **Customer**
- **MySQL / RDS**

## Connections

- Customer → React entry: uses
- React entry → App and browsing: renders (evidence: `frontend/src/main.jsx`)
- App and browsing → API client: requests catalog (evidence: `frontend/src/App.jsx`)
- Home discovery → API client: loads discovery (evidence: `frontend/src/pages/Home.jsx`)
- Cart and checkout → API client: submits order (evidence: `frontend/src/pages/Cart.jsx`)
- Sign in → API client: authenticates (evidence: `frontend/src/pages/Login.jsx`)
- API client → Auth endpoints: POST auth (evidence: `frontend/src/api/api.js`)
- API client → Catalog endpoints: GET restaurants (evidence: `frontend/src/api/api.js`)
- API client → Category endpoints: GET categories (evidence: `frontend/src/api/api.js`)
- API client → Food endpoints: GET foods (evidence: `frontend/src/api/api.js`)
- API client → Order endpoints: POST orders (evidence: `frontend/src/api/api.js`)
- Auth endpoints → Authentication: delegates auth (evidence: `backend/src/main/java/com/foodflow/auth/AuthController.java`)
- Authentication → JPA repositories: reads and saves users (evidence: `backend/src/main/java/com/foodflow/auth/AuthService.java`)
- Authentication → JWT service: generates token (evidence: `backend/src/main/java/com/foodflow/auth/AuthService.java`)
- JWT request security → JWT service: validates token
- Catalog endpoints → Catalog services: delegates restaurant queries (evidence: `backend/src/main/java/com/foodflow/controller/RestaurantController.java`)
- Catalog endpoints → Food queries: loads restaurant foods (evidence: `backend/src/main/java/com/foodflow/controller/RestaurantController.java`)
- Category endpoints → Category queries: delegates categories (evidence: `backend/src/main/java/com/foodflow/controller/CategoryController.java`)
- Category endpoints → Food queries: queries category foods (evidence: `backend/src/main/java/com/foodflow/controller/CategoryController.java`)
- Order endpoints → Order management: delegates orders (evidence: `backend/src/main/java/com/foodflow/controller/OrderController.java`)
- User endpoints → User management: delegates users (evidence: `backend/src/main/java/com/foodflow/controller/UserController.java`)
- User endpoints → Order management: gets user orders (evidence: `backend/src/main/java/com/foodflow/controller/UserController.java`)
- Catalog services → JPA repositories: queries restaurants (evidence: `backend/src/main/java/com/foodflow/service/RestaurantService.java`)
- Food queries → JPA repositories: queries foods (evidence: `backend/src/main/java/com/foodflow/service/FoodItemService.java`)
- Category queries → JPA repositories: queries categories (evidence: `backend/src/main/java/com/foodflow/service/CategoryService.java`)
- Order management → JPA repositories: loads and saves orders (evidence: `backend/src/main/java/com/foodflow/service/OrderService.java`)
- User management → JPA repositories: queries users (evidence: `backend/src/main/java/com/foodflow/service/UserService.java`)
- JPA repositories → Order and catalog entities: persists entities (evidence: `backend/src/main/java/com/foodflow/repository/UserRepository.java`)
- JPA repositories → MySQL / RDS: reads and writes
