# ggc-sd/satisfeedschools architecture

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

- Interactive diagram: https://gitdiagram.com/ggc-sd/satisfeedschools
- Repository: https://github.com/ggc-sd/satisfeedschools

## Overview

Satisfeed is an authenticated dashboard for exploring food-assistance demographics and distribution, managing data versions, and viewing geographic context around Georgia schools and libraries. The main user workflow is to sign in, select a data version, and inspect summaries or map-based insights; administrators can also upload data and manage versions. A separate distribution-data workflow parses CSVs, cleans and aggregates addresses, geocodes them, and produces privacy-rounded map data. The graph combines sampled call relationships with README-documented capabilities; unsampled feature internals are represented by their existing source paths.

Main entry points: [`code/src/app/api/csv-geocode-upload/geocode/route.ts`](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/csv-geocode-upload/geocode/route.ts) (Distribution geocoder), [`code/src/app/summary/page.tsx`](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/summary/page.tsx) (Summary reports), [`code/src/app/dashboard-insights/components/dashboard-content-display.tsx`](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/components/dashboard-content-display.tsx) (Insights panels), [`code/src/app/dashboard-insights/components/displays/school-display.tsx`](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/components/displays/school-display.tsx) (School insights)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and versions"]
  node_login["Sign-in<br/>[page.tsx]"]
  node_registration["Registration<br/>[page.tsx]"]
  node_versions["Version management<br/>[page.tsx]"]
  node_version_selector["Version selector"]
end

