# theusinhoiost/foodrush-web architecture

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

- Interactive diagram: https://gitdiagram.com/theusinhoiost/foodrush-web
- Repository: https://github.com/theusinhoiost/foodrush-web

## Overview

FoodRush Web is an Angular delivery-platform frontend. Customers discover restaurants, browse menus, build a persistent cart, place orders, pay, and track progress; restaurant and courier users operate the KDS, while administrators manage users. The graph preserves the documented geocoding, delivery-estimate, restaurant-management, and payment-account capabilities. Edges reflect shown calls, route declarations, or README descriptions; unsampled feature wiring is omitted where it cannot be verified.

Main entry points: [`src/app/app.routes.ts`](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/app.routes.ts) (App routes), [`src/app/core/services/address.service.ts`](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/address.service.ts) (Address geocoding), [`src/app/core/services/auth.service.ts`](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/auth.service.ts) (Authentication), [`src/app/features/restaurants/restaurant-detail/restaurant-detail.component.ts`](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/restaurants/restaurant-detail/restaurant-detail.component.ts) (Restaurant detail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Application experience"]
  node_routes["App routes<br/>[app.routes.ts]"]
  node_navbar["Navigation bar"]
end

subgraph group_commerce["Restaurant and ordering"]
  node_restaurant_catalog["Restaurant catalog"]
  node_restaurant_detail["Restaurant detail"]
  node_orders_list["Orders and KDS"]
  node_order_detail["Order tracking"]
end

subgraph group_identity["Identity and operations"]
  node_client_signup["Client signup"]
  node_restaurant_signup["Restaurant signup"]
  node_profile["Profile management"]
  node_admin_dashboard["Admin dashboard"]
end

subgraph group_platform["Platform services"]
  node_auth_service["Authentication<br/>[auth.service.ts]"]
  node_address_service["Address geocoding<br/>[address.service.ts]"]
  node_restaurant_service["Restaurant service"]
  node_menu_service["Menu service<br/>[menu.service.ts]"]
  node_cart_service["Cart state<br/>[cart.service.ts]"]
  node_order_service["Order service<br/>[order.service.ts]"]
  node_payment_service["Payments<br/>[payment.service.ts]"]
  node_user_service["User service<br/>[user.service.ts]"]
  node_admin_service["Admin service<br/>[admin.service.ts]"]
  node_auth_interceptor["JWT interceptor"]
end

node_user(("Platform users"))
node_foodrush_api{{"FoodRush REST API"}}
node_opencage{{"OpenCage geocoder"}}
node_payment_provider{{"Mercado Pago"}}

node_user -->|"navigates"| node_routes
node_routes -->|"routes to"| node_restaurant_catalog
node_routes -->|"routes to"| node_restaurant_detail
node_routes -->|"routes to"| node_orders_list
node_routes -->|"routes to"| node_order_detail
node_routes -->|"routes to"| node_profile
node_routes -->|"routes to"| node_client_signup
node_routes -->|"routes to"| node_restaurant_signup
node_routes -->|"routes to"| node_admin_dashboard
node_restaurant_catalog -->|"queries"| node_restaurant_service
node_restaurant_catalog -->|"resolves location"| node_address_service
node_restaurant_detail -->|"loads restaurant"| node_restaurant_service
node_restaurant_detail -->|"estimates delivery"| node_address_service
node_restaurant_detail -->|"loads menu"| node_menu_service
node_restaurant_detail -->|"updates cart"| node_cart_service
node_restaurant_detail -->|"creates orders"| node_order_service
node_orders_list -->|"loads orders"| node_order_service
node_orders_list -->|"loads restaurants"| node_restaurant_service
node_orders_list -->|"checks identity"| node_auth_service
node_order_detail -->|"loads order"| node_order_service
node_order_detail -->|"handles payment"| node_payment_service
node_client_signup -->|"registers user"| node_auth_service
node_client_signup -->|"previews address"| node_address_service
node_restaurant_signup -->|"checks identity"| node_auth_service
node_restaurant_signup -->|"creates restaurant"| node_restaurant_service
node_restaurant_signup -->|"resolves address"| node_address_service
node_profile -->|"reads identity"| node_auth_service
node_profile -->|"manages profile"| node_user_service
node_profile -->|"manages addresses"| node_address_service
node_profile -->|"manages restaurant"| node_restaurant_service
node_profile -->|"connects payments"| node_payment_service
node_admin_dashboard -->|"manages users"| node_admin_service
node_navbar -->|"reads session"| node_auth_service
node_navbar -->|"reads cart"| node_cart_service
node_auth_service -->|"auth requests"| node_foodrush_api
node_address_service -->|"address requests"| node_foodrush_api
node_restaurant_service -->|"restaurant requests"| node_foodrush_api
node_menu_service -->|"menu requests"| node_foodrush_api
node_order_service -->|"order requests"| node_foodrush_api
node_payment_service -->|"payment requests"| node_foodrush_api
node_user_service -->|"user requests"| node_foodrush_api
node_admin_service -->|"admin requests"| node_foodrush_api
node_auth_interceptor -->|"reads token"| node_auth_service
node_address_service -.->|"geocodes via API"| node_opencage
node_payment_service -.->|"payment integration"| node_payment_provider

click node_routes "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/app.routes.ts"
click node_navbar "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/layout/navbar/navbar.component.ts"
click node_client_signup "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/auth/register-client/register-client.component.ts"
click node_restaurant_signup "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/restaurants/register-restaurant/register-restaurant.component.ts"
click node_restaurant_catalog "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/restaurants/restaurant-list/restaurant-list.component.ts"
click node_restaurant_detail "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/restaurants/restaurant-detail/restaurant-detail.component.ts"
click node_orders_list "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/orders/order-list/order-list.component.ts"
click node_order_detail "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/orders/order-detail/order-detail.component.ts"
click node_profile "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/profile/profile.component.ts"
click node_admin_dashboard "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/admin/admin-dashboard/admin-dashboard.component.ts"
click node_auth_service "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/auth.service.ts"
click node_address_service "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/address.service.ts"
click node_restaurant_service "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/restaurant.service.ts"
click node_menu_service "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/menu.service.ts"
click node_cart_service "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/cart.service.ts"
click node_order_service "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/order.service.ts"
click node_payment_service "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/payment.service.ts"
click node_user_service "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/user.service.ts"
click node_admin_service "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/admin.service.ts"
click node_auth_interceptor "https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/interceptors/auth.interceptor.ts"

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_routes,node_navbar,node_user toneBlue
class node_restaurant_catalog,node_restaurant_detail,node_orders_list,node_order_detail toneAmber
class node_client_signup,node_restaurant_signup,node_profile,node_admin_dashboard,node_foodrush_api toneMint
class node_auth_service,node_address_service,node_restaurant_service,node_menu_service,node_cart_service,node_order_service,node_payment_service,node_user_service,node_admin_service,node_auth_interceptor toneRose
class node_opencage,node_payment_provider toneIndigo
```

## Components

### Application experience

- [App routes](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Navigation bar](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/layout/navbar/navbar.component.ts): `src/app/layout/navbar/navbar.component.ts`

### Restaurant and ordering

- [Restaurant catalog](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/restaurants/restaurant-list/restaurant-list.component.ts): `src/app/features/restaurants/restaurant-list/restaurant-list.component.ts`
- [Restaurant detail](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/restaurants/restaurant-detail/restaurant-detail.component.ts): `src/app/features/restaurants/restaurant-detail/restaurant-detail.component.ts`
- [Orders and KDS](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/orders/order-list/order-list.component.ts): `src/app/features/orders/order-list/order-list.component.ts`
- [Order tracking](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/orders/order-detail/order-detail.component.ts): `src/app/features/orders/order-detail/order-detail.component.ts`

### Identity and operations

- [Client signup](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/auth/register-client/register-client.component.ts): `src/app/features/auth/register-client/register-client.component.ts`
- [Restaurant signup](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/restaurants/register-restaurant/register-restaurant.component.ts): `src/app/features/restaurants/register-restaurant/register-restaurant.component.ts`
- [Profile management](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/profile/profile.component.ts): `src/app/features/profile/profile.component.ts`
- [Admin dashboard](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/features/admin/admin-dashboard/admin-dashboard.component.ts): `src/app/features/admin/admin-dashboard/admin-dashboard.component.ts`

### Platform services

- [Authentication](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/auth.service.ts): `src/app/core/services/auth.service.ts`
- [Address geocoding](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/address.service.ts): `src/app/core/services/address.service.ts`
- [Restaurant service](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/restaurant.service.ts): `src/app/core/services/restaurant.service.ts`
- [Menu service](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/menu.service.ts): `src/app/core/services/menu.service.ts`
- [Cart state](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/cart.service.ts): `src/app/core/services/cart.service.ts`
- [Order service](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/order.service.ts): `src/app/core/services/order.service.ts`
- [Payments](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/payment.service.ts): `src/app/core/services/payment.service.ts`
- [User service](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/user.service.ts): `src/app/core/services/user.service.ts`
- [Admin service](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/services/admin.service.ts): `src/app/core/services/admin.service.ts`
- [JWT interceptor](https://github.com/theusinhoiost/foodrush-web/blob/prod/src/app/core/interceptors/auth.interceptor.ts): `src/app/core/interceptors/auth.interceptor.ts`

### Other components

- **Platform users**
- **FoodRush REST API**
- **OpenCage geocoder**
- **Mercado Pago**

## Connections

- Platform users → App routes: navigates (evidence: `src/app/app.routes.ts`)
- App routes → Restaurant catalog: routes to (evidence: `src/app/app.routes.ts`)
- App routes → Restaurant detail: routes to (evidence: `src/app/app.routes.ts`)
- App routes → Orders and KDS: routes to (evidence: `src/app/app.routes.ts`)
- App routes → Order tracking: routes to (evidence: `src/app/app.routes.ts`)
- App routes → Profile management: routes to (evidence: `src/app/app.routes.ts`)
- App routes → Client signup: routes to (evidence: `src/app/app.routes.ts`)
- App routes → Restaurant signup: routes to (evidence: `src/app/app.routes.ts`)
- App routes → Admin dashboard: routes to (evidence: `src/app/app.routes.ts`)
- Restaurant catalog → Restaurant service: queries (evidence: `src/app/features/restaurants/restaurant-list/restaurant-list.component.ts`)
- Restaurant catalog → Address geocoding: resolves location (evidence: `src/app/features/restaurants/restaurant-list/restaurant-list.component.ts`)
- Restaurant detail → Restaurant service: loads restaurant (evidence: `src/app/features/restaurants/restaurant-detail/restaurant-detail.component.ts`)
- Restaurant detail → Address geocoding: estimates delivery (evidence: `src/app/features/restaurants/restaurant-detail/restaurant-detail.component.ts`)
- Restaurant detail → Menu service: loads menu (evidence: `src/app/features/restaurants/restaurant-detail/restaurant-detail.component.ts`)
- Restaurant detail → Cart state: updates cart (evidence: `src/app/features/restaurants/restaurant-detail/restaurant-detail.component.ts`)
- Restaurant detail → Order service: creates orders (evidence: `src/app/features/restaurants/restaurant-detail/restaurant-detail.component.ts`)
- Orders and KDS → Order service: loads orders (evidence: `src/app/features/orders/order-list/order-list.component.ts`)
- Orders and KDS → Restaurant service: loads restaurants (evidence: `src/app/features/orders/order-list/order-list.component.ts`)
- Orders and KDS → Authentication: checks identity (evidence: `src/app/features/orders/order-list/order-list.component.ts`)
- Order tracking → Order service: loads order (evidence: `src/app/features/orders/order-detail/order-detail.component.ts`)
- Order tracking → Payments: handles payment (evidence: `src/app/features/orders/order-detail/order-detail.component.ts`)
- Client signup → Authentication: registers user (evidence: `src/app/features/auth/register-client/register-client.component.ts`)
- Client signup → Address geocoding: previews address (evidence: `src/app/features/auth/register-client/register-client.component.ts`)
- Restaurant signup → Authentication: checks identity (evidence: `src/app/features/restaurants/register-restaurant/register-restaurant.component.ts`)
- Restaurant signup → Restaurant service: creates restaurant (evidence: `src/app/features/restaurants/register-restaurant/register-restaurant.component.ts`)
- Restaurant signup → Address geocoding: resolves address (evidence: `src/app/features/restaurants/register-restaurant/register-restaurant.component.ts`)
- Profile management → Authentication: reads identity (evidence: `src/app/features/profile/profile.component.ts`)
- Profile management → User service: manages profile (evidence: `src/app/features/profile/profile.component.ts`)
- Profile management → Address geocoding: manages addresses (evidence: `src/app/features/profile/profile.component.ts`)
- Profile management → Restaurant service: manages restaurant (evidence: `src/app/features/profile/profile.component.ts`)
- Profile management → Payments: connects payments (evidence: `src/app/features/profile/profile.component.ts`)
- Admin dashboard → Admin service: manages users (evidence: `src/app/features/admin/admin-dashboard/admin-dashboard.component.ts`)
- Navigation bar → Authentication: reads session (evidence: `src/app/layout/navbar/navbar.component.ts`)
- Navigation bar → Cart state: reads cart (evidence: `src/app/layout/navbar/navbar.component.ts`)
- Authentication → FoodRush REST API: auth requests (evidence: `src/app/core/services/auth.service.ts`)
- Address geocoding → FoodRush REST API: address requests (evidence: `src/app/core/services/address.service.ts`)
- Restaurant service → FoodRush REST API: restaurant requests (evidence: `src/app/core/services/restaurant.service.ts`)
- Menu service → FoodRush REST API: menu requests (evidence: `src/app/core/services/menu.service.ts`)
- Order service → FoodRush REST API: order requests (evidence: `src/app/core/services/order.service.ts`)
- Payments → FoodRush REST API: payment requests (evidence: `src/app/core/services/payment.service.ts`)
- User service → FoodRush REST API: user requests (evidence: `src/app/core/services/user.service.ts`)
- Admin service → FoodRush REST API: admin requests
- JWT interceptor → Authentication: reads token (evidence: `src/app/core/interceptors/auth.interceptor.ts`)
- Address geocoding → OpenCage geocoder: geocodes via API (evidence: `README.md`)
- Payments → Mercado Pago: payment integration (evidence: `README.md`)
