# thisapointer/eat-up architecture

> Architecture diagram of the GitHub repository thisapointer/eat-up, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thisapointer/eat-up
- Repository: https://github.com/thisapointer/eat-up

## Overview

Eat-Up is a restaurant-discovery and food-collection app: users find restaurants, record menu visits, and build visit and XP-based spoon-grade progress. The frontend routes users through discovery, restaurant details, certification, and profile/records screens; its APIs connect to a FastAPI backend organized around authentication and restaurant, menu, visit, and favorite domains. The sampled sources establish backend router registration and parts of authentication and restaurant filtering; many feature endpoints and frontend API connections are represented at their documented or indexed subsystem level, with unverified links omitted or dashed.

Main entry points: [`frontend/src/App.jsx`](https://github.com/thisapointer/eat-up/blob/main/frontend/src/App.jsx) (App routes), [`frontend/src/pages/MyPage.jsx`](https://github.com/thisapointer/eat-up/blob/main/frontend/src/pages/MyPage.jsx) (Profile and records), [`backend/app/services/rests.py`](https://github.com/thisapointer/eat-up/blob/main/backend/app/services/rests.py) (Restaurant operations), [`backend/app/main.py`](https://github.com/thisapointer/eat-up/blob/main/backend/app/main.py) (FastAPI application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["App experience"]
  node_app["App routes<br/>[App.jsx]"]
  node_discovery["Restaurant discovery<br/>[MapsMain.jsx]"]
  node_explorer["Explorer state"]
  node_restaurant_ui["Restaurant details"]
  node_cert_ui["Visit certification<br/>[CertPage.jsx]"]
  node_profile["Profile and records<br/>[MyPage.jsx]"]
  node_grade_data["Spoon grade rules<br/>[spoonGradeData.js]"]
end

subgraph group_api["Frontend API"]
  node_api_config["API configuration<br/>[apiConfig.js]"]
  node_restaurant_api["Restaurant API<br/>[restaurantApi.js]"]
  node_account_api["Account APIs<br/>[authApi.jsx]"]
  node_profile_api["Profile APIs<br/>[mypageApi.js]"]
  node_feature_apis["Menu, visit, favorite APIs"]
end

subgraph group_server["Backend services"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_auth_deps["Token user lookup<br/>[dependencies.py]"]
  node_v1["Version 1 endpoints"]
  node_v2_rest["Version 2 restaurants<br/>[rests.py]"]
  node_rest_service["Restaurant operations<br/>[rests.py]"]
  node_user_service["User operations<br/>[users.py]"]
  node_cert_service["Visit certification<br/>[cert.py]"]
end

subgraph group_data["Domain data"]
  node_db_session["Database sessions<br/>[session.py]"]
  node_db[("SQL database<br/>[connection.py]")]
  node_restaurant_model["Restaurant model<br/>[rests.py]"]
  node_user_model["User and favorites<br/>[users.py]"]
  node_cert_model["Visit records<br/>[cert.py]"]
end

node_user(("Food explorer"))

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_discovery
node_app -->|"routes to"| node_cert_ui
node_app -->|"routes to"| node_profile
node_explorer -->|"requests data"| node_restaurant_api
node_restaurant_ui -->|"loads menu images"| node_feature_apis
node_profile -->|"loads profile"| node_profile_api
node_profile -->|"updates favorites"| node_feature_apis
node_profile -->|"uses grade rules"| node_grade_data
node_user -.->|"requests"| node_restaurant_api
node_api_app -->|"registers"| node_auth
node_api_app -->|"registers"| node_v1
node_api_app -->|"registers"| node_v2_rest
node_v2_rest -->|"delegates"| node_rest_service
node_v1 -->|"dispatches certification"| node_cert_service
node_v1 -->|"dispatches user operations"| node_user_service
node_auth -->|"queries user"| node_user_model
node_auth -->|"uses session"| node_db_session
node_auth_deps -->|"loads current user"| node_user_model
node_auth_deps -->|"uses session"| node_db_session
node_rest_service -->|"queries restaurants"| node_restaurant_model
node_rest_service -->|"reads favorites"| node_user_model
node_rest_service -->|"checks visits"| node_cert_model
node_db_session -->|"creates sessions"| node_db
node_api_config -.->|"connects over HTTP"| node_api_app

click node_app "https://github.com/thisapointer/eat-up/blob/main/frontend/src/App.jsx"
click node_discovery "https://github.com/thisapointer/eat-up/blob/main/frontend/src/pages/MapsMain.jsx"
click node_explorer "https://github.com/thisapointer/eat-up/blob/main/frontend/src/hooks/useRestaurantExplorer.js"
click node_restaurant_ui "https://github.com/thisapointer/eat-up/blob/main/frontend/src/components/restaurant/RestaurantSummary.jsx"
click node_cert_ui "https://github.com/thisapointer/eat-up/blob/main/frontend/src/pages/CertPage.jsx"
click node_profile "https://github.com/thisapointer/eat-up/blob/main/frontend/src/pages/MyPage.jsx"
click node_grade_data "https://github.com/thisapointer/eat-up/blob/main/frontend/src/data/spoonGradeData.js"
click node_api_config "https://github.com/thisapointer/eat-up/blob/main/frontend/src/api/apiConfig.js"
click node_restaurant_api "https://github.com/thisapointer/eat-up/blob/main/frontend/src/api/restaurantApi.js"
click node_account_api "https://github.com/thisapointer/eat-up/blob/main/frontend/src/api/authApi.jsx"
click node_profile_api "https://github.com/thisapointer/eat-up/blob/main/frontend/src/api/mypageApi.js"
click node_feature_apis "https://github.com/thisapointer/eat-up/tree/main/frontend/src/api"
click node_api_app "https://github.com/thisapointer/eat-up/blob/main/backend/app/main.py"
click node_auth "https://github.com/thisapointer/eat-up/blob/main/backend/app/routers/auth.py"
click node_auth_deps "https://github.com/thisapointer/eat-up/blob/main/backend/app/routers/dependencies.py"
click node_v1 "https://github.com/thisapointer/eat-up/tree/main/backend/app/routers/v1/endpoints"
click node_v2_rest "https://github.com/thisapointer/eat-up/blob/main/backend/app/routers/v2/endpoints/rests.py"
click node_rest_service "https://github.com/thisapointer/eat-up/blob/main/backend/app/services/rests.py"
click node_user_service "https://github.com/thisapointer/eat-up/blob/main/backend/app/services/users.py"
click node_cert_service "https://github.com/thisapointer/eat-up/blob/main/backend/app/services/cert.py"
click node_db_session "https://github.com/thisapointer/eat-up/blob/main/backend/app/database/session.py"
click node_db "https://github.com/thisapointer/eat-up/blob/main/backend/app/database/connection.py"
click node_restaurant_model "https://github.com/thisapointer/eat-up/blob/main/backend/app/models/rests.py"
click node_user_model "https://github.com/thisapointer/eat-up/blob/main/backend/app/models/users.py"
click node_cert_model "https://github.com/thisapointer/eat-up/blob/main/backend/app/models/cert.py"

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_app,node_discovery,node_explorer,node_restaurant_ui,node_cert_ui,node_profile,node_grade_data toneBlue
class node_api_config,node_restaurant_api,node_account_api,node_profile_api,node_feature_apis toneAmber
class node_api_app,node_auth,node_auth_deps,node_v1,node_v2_rest,node_rest_service,node_user_service,node_cert_service toneMint
class node_db_session,node_db,node_restaurant_model,node_user_model,node_cert_model toneRose
class node_user toneIndigo
```

## Components

### App experience

- [App routes](https://github.com/thisapointer/eat-up/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Restaurant discovery](https://github.com/thisapointer/eat-up/blob/main/frontend/src/pages/MapsMain.jsx): `frontend/src/pages/MapsMain.jsx`
- [Explorer state](https://github.com/thisapointer/eat-up/blob/main/frontend/src/hooks/useRestaurantExplorer.js): `frontend/src/hooks/useRestaurantExplorer.js`
- [Restaurant details](https://github.com/thisapointer/eat-up/blob/main/frontend/src/components/restaurant/RestaurantSummary.jsx): `frontend/src/components/restaurant/RestaurantSummary.jsx`
- [Visit certification](https://github.com/thisapointer/eat-up/blob/main/frontend/src/pages/CertPage.jsx): `frontend/src/pages/CertPage.jsx`
- [Profile and records](https://github.com/thisapointer/eat-up/blob/main/frontend/src/pages/MyPage.jsx): `frontend/src/pages/MyPage.jsx`
- [Spoon grade rules](https://github.com/thisapointer/eat-up/blob/main/frontend/src/data/spoonGradeData.js): `frontend/src/data/spoonGradeData.js`

### Frontend API

- [API configuration](https://github.com/thisapointer/eat-up/blob/main/frontend/src/api/apiConfig.js): `frontend/src/api/apiConfig.js`
- [Restaurant API](https://github.com/thisapointer/eat-up/blob/main/frontend/src/api/restaurantApi.js): `frontend/src/api/restaurantApi.js`
- [Account APIs](https://github.com/thisapointer/eat-up/blob/main/frontend/src/api/authApi.jsx): `frontend/src/api/authApi.jsx`
- [Profile APIs](https://github.com/thisapointer/eat-up/blob/main/frontend/src/api/mypageApi.js): `frontend/src/api/mypageApi.js`
- [Menu, visit, favorite APIs](https://github.com/thisapointer/eat-up/tree/main/frontend/src/api): `frontend/src/api`

### Backend services

- [FastAPI application](https://github.com/thisapointer/eat-up/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/thisapointer/eat-up/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Token user lookup](https://github.com/thisapointer/eat-up/blob/main/backend/app/routers/dependencies.py): `backend/app/routers/dependencies.py`
- [Version 1 endpoints](https://github.com/thisapointer/eat-up/tree/main/backend/app/routers/v1/endpoints): `backend/app/routers/v1/endpoints`
- [Version 2 restaurants](https://github.com/thisapointer/eat-up/blob/main/backend/app/routers/v2/endpoints/rests.py): `backend/app/routers/v2/endpoints/rests.py`
- [Restaurant operations](https://github.com/thisapointer/eat-up/blob/main/backend/app/services/rests.py): `backend/app/services/rests.py`
- [User operations](https://github.com/thisapointer/eat-up/blob/main/backend/app/services/users.py): `backend/app/services/users.py`
- [Visit certification](https://github.com/thisapointer/eat-up/blob/main/backend/app/services/cert.py): `backend/app/services/cert.py`

### Domain data

- [Database sessions](https://github.com/thisapointer/eat-up/blob/main/backend/app/database/session.py): `backend/app/database/session.py`
- [SQL database](https://github.com/thisapointer/eat-up/blob/main/backend/app/database/connection.py): `backend/app/database/connection.py`
- [Restaurant model](https://github.com/thisapointer/eat-up/blob/main/backend/app/models/rests.py): `backend/app/models/rests.py`
- [User and favorites](https://github.com/thisapointer/eat-up/blob/main/backend/app/models/users.py): `backend/app/models/users.py`
- [Visit records](https://github.com/thisapointer/eat-up/blob/main/backend/app/models/cert.py): `backend/app/models/cert.py`

### Other components

- **Food explorer**

## Connections

- Food explorer → App routes: opens (evidence: `frontend/src/App.jsx`)
- App routes → Restaurant discovery: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Visit certification: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Profile and records: routes to (evidence: `frontend/src/App.jsx`)
- Explorer state → Restaurant API: requests data (evidence: `frontend/src/hooks/useRestaurantExplorer.js`)
- Restaurant details → Menu, visit, favorite APIs: loads menu images (evidence: `frontend/src/components/restaurant/RestaurantSummary.jsx`)
- Profile and records → Profile APIs: loads profile (evidence: `frontend/src/pages/MyPage.jsx`)
- Profile and records → Menu, visit, favorite APIs: updates favorites (evidence: `frontend/src/pages/MyPage.jsx`)
- Profile and records → Spoon grade rules: uses grade rules (evidence: `frontend/src/pages/MyPage.jsx`)
- Food explorer → Restaurant API: requests
- FastAPI application → Authentication: registers (evidence: `backend/app/main.py`)
- FastAPI application → Version 1 endpoints: registers (evidence: `backend/app/main.py`)
- FastAPI application → Version 2 restaurants: registers (evidence: `backend/app/main.py`)
- Version 2 restaurants → Restaurant operations: delegates (evidence: `backend/app/routers/v2/endpoints/rests.py`)
- Version 1 endpoints → Visit certification: dispatches certification (evidence: `backend/app/routers/v1/endpoints/cert.py`)
- Version 1 endpoints → User operations: dispatches user operations (evidence: `backend/app/routers/v1/endpoints/users.py`)
- Authentication → User and favorites: queries user (evidence: `backend/app/routers/auth.py`)
- Authentication → Database sessions: uses session (evidence: `backend/app/routers/auth.py`)
- Token user lookup → User and favorites: loads current user (evidence: `backend/app/routers/dependencies.py`)
- Token user lookup → Database sessions: uses session (evidence: `backend/app/routers/dependencies.py`)
- Restaurant operations → Restaurant model: queries restaurants (evidence: `backend/app/services/rests.py`)
- Restaurant operations → User and favorites: reads favorites (evidence: `backend/app/services/rests.py`)
- Restaurant operations → Visit records: checks visits (evidence: `backend/app/services/rests.py`)
- Database sessions → SQL database: creates sessions (evidence: `backend/app/database/session.py`)
- API configuration → FastAPI application: connects over HTTP