subgraph group_reporting["Demographic reporting"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_summary["Summary reports<br/>[page.tsx]"]
  node_demographic_charts["Demographic charts"]
  node_county_zip_maps["County and ZIP maps<br/>[CountyMap.tsx]"]
end

subgraph group_insights["Geographic insights"]
  node_insights["Insights dashboard<br/>[page.tsx]"]
  node_insights_tabs["Insights panels"]
  node_school_display["School insights<br/>[school-display.tsx]"]
  node_library_display["Library insights"]
  node_school_map["Schools map"]
  node_library_map["Libraries map"]
end

subgraph group_ingestion["Data ingestion"]
  node_upload_page["Upload interface<br/>[page.tsx]"]
  node_upload_api["Data upload API<br/>[route.tsx]"]
  node_geo_upload["Distribution geocoder<br/>[route.ts]"]
  node_csv_parser["CSV parsing<br/>[parse.ts]"]
  node_address_filters["Address filtering<br/>[filters.ts]"]
  node_aggregation["Address aggregation<br/>[aggregate.ts]"]
  node_geojson["GeoJSON output<br/>[geojson.ts]"]
end

subgraph group_platform["Data services"]
  node_auth["Firebase Auth<br/>[firebaseConfig.tsx]"]
  node_results_api["Summary results API<br/>[route.tsx]"]
  node_locationiq["LocationIQ geocoding<br/>[locationiq.ts]"]
  node_firestore[("Firebase data store<br/>[firebaseConfig.tsx]")]
end

node_user(("Dashboard user"))

node_user -->|"signs in"| node_login
node_login -->|"authenticates with"| node_auth
node_user -->|"creates account"| node_registration
node_registration -->|"registers with"| node_auth
node_user -->|"opens dashboard"| node_dashboard
node_user -->|"manages versions"| node_versions
node_user -->|"uploads raw data"| node_upload_page
node_upload_page -.->|"submits upload"| node_upload_api
node_user -->|"views summaries"| node_summary
node_summary -->|"selects version"| node_version_selector
node_summary -->|"fetches results"| node_results_api
node_summary -->|"renders charts"| node_demographic_charts
node_user -->|"opens insights"| node_insights
node_insights -->|"renders panels"| node_insights_tabs
node_insights_tabs -->|"shows schools"| node_school_display
node_insights_tabs -->|"shows libraries"| node_library_display
node_school_display -->|"renders map"| node_school_map
node_school_display -.->|"shows geography"| node_county_zip_maps
node_library_display -.->|"renders map"| node_library_map
node_geo_upload -->|"parses CSV"| node_csv_parser
node_geo_upload -->|"filters addresses"| node_address_filters
node_geo_upload -->|"counts and bins"| node_aggregation
node_geo_upload -->|"geocodes addresses"| node_locationiq
node_geo_upload -->|"builds features"| node_geojson
node_geo_upload -.->|"publishes map data"| node_school_map

click node_login "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/page.tsx"
click node_registration "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/register/page.tsx"
click node_auth "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/firebase/firebaseConfig.tsx"
click node_dashboard "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard/page.tsx"
click node_versions "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/manage-versions/page.tsx"
click node_version_selector "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/components/VersionSelector.tsx"
click node_summary "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/summary/page.tsx"
click node_results_api "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/getResults/route.tsx"
click node_demographic_charts "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/components/ui/DemographicCharts.tsx"
click node_county_zip_maps "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/components/CountyMap.tsx"
click node_upload_page "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/upload/page.tsx"
click node_upload_api "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/upload/route.tsx"
click node_insights "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/page.tsx"
click node_insights_tabs "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/components/dashboard-content-display.tsx"
click node_school_display "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/components/displays/school-display.tsx"
click node_library_display "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/components/displays/library-display.tsx"
click node_school_map "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/components/map/dashboard-schools-map.tsx"
click node_library_map "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/components/map/dashboard-library-map.tsx"
click node_geo_upload "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/csv-geocode-upload/geocode/route.ts"
click node_csv_parser "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/csv-geocode-upload/parse.ts"
click node_address_filters "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/csv-geocode-upload/filters.ts"
click node_aggregation "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/csv-geocode-upload/aggregate.ts"
click node_geojson "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/csv-geocode-upload/geojson.ts"
click node_locationiq "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/csv-geocode-upload/locationiq.ts"
click node_firestore "https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/firebase/firebaseConfig.tsx"

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_login,node_registration,node_versions,node_version_selector,node_user toneBlue
class node_dashboard,node_summary,node_demographic_charts,node_county_zip_maps toneAmber
class node_insights,node_insights_tabs,node_school_display,node_library_display,node_school_map,node_library_map toneMint
class node_upload_page,node_upload_api,node_geo_upload,node_csv_parser,node_address_filters,node_aggregation,node_geojson toneRose
class node_auth,node_results_api,node_locationiq,node_firestore toneIndigo
```

## Components

### Access and versions

- [Sign-in](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/page.tsx): `code/src/app/page.tsx`
- [Registration](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/register/page.tsx): `code/src/app/register/page.tsx`
- [Version management](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/manage-versions/page.tsx): `code/src/app/manage-versions/page.tsx`
- [Version selector](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/components/VersionSelector.tsx): `code/src/components/VersionSelector.tsx`

### Demographic reporting

- [Dashboard](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard/page.tsx): `code/src/app/dashboard/page.tsx`
- [Summary reports](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/summary/page.tsx): `code/src/app/summary/page.tsx`
- [Demographic charts](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/components/ui/DemographicCharts.tsx): `code/src/components/ui/DemographicCharts.tsx`
- [County and ZIP maps](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/components/CountyMap.tsx): `code/src/components/CountyMap.tsx`

### Geographic insights

- [Insights dashboard](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/page.tsx): `code/src/app/dashboard-insights/page.tsx`
- [Insights panels](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/components/dashboard-content-display.tsx): `code/src/app/dashboard-insights/components/dashboard-content-display.tsx`
- [School insights](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/components/displays/school-display.tsx): `code/src/app/dashboard-insights/components/displays/school-display.tsx`
- [Library insights](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/components/displays/library-display.tsx): `code/src/app/dashboard-insights/components/displays/library-display.tsx`
- [Schools map](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/components/map/dashboard-schools-map.tsx): `code/src/app/dashboard-insights/components/map/dashboard-schools-map.tsx`
- [Libraries map](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/dashboard-insights/components/map/dashboard-library-map.tsx): `code/src/app/dashboard-insights/components/map/dashboard-library-map.tsx`

### Data ingestion

- [Upload interface](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/upload/page.tsx): `code/src/app/upload/page.tsx`
- [Data upload API](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/upload/route.tsx): `code/src/app/api/upload/route.tsx`
- [Distribution geocoder](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/csv-geocode-upload/geocode/route.ts): `code/src/app/api/csv-geocode-upload/geocode/route.ts`
- [CSV parsing](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/csv-geocode-upload/parse.ts): `code/src/app/api/csv-geocode-upload/parse.ts`
- [Address filtering](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/csv-geocode-upload/filters.ts): `code/src/app/api/csv-geocode-upload/filters.ts`
- [Address aggregation](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/csv-geocode-upload/aggregate.ts): `code/src/app/api/csv-geocode-upload/aggregate.ts`
- [GeoJSON output](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/csv-geocode-upload/geojson.ts): `code/src/app/api/csv-geocode-upload/geojson.ts`

### Data services

- [Firebase Auth](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/firebase/firebaseConfig.tsx): `code/src/firebase/firebaseConfig.tsx`
- [Summary results API](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/getResults/route.tsx): `code/src/app/api/getResults/route.tsx`
- [LocationIQ geocoding](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/app/api/csv-geocode-upload/locationiq.ts): `code/src/app/api/csv-geocode-upload/locationiq.ts`
- [Firebase data store](https://github.com/ggc-sd/satisfeedschools/blob/main/code/src/firebase/firebaseConfig.tsx): `code/src/firebase/firebaseConfig.tsx`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Sign-in: signs in (evidence: `code/src/app/page.tsx`)
- Sign-in → Firebase Auth: authenticates with (evidence: `code/src/app/page.tsx`)
- Dashboard user → Registration: creates account (evidence: `code/src/app/register/page.tsx`)
- Registration → Firebase Auth: registers with (evidence: `code/src/app/register/page.tsx`)
- Dashboard user → Dashboard: opens dashboard (evidence: `README.md`)
- Dashboard user → Version management: manages versions (evidence: `README.md`)
- Dashboard user → Upload interface: uploads raw data (evidence: `README.md`)
- Upload interface → Data upload API: submits upload
- Dashboard user → Summary reports: views summaries (evidence: `README.md`)
- Summary reports → Version selector: selects version (evidence: `code/src/app/summary/page.tsx`)
- Summary reports → Summary results API: fetches results (evidence: `code/src/app/summary/page.tsx`)
- Summary reports → Demographic charts: renders charts (evidence: `code/src/app/summary/page.tsx`)
- Dashboard user → Insights dashboard: opens insights (evidence: `README.md`)
- Insights dashboard → Insights panels: renders panels (evidence: `code/src/app/dashboard-insights/page.tsx`)
- Insights panels → School insights: shows schools (evidence: `code/src/app/dashboard-insights/components/dashboard-content-display.tsx`)
- Insights panels → Library insights: shows libraries (evidence: `code/src/app/dashboard-insights/components/dashboard-content-display.tsx`)
- School insights → Schools map: renders map (evidence: `code/src/app/dashboard-insights/components/displays/school-display.tsx`)
- School insights → County and ZIP maps: shows geography
- Library insights → Libraries map: renders map
- Distribution geocoder → CSV parsing: parses CSV (evidence: `code/src/app/api/csv-geocode-upload/geocode/route.ts`)
- Distribution geocoder → Address filtering: filters addresses (evidence: `code/src/app/api/csv-geocode-upload/geocode/route.ts`)
- Distribution geocoder → Address aggregation: counts and bins (evidence: `code/src/app/api/csv-geocode-upload/geocode/route.ts`)
- Distribution geocoder → LocationIQ geocoding: geocodes addresses (evidence: `code/src/app/api/csv-geocode-upload/geocode/route.ts`)
- Distribution geocoder → GeoJSON output: builds features (evidence: `code/src/app/api/csv-geocode-upload/geocode/route.ts`)
- Distribution geocoder → Schools map: publishes map data
