# do-00/skthon_5team_ni architecture

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

- Interactive diagram: https://gitdiagram.com/do-00/skthon_5team_ni
- Repository: https://github.com/do-00/skthon_5team_ni

## Overview

Eco Check helps residents find a building, view its energy-efficiency estimate and neighborhood context, and explore retrofit recommendations and savings. The main flow starts with address search, which tries the beec Spring backend and falls back to local building data, then presents a building report with grades, costs, and what-if analysis. The product also includes apartment search, district comparisons, retrofit-program discovery, accounts, and administration. Several subsystem links are documented in the README; other backend route details are not sampled, so uncertain links are omitted or marked unverified.

Main entry points: [`src/app/report/[buildingId]/page.tsx`](https://github.com/do-00/skthon_5team_ni/blob/main/src/app/report/%5BbuildingId%5D/page.tsx) (Building report), [`src/app/api/remodel-report/route.ts`](https://github.com/do-00/skthon_5team_ni/blob/main/src/app/api/remodel-report/route.ts) (AI remodel report), [`src/data/buildings.ts`](https://github.com/do-00/skthon_5team_ni/blob/main/src/data/buildings.ts) (Building matching), [`src/lib/beec-client.ts`](https://github.com/do-00/skthon_5team_ni/blob/main/src/lib/beec-client.ts) (beec client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Building discovery"]
  node_address_search["Address search<br/>[page.tsx]"]
  node_address_entry["Address entry"]
  node_building_catalog["Building matching<br/>[buildings.ts]"]
  node_building_fixtures[("Building fixtures<br/>[buildings.ts]")]
end

subgraph group_assessment["Energy assessment"]
  node_building_report["Building report<br/>[page.tsx]"]
  node_grade_scale["Grade scale<br/>[grades.ts]"]
  node_energy_cost["Energy cost<br/>[route.ts]"]
  node_report_estimator["Peer estimate"]
  node_district_compare["District comparison"]
  node_district_map["District map<br/>[DistrictMap.tsx]"]
  node_apartment_service["Apartment insights"]
end

subgraph group_retrofit["Retrofit planning"]
  node_remodel_report["AI remodel report<br/>[route.ts]"]
  node_remodel_logic["Report logic<br/>[remodel-report.ts]"]
  node_what_if["What-if model<br/>[what-if.ts]"]
  node_programs["Program explorer<br/>[page.tsx]"]
  node_program_data[("Program catalog<br/>[programs.ts]")]
end

subgraph group_services["Backend services"]
  node_simulation["Retrofit simulation"]
  node_backend_client["beec client<br/>[beec-client.ts]"]
  node_seed_data[("Measured seed data")]
end

subgraph group_product["User services"]
  node_account["Account area<br/>[page.tsx]"]
  node_admin["Admin console<br/>[page.tsx]"]
end

node_resident(("Resident"))
node_gemini{{"Gemini API"}}
node_beec_service{{"beec backend"}}

node_resident -->|"searches"| node_address_search
node_address_search -.->|"offers entry"| node_address_entry
node_address_search -->|"finds buildings"| node_building_catalog
node_building_catalog -->|"matches address"| node_beec_service
node_building_catalog -->|"falls back"| node_building_fixtures
node_resident -->|"opens report"| node_building_report
node_building_report -->|"loads building"| node_building_catalog
node_building_report -->|"uses grades"| node_grade_scale
node_building_report -.->|"requests costs"| node_energy_cost
node_building_catalog -->|"requests matches"| node_backend_client
node_backend_client -->|"calls API"| node_beec_service
node_building_report -.->|"shows estimate"| node_report_estimator
node_report_estimator -->|"queries records"| node_seed_data
node_resident -.->|"views districts"| node_district_map
node_district_map -.->|"loads comparison"| node_district_compare
node_resident -.->|"requests advice"| node_remodel_report
node_remodel_report -->|"simulates measures"| node_backend_client
node_backend_client -.->|"calls simulation"| node_simulation
node_simulation -.->|"uses building data"| node_seed_data
node_remodel_report -->|"maps simulation"| node_what_if
node_remodel_report -->|"builds fallback"| node_remodel_logic
node_remodel_report -->|"requests generation"| node_gemini
node_resident -.->|"explores programs"| node_programs
node_programs -.->|"reads catalog"| node_program_data
node_resident -.->|"manages account"| node_account
node_resident -.->|"administers data"| node_admin
node_beec_service -.->|"serves apartment data"| node_apartment_service

click node_address_search "https://github.com/do-00/skthon_5team_ni/blob/main/src/app/search/page.tsx"
click node_address_entry "https://github.com/do-00/skthon_5team_ni/blob/main/src/app/_components/AddressSearchBar.tsx"
click node_building_catalog "https://github.com/do-00/skthon_5team_ni/blob/main/src/data/buildings.ts"
click node_building_fixtures "https://github.com/do-00/skthon_5team_ni/blob/main/src/data/buildings.ts"
click node_building_report "https://github.com/do-00/skthon_5team_ni/blob/main/src/app/report/%5BbuildingId%5D/page.tsx"
click node_grade_scale "https://github.com/do-00/skthon_5team_ni/blob/main/src/data/grades.ts"
click node_energy_cost "https://github.com/do-00/skthon_5team_ni/blob/main/src/app/api/energy-cost/route.ts"
click node_report_estimator "https://github.com/do-00/skthon_5team_ni/blob/main/beec/src/main/java/com/greenremodel/beec/ReportController.java"
click node_district_compare "https://github.com/do-00/skthon_5team_ni/blob/main/beec/src/main/java/com/greenremodel/beec/DistrictController.java"
click node_district_map "https://github.com/do-00/skthon_5team_ni/blob/main/src/components/domain/DistrictMap.tsx"
click node_apartment_service "https://github.com/do-00/skthon_5team_ni/blob/main/beec/src/main/java/com/greenremodel/beec/ApartmentService.java"
click node_remodel_report "https://github.com/do-00/skthon_5team_ni/blob/main/src/app/api/remodel-report/route.ts"
click node_remodel_logic "https://github.com/do-00/skthon_5team_ni/blob/main/src/lib/remodel-report.ts"
click node_what_if "https://github.com/do-00/skthon_5team_ni/blob/main/src/lib/what-if.ts"
click node_simulation "https://github.com/do-00/skthon_5team_ni/blob/main/beec/src/main/java/com/greenremodel/beec/SimulationController.java"
click node_backend_client "https://github.com/do-00/skthon_5team_ni/blob/main/src/lib/beec-client.ts"
click node_seed_data "https://github.com/do-00/skthon_5team_ni/blob/main/beec/src/main/java/com/greenremodel/beec/SeedDataService.java"
click node_programs "https://github.com/do-00/skthon_5team_ni/blob/main/src/app/programs/page.tsx"
click node_account "https://github.com/do-00/skthon_5team_ni/blob/main/src/app/mypage/page.tsx"
click node_admin "https://github.com/do-00/skthon_5team_ni/blob/main/src/app/admin/page.tsx"
click node_program_data "https://github.com/do-00/skthon_5team_ni/blob/main/src/data/programs.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_address_search,node_address_entry,node_building_catalog,node_building_fixtures toneBlue
class node_building_report,node_grade_scale,node_energy_cost,node_report_estimator,node_district_compare,node_district_map,node_apartment_service toneAmber
class node_remodel_report,node_remodel_logic,node_what_if,node_programs,node_program_data,node_gemini toneMint
class node_simulation,node_backend_client,node_seed_data toneRose
class node_account,node_admin,node_resident,node_beec_service toneIndigo
```

## Components

### Building discovery

- [Address search](https://github.com/do-00/skthon_5team_ni/blob/main/src/app/search/page.tsx): `src/app/search/page.tsx`
- [Address entry](https://github.com/do-00/skthon_5team_ni/blob/main/src/app/_components/AddressSearchBar.tsx): `src/app/_components/AddressSearchBar.tsx`
- [Building matching](https://github.com/do-00/skthon_5team_ni/blob/main/src/data/buildings.ts): `src/data/buildings.ts`
- [Building fixtures](https://github.com/do-00/skthon_5team_ni/blob/main/src/data/buildings.ts): `src/data/buildings.ts`

### Energy assessment

- [Building report](https://github.com/do-00/skthon_5team_ni/blob/main/src/app/report/%5BbuildingId%5D/page.tsx): `src/app/report/[buildingId]/page.tsx`
- [Grade scale](https://github.com/do-00/skthon_5team_ni/blob/main/src/data/grades.ts): `src/data/grades.ts`
- [Energy cost](https://github.com/do-00/skthon_5team_ni/blob/main/src/app/api/energy-cost/route.ts): `src/app/api/energy-cost/route.ts`
- [Peer estimate](https://github.com/do-00/skthon_5team_ni/blob/main/beec/src/main/java/com/greenremodel/beec/ReportController.java): `beec/src/main/java/com/greenremodel/beec/ReportController.java`
- [District comparison](https://github.com/do-00/skthon_5team_ni/blob/main/beec/src/main/java/com/greenremodel/beec/DistrictController.java): `beec/src/main/java/com/greenremodel/beec/DistrictController.java`
- [District map](https://github.com/do-00/skthon_5team_ni/blob/main/src/components/domain/DistrictMap.tsx): `src/components/domain/DistrictMap.tsx`
- [Apartment insights](https://github.com/do-00/skthon_5team_ni/blob/main/beec/src/main/java/com/greenremodel/beec/ApartmentService.java): `beec/src/main/java/com/greenremodel/beec/ApartmentService.java`

### Retrofit planning

- [AI remodel report](https://github.com/do-00/skthon_5team_ni/blob/main/src/app/api/remodel-report/route.ts): `src/app/api/remodel-report/route.ts`
- [Report logic](https://github.com/do-00/skthon_5team_ni/blob/main/src/lib/remodel-report.ts): `src/lib/remodel-report.ts`
- [What-if model](https://github.com/do-00/skthon_5team_ni/blob/main/src/lib/what-if.ts): `src/lib/what-if.ts`
- [Program explorer](https://github.com/do-00/skthon_5team_ni/blob/main/src/app/programs/page.tsx): `src/app/programs/page.tsx`
- [Program catalog](https://github.com/do-00/skthon_5team_ni/blob/main/src/data/programs.ts): `src/data/programs.ts`

### Backend services

- [Retrofit simulation](https://github.com/do-00/skthon_5team_ni/blob/main/beec/src/main/java/com/greenremodel/beec/SimulationController.java): `beec/src/main/java/com/greenremodel/beec/SimulationController.java`
- [beec client](https://github.com/do-00/skthon_5team_ni/blob/main/src/lib/beec-client.ts): `src/lib/beec-client.ts`
- [Measured seed data](https://github.com/do-00/skthon_5team_ni/blob/main/beec/src/main/java/com/greenremodel/beec/SeedDataService.java): `beec/src/main/java/com/greenremodel/beec/SeedDataService.java`

### User services

- [Account area](https://github.com/do-00/skthon_5team_ni/blob/main/src/app/mypage/page.tsx): `src/app/mypage/page.tsx`
- [Admin console](https://github.com/do-00/skthon_5team_ni/blob/main/src/app/admin/page.tsx): `src/app/admin/page.tsx`

### Other components

- **Resident**
- **Gemini API**
- **beec backend**

## Connections

- Resident → Address search: searches (evidence: `src/app/search/page.tsx`)
- Address search → Address entry: offers entry
- Address search → Building matching: finds buildings (evidence: `src/app/search/page.tsx`)
- Building matching → beec backend: matches address (evidence: `README.md`)
- Building matching → Building fixtures: falls back (evidence: `README.md`)
- Resident → Building report: opens report (evidence: `src/app/report/[buildingId]/page.tsx`)
- Building report → Building matching: loads building (evidence: `src/app/report/[buildingId]/page.tsx`)
- Building report → Grade scale: uses grades (evidence: `src/app/report/[buildingId]/page.tsx`)
- Building report → Energy cost: requests costs
- Building matching → beec client: requests matches (evidence: `src/data/buildings.ts`)
- beec client → beec backend: calls API (evidence: `README.md`)
- Building report → Peer estimate: shows estimate
- Peer estimate → Measured seed data: queries records (evidence: `beec/src/main/java/com/greenremodel/beec/ReportController.java`)
- Resident → District map: views districts
- District map → District comparison: loads comparison
- Resident → AI remodel report: requests advice
- AI remodel report → beec client: simulates measures (evidence: `src/app/api/remodel-report/route.ts`)
- beec client → Retrofit simulation: calls simulation
- Retrofit simulation → Measured seed data: uses building data
- AI remodel report → What-if model: maps simulation (evidence: `src/app/api/remodel-report/route.ts`)
- AI remodel report → Report logic: builds fallback (evidence: `src/app/api/remodel-report/route.ts`)
- AI remodel report → Gemini API: requests generation (evidence: `src/app/api/remodel-report/route.ts`)
- Resident → Program explorer: explores programs
- Program explorer → Program catalog: reads catalog
- Resident → Account area: manages account
- Resident → Admin console: administers data
- beec backend → Apartment insights: serves apartment data
