# minseo033/howmuch architecture

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

- Interactive diagram: https://gitdiagram.com/minseo033/howmuch
- Repository: https://github.com/minseo033/howmuch

## Overview

HowMuch is a mobile-centered value-shopping map combining government-listed businesses with user reports. The primary journey is discover nearby stores, contribute price information, then verify a visit and track savings. The backend also supports reviews, community, AI and weather recommendations, notifications, and administration. The supplied tree contains backend and platform bootstrap files but not the Flutter lib/ tree or web admin page, so client-side navigation and some documented backend subsystems are represented only at their supported directory level.

Main entry points: [`howmuch_backend/src/main/java/com/howmuch/service/FirebaseService.java`](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/FirebaseService.java) (Firebase data service), [`howmuch_backend/src/main/java/com/howmuch/controller/VisitController.java`](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/VisitController.java) (Visit verification), [`howmuch_backend/src/main/java/com/howmuch/controller/RecommendationController.java`](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/RecommendationController.java) (Recommendation API), [`howmuch_backend/src/main/java/com/howmuch/service/SessionTokenService.java`](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/SessionTokenService.java) (Session tokens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Mobile clients"]
  node_flutter["Flutter app"]
end

subgraph group_identity["Identity"]
  node_session_auth["Session auth filter"]
  node_session_tokens["Session tokens"]
  node_revocations["Revocation store"]
  node_auth_api["Login API"]
  node_auth_service["Auth service<br/>[AuthService.java]"]
end

subgraph group_discovery["Store discovery"]
  node_store_api["Store search API"]
  node_public_data["Public store catalog"]
  node_kakao_local["Kakao local lookup"]
  node_reports["Price reports"]
  node_report_image["Report image storage"]
  node_recommendations["Recommendation API"]
  node_weather["Weather service"]
end

subgraph group_engagement["Community and savings"]
  node_reviews["Store reviews"]
  node_visits["Visit verification"]
  node_ocr["Receipt OCR"]
  node_reference_prices["Reference prices"]
  node_savings["Savings tracking"]
  node_community["Community feed"]
  node_notifications["Notifications"]
end

subgraph group_operations["Admin and integrations"]
  node_firebase[("Firebase data service")]
  node_admin["Admin review"]
  node_ai["AI recommendations<br/>[GeminiService.java]"]
  node_rate_limiter["Rate limiter"]
end

node_shopper(("Shopper"))
node_firebase_external[("Firebase")]
node_kakao_external["Kakao APIs"]
node_gemini_external["Gemini API"]
node_weather_external["Weather API"]

node_shopper -->|"uses"| node_flutter
node_flutter -.->|"requests stores"| node_store_api
node_flutter -.->|"signs in"| node_auth_api
node_auth_api -.->|"verifies login"| node_auth_service
node_auth_service -.->|"validates token"| node_kakao_external
node_auth_api -.->|"issues session"| node_session_tokens
node_session_auth -->|"verifies token"| node_session_tokens
node_session_tokens -->|"checks revocation"| node_revocations
node_session_tokens -.->|"reads revocations"| node_firebase
node_store_api -.->|"serves catalog"| node_public_data
node_store_api -.->|"looks up places"| node_kakao_local
node_reports -->|"saves reports"| node_firebase
node_reports -->|"geocodes address"| node_kakao_local
node_reports -.->|"stores images"| node_report_image
node_admin -->|"reviews reports"| node_firebase
node_reviews -->|"reads and writes"| node_firebase
node_visits -->|"records visits"| node_firebase
node_visits -->|"analyzes receipt"| node_ocr
node_visits -->|"estimates savings"| node_reference_prices
node_visits -->|"limits requests"| node_rate_limiter
node_visits -.->|"updates savings"| node_savings
node_community -.->|"loads feed"| node_firebase
node_recommendations -->|"loads nearby stores"| node_firebase
node_recommendations -->|"requests suggestions"| node_ai
node_recommendations -->|"gets forecast"| node_weather
node_recommendations -->|"limits requests"| node_rate_limiter
node_weather -.->|"fetches forecast"| node_weather_external
node_ai -.->|"generates advice"| node_gemini_external
node_notifications -->|"manages alerts"| node_firebase
node_firebase -.->|"persists data"| node_firebase_external
node_kakao_local -.->|"queries places"| node_kakao_external

click node_flutter "https://github.com/minseo033/howmuch/tree/main/lib"
click node_session_auth "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/config/SessionAuthFilter.java"
click node_session_tokens "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/SessionTokenService.java"
click node_revocations "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/SessionRevocationStore.java"
click node_auth_api "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/AuthController.java"
click node_auth_service "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/AuthService.java"
click node_firebase "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/FirebaseService.java"
click node_store_api "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/StoresController.java"
click node_public_data "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/PublicDataService.java"
click node_kakao_local "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/KakaoLocalService.java"
click node_reports "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/ReportController.java"
click node_report_image "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/ReportImageStorage.java"
click node_admin "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/AdminController.java"
click node_reviews "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/ReviewController.java"
click node_visits "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/VisitController.java"
click node_ocr "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/ReceiptOcrService.java"
click node_reference_prices "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/ReferencePrices.java"
click node_savings "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/SavingsService.java"
click node_community "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/CommunityController.java"
click node_ai "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/GeminiService.java"
click node_recommendations "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/RecommendationController.java"
click node_weather "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/WeatherService.java"
click node_notifications "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/NotificationController.java"
click node_rate_limiter "https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/SimpleRateLimiter.java"

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_flutter toneBlue
class node_session_auth,node_session_tokens,node_revocations,node_auth_api,node_auth_service,node_firebase_external toneAmber
class node_store_api,node_public_data,node_kakao_local,node_reports,node_report_image,node_recommendations,node_weather,node_kakao_external,node_gemini_external,node_weather_external toneMint
class node_reviews,node_visits,node_ocr,node_reference_prices,node_savings,node_community,node_notifications toneRose
class node_firebase,node_admin,node_ai,node_rate_limiter,node_shopper toneIndigo
```

## Components

### Mobile clients

- [Flutter app](https://github.com/minseo033/howmuch/tree/main/lib): `lib`

### Identity

- [Session auth filter](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/config/SessionAuthFilter.java): `howmuch_backend/src/main/java/com/howmuch/config/SessionAuthFilter.java`
- [Session tokens](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/SessionTokenService.java): `howmuch_backend/src/main/java/com/howmuch/service/SessionTokenService.java`
- [Revocation store](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/SessionRevocationStore.java): `howmuch_backend/src/main/java/com/howmuch/service/SessionRevocationStore.java`
- [Login API](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/AuthController.java): `howmuch_backend/src/main/java/com/howmuch/controller/AuthController.java`
- [Auth service](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/AuthService.java): `howmuch_backend/src/main/java/com/howmuch/service/AuthService.java`

### Store discovery

- [Store search API](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/StoresController.java): `howmuch_backend/src/main/java/com/howmuch/controller/StoresController.java`
- [Public store catalog](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/PublicDataService.java): `howmuch_backend/src/main/java/com/howmuch/service/PublicDataService.java`
- [Kakao local lookup](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/KakaoLocalService.java): `howmuch_backend/src/main/java/com/howmuch/service/KakaoLocalService.java`
- [Price reports](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/ReportController.java): `howmuch_backend/src/main/java/com/howmuch/controller/ReportController.java`
- [Report image storage](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/ReportImageStorage.java): `howmuch_backend/src/main/java/com/howmuch/service/ReportImageStorage.java`
- [Recommendation API](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/RecommendationController.java): `howmuch_backend/src/main/java/com/howmuch/controller/RecommendationController.java`
- [Weather service](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/WeatherService.java): `howmuch_backend/src/main/java/com/howmuch/service/WeatherService.java`

### Community and savings

- [Store reviews](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/ReviewController.java): `howmuch_backend/src/main/java/com/howmuch/controller/ReviewController.java`
- [Visit verification](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/VisitController.java): `howmuch_backend/src/main/java/com/howmuch/controller/VisitController.java`
- [Receipt OCR](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/ReceiptOcrService.java): `howmuch_backend/src/main/java/com/howmuch/service/ReceiptOcrService.java`
- [Reference prices](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/ReferencePrices.java): `howmuch_backend/src/main/java/com/howmuch/service/ReferencePrices.java`
- [Savings tracking](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/SavingsService.java): `howmuch_backend/src/main/java/com/howmuch/service/SavingsService.java`
- [Community feed](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/CommunityController.java): `howmuch_backend/src/main/java/com/howmuch/controller/CommunityController.java`
- [Notifications](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/NotificationController.java): `howmuch_backend/src/main/java/com/howmuch/controller/NotificationController.java`

### Admin and integrations

- [Firebase data service](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/FirebaseService.java): `howmuch_backend/src/main/java/com/howmuch/service/FirebaseService.java`
- [Admin review](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/controller/AdminController.java): `howmuch_backend/src/main/java/com/howmuch/controller/AdminController.java`
- [AI recommendations](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/GeminiService.java): `howmuch_backend/src/main/java/com/howmuch/service/GeminiService.java`
- [Rate limiter](https://github.com/minseo033/howmuch/blob/main/howmuch_backend/src/main/java/com/howmuch/service/SimpleRateLimiter.java): `howmuch_backend/src/main/java/com/howmuch/service/SimpleRateLimiter.java`

### Other components

- **Shopper**
- **Firebase**
- **Kakao APIs**
- **Gemini API**
- **Weather API**

## Connections

- Shopper → Flutter app: uses (evidence: `README.md`)
- Flutter app → Store search API: requests stores
- Flutter app → Login API: signs in
- Login API → Auth service: verifies login
- Auth service → Kakao APIs: validates token (evidence: `README.md`)
- Login API → Session tokens: issues session
- Session auth filter → Session tokens: verifies token (evidence: `howmuch_backend/src/main/java/com/howmuch/config/SessionAuthFilter.java`)
- Session tokens → Revocation store: checks revocation (evidence: `howmuch_backend/src/main/java/com/howmuch/service/SessionTokenService.java`)
- Session tokens → Firebase data service: reads revocations
- Store search API → Public store catalog: serves catalog (evidence: `README.md`)
- Store search API → Kakao local lookup: looks up places
- Price reports → Firebase data service: saves reports (evidence: `howmuch_backend/src/main/java/com/howmuch/controller/ReportController.java`)
- Price reports → Kakao local lookup: geocodes address (evidence: `howmuch_backend/src/main/java/com/howmuch/controller/ReportController.java`)
- Price reports → Report image storage: stores images
- Admin review → Firebase data service: reviews reports (evidence: `howmuch_backend/src/main/java/com/howmuch/controller/AdminController.java`)
- Store reviews → Firebase data service: reads and writes (evidence: `howmuch_backend/src/main/java/com/howmuch/controller/ReviewController.java`)
- Visit verification → Firebase data service: records visits (evidence: `howmuch_backend/src/main/java/com/howmuch/controller/VisitController.java`)
- Visit verification → Receipt OCR: analyzes receipt (evidence: `howmuch_backend/src/main/java/com/howmuch/controller/VisitController.java`)
- Visit verification → Reference prices: estimates savings (evidence: `howmuch_backend/src/main/java/com/howmuch/controller/VisitController.java`)
- Visit verification → Rate limiter: limits requests (evidence: `howmuch_backend/src/main/java/com/howmuch/controller/VisitController.java`)
- Visit verification → Savings tracking: updates savings
- Community feed → Firebase data service: loads feed
- Recommendation API → Firebase data service: loads nearby stores (evidence: `howmuch_backend/src/main/java/com/howmuch/controller/RecommendationController.java`)
- Recommendation API → AI recommendations: requests suggestions (evidence: `howmuch_backend/src/main/java/com/howmuch/controller/RecommendationController.java`)
- Recommendation API → Weather service: gets forecast (evidence: `howmuch_backend/src/main/java/com/howmuch/controller/RecommendationController.java`)
- Recommendation API → Rate limiter: limits requests (evidence: `howmuch_backend/src/main/java/com/howmuch/controller/RecommendationController.java`)
- Weather service → Weather API: fetches forecast (evidence: `README.md`)
- AI recommendations → Gemini API: generates advice (evidence: `README.md`)
- Notifications → Firebase data service: manages alerts (evidence: `howmuch_backend/src/main/java/com/howmuch/controller/NotificationController.java`)
- Firebase data service → Firebase: persists data (evidence: `README.md`)
- Kakao local lookup → Kakao APIs: queries places (evidence: `README.md`)
