# joscripty/bettersantonino architecture

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

- Interactive diagram: https://gitdiagram.com/joscripty/bettersantonino
- Repository: https://github.com/joscripty/bettersantonino

## Overview

This is a React-based multilingual civic information portal for a Philippine local government. Visitors enter through the routed app and browse services, government information, public records, emergency hotlines, and search; document routes render detailed content. YAML-backed category data, Markdown loading, and search/transparency helpers are key internal layers. The README describes accessibility, responsive design, theming, and SEO; sampled excerpts establish routing and several data flows, while some feature-specific implementation details remain unsampled.

Main entry points: [`src/App.tsx`](https://github.com/joscripty/bettersantonino/blob/main/src/App.tsx) (Routed application), [`src/data/yamlLoader.ts`](https://github.com/joscripty/bettersantonino/blob/main/src/data/yamlLoader.ts) (YAML content loader), [`src/data/navigation.ts`](https://github.com/joscripty/bettersantonino/blob/main/src/data/navigation.ts) (Navigation definitions), [`src/lib/localSearch.ts`](https://github.com/joscripty/bettersantonino/blob/main/src/lib/localSearch.ts) (Local search index)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Visitor experience"]
  node_app["Routed application<br/>[App.tsx]"]
  node_home["Home page<br/>[Home.tsx]"]
  node_services["Services pages<br/>[Services.tsx]"]
  node_government["Government pages<br/>[Government.tsx]"]
  node_documents["Content documents<br/>[Document.tsx]"]
  node_transparency["Transparency records<br/>[Transparency.tsx]"]
  node_hotlines["Emergency hotlines<br/>[Hotlines.tsx]"]
  node_about["About page<br/>[About.tsx]"]
  node_search["Search page<br/>[Search.tsx]"]
  node_notfound["Not found page<br/>[NotFound.tsx]"]
  node_service_catalog["Service category display"]
  node_hero["Search hero<br/>[Hero.tsx]"]
  node_government_activity["Government activity"]
end

subgraph group_content["Content and discovery"]
  node_yaml["YAML content loader<br/>[yamlLoader.ts]"]
  node_markdown["Markdown renderer<br/>[markdownLoader.ts]"]
  node_markdown_components["Markdown components"]
  node_local_search["Local search index<br/>[localSearch.ts]"]
  node_meili["Meilisearch client<br/>[meilisearch.ts]"]
  node_transparency_data["Transparency data loader"]
  node_record_table["Record table<br/>[RecordTable.tsx]"]
  node_hotline_data["Hotline directory data<br/>[hotlines.ts]"]
end

subgraph group_shared["Shared site services"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
  node_footer["Footer links<br/>[Footer.tsx]"]
  node_navigation_data["Navigation definitions<br/>[navigation.ts]"]
  node_seo["SEO metadata<br/>[SEO.tsx]"]
  node_site_config["Site configuration<br/>[site.ts]"]
  node_core_ui["Shared UI primitives"]
  node_typography["Typography themes"]
  node_main["Application entry<br/>[main.tsx]"]
end

subgraph group_language["Language support"]
  node_i18n["Internationalization setup<br/>[i18n.ts]"]
  node_languages["Language definitions<br/>[languages.ts]"]
  node_translation_hook["Translation hook<br/>[useTranslation.ts]"]
end

node_visitor(("Site visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_services
node_app -->|"routes to"| node_government
node_app -->|"routes to"| node_documents
node_app -->|"routes to"| node_transparency
node_app -->|"routes to"| node_hotlines
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_search
node_app -->|"routes to"| node_notfound
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_service_catalog
node_home -->|"renders"| node_government_activity
node_services -->|"loads categories"| node_yaml
node_services -->|"renders"| node_service_catalog
node_government -->|"loads categories"| node_yaml
node_documents -->|"loads content"| node_markdown
node_documents -->|"renders with"| node_markdown_components
node_documents -->|"reads category data"| node_yaml
node_search -->|"searches locally"| node_local_search
node_search -->|"queries"| node_meili
node_local_search -->|"indexes pages"| node_yaml
node_local_search -->|"reads navigation"| node_navigation_data
node_local_search -->|"searches records"| node_transparency_data
node_transparency -->|"loads records"| node_transparency_data
node_transparency -->|"renders records"| node_record_table
node_transparency -->|"reads sections"| node_navigation_data
node_hotlines -->|"displays directory"| node_hotline_data
node_navbar -->|"uses links"| node_navigation_data
node_footer -->|"uses links"| node_navigation_data
node_navigation_data -->|"builds category links"| node_yaml
node_navigation_data -->|"reads site links"| node_site_config
node_seo -->|"reads metadata defaults"| node_site_config
node_main -->|"initializes"| node_i18n
node_i18n -->|"uses definitions"| node_languages
node_service_catalog -->|"translates labels"| node_translation_hook
node_service_catalog -->|"reads categories"| node_yaml
node_core_ui -.->|"supports themes"| node_typography
node_hero -->|"uses search"| node_local_search
node_government_activity -.->|"uses category data"| node_yaml

click node_app "https://github.com/joscripty/bettersantonino/blob/main/src/App.tsx"
click node_home "https://github.com/joscripty/bettersantonino/blob/main/src/pages/Home.tsx"
click node_services "https://github.com/joscripty/bettersantonino/blob/main/src/pages/Services.tsx"
click node_government "https://github.com/joscripty/bettersantonino/blob/main/src/pages/Government.tsx"
click node_documents "https://github.com/joscripty/bettersantonino/blob/main/src/pages/Document.tsx"
click node_transparency "https://github.com/joscripty/bettersantonino/blob/main/src/pages/Transparency.tsx"
click node_hotlines "https://github.com/joscripty/bettersantonino/blob/main/src/pages/Hotlines.tsx"
click node_about "https://github.com/joscripty/bettersantonino/blob/main/src/pages/About.tsx"
click node_search "https://github.com/joscripty/bettersantonino/blob/main/src/pages/Search.tsx"
click node_notfound "https://github.com/joscripty/bettersantonino/blob/main/src/pages/NotFound.tsx"
click node_service_catalog "https://github.com/joscripty/bettersantonino/blob/main/src/components/home/ServicesSection.tsx"
click node_yaml "https://github.com/joscripty/bettersantonino/blob/main/src/data/yamlLoader.ts"
click node_markdown "https://github.com/joscripty/bettersantonino/blob/main/src/lib/markdownLoader.ts"
click node_markdown_components "https://github.com/joscripty/bettersantonino/blob/main/src/lib/markdownComponents.tsx"
click node_local_search "https://github.com/joscripty/bettersantonino/blob/main/src/lib/localSearch.ts"
click node_meili "https://github.com/joscripty/bettersantonino/blob/main/src/lib/meilisearch.ts"
click node_transparency_data "https://github.com/joscripty/bettersantonino/blob/main/src/lib/transparencyLoader.ts"
click node_record_table "https://github.com/joscripty/bettersantonino/blob/main/src/components/transparency/RecordTable.tsx"
click node_hotline_data "https://github.com/joscripty/bettersantonino/blob/main/src/data/hotlines.ts"
click node_navbar "https://github.com/joscripty/bettersantonino/blob/main/src/components/layout/Navbar.tsx"
click node_footer "https://github.com/joscripty/bettersantonino/blob/main/src/components/layout/Footer.tsx"
click node_navigation_data "https://github.com/joscripty/bettersantonino/blob/main/src/data/navigation.ts"
click node_seo "https://github.com/joscripty/bettersantonino/blob/main/src/components/SEO.tsx"
click node_site_config "https://github.com/joscripty/bettersantonino/blob/main/src/config/site.ts"
click node_i18n "https://github.com/joscripty/bettersantonino/blob/main/src/i18n.ts"
click node_languages "https://github.com/joscripty/bettersantonino/blob/main/src/i18n/languages.ts"
click node_translation_hook "https://github.com/joscripty/bettersantonino/blob/main/src/hooks/useTranslation.ts"
click node_core_ui "https://github.com/joscripty/bettersantonino/tree/main/src/components/ui"
click node_typography "https://github.com/joscripty/bettersantonino/blob/main/src/lib/typographyThemes.ts"
click node_hero "https://github.com/joscripty/bettersantonino/blob/main/src/components/sections/Hero.tsx"
click node_government_activity "https://github.com/joscripty/bettersantonino/blob/main/src/components/home/GovernmentActivitySection.tsx"
click node_main "https://github.com/joscripty/bettersantonino/blob/main/src/main.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_app,node_home,node_services,node_government,node_documents,node_transparency,node_hotlines,node_about,node_search,node_notfound,node_service_catalog,node_hero,node_government_activity toneBlue
class node_yaml,node_markdown,node_markdown_components,node_local_search,node_meili,node_transparency_data,node_record_table,node_hotline_data toneAmber
class node_navbar,node_footer,node_navigation_data,node_seo,node_site_config,node_core_ui,node_typography,node_main toneMint
class node_i18n,node_languages,node_translation_hook toneRose
class node_visitor toneIndigo
```

## Components

### Visitor experience

- [Routed application](https://github.com/joscripty/bettersantonino/blob/main/src/App.tsx): `src/App.tsx`
- [Home page](https://github.com/joscripty/bettersantonino/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Services pages](https://github.com/joscripty/bettersantonino/blob/main/src/pages/Services.tsx): `src/pages/Services.tsx`
- [Government pages](https://github.com/joscripty/bettersantonino/blob/main/src/pages/Government.tsx): `src/pages/Government.tsx`
- [Content documents](https://github.com/joscripty/bettersantonino/blob/main/src/pages/Document.tsx): `src/pages/Document.tsx`
- [Transparency records](https://github.com/joscripty/bettersantonino/blob/main/src/pages/Transparency.tsx): `src/pages/Transparency.tsx`
- [Emergency hotlines](https://github.com/joscripty/bettersantonino/blob/main/src/pages/Hotlines.tsx): `src/pages/Hotlines.tsx`
- [About page](https://github.com/joscripty/bettersantonino/blob/main/src/pages/About.tsx): `src/pages/About.tsx`
- [Search page](https://github.com/joscripty/bettersantonino/blob/main/src/pages/Search.tsx): `src/pages/Search.tsx`
- [Not found page](https://github.com/joscripty/bettersantonino/blob/main/src/pages/NotFound.tsx): `src/pages/NotFound.tsx`
- [Service category display](https://github.com/joscripty/bettersantonino/blob/main/src/components/home/ServicesSection.tsx): `src/components/home/ServicesSection.tsx`
- [Search hero](https://github.com/joscripty/bettersantonino/blob/main/src/components/sections/Hero.tsx): `src/components/sections/Hero.tsx`
- [Government activity](https://github.com/joscripty/bettersantonino/blob/main/src/components/home/GovernmentActivitySection.tsx): `src/components/home/GovernmentActivitySection.tsx`

### Content and discovery

- [YAML content loader](https://github.com/joscripty/bettersantonino/blob/main/src/data/yamlLoader.ts): `src/data/yamlLoader.ts`
- [Markdown renderer](https://github.com/joscripty/bettersantonino/blob/main/src/lib/markdownLoader.ts): `src/lib/markdownLoader.ts`
- [Markdown components](https://github.com/joscripty/bettersantonino/blob/main/src/lib/markdownComponents.tsx): `src/lib/markdownComponents.tsx`
- [Local search index](https://github.com/joscripty/bettersantonino/blob/main/src/lib/localSearch.ts): `src/lib/localSearch.ts`
- [Meilisearch client](https://github.com/joscripty/bettersantonino/blob/main/src/lib/meilisearch.ts): `src/lib/meilisearch.ts`
- [Transparency data loader](https://github.com/joscripty/bettersantonino/blob/main/src/lib/transparencyLoader.ts): `src/lib/transparencyLoader.ts`
- [Record table](https://github.com/joscripty/bettersantonino/blob/main/src/components/transparency/RecordTable.tsx): `src/components/transparency/RecordTable.tsx`
- [Hotline directory data](https://github.com/joscripty/bettersantonino/blob/main/src/data/hotlines.ts): `src/data/hotlines.ts`

### Shared site services

- [Navigation](https://github.com/joscripty/bettersantonino/blob/main/src/components/layout/Navbar.tsx): `src/components/layout/Navbar.tsx`
- [Footer links](https://github.com/joscripty/bettersantonino/blob/main/src/components/layout/Footer.tsx): `src/components/layout/Footer.tsx`
- [Navigation definitions](https://github.com/joscripty/bettersantonino/blob/main/src/data/navigation.ts): `src/data/navigation.ts`
- [SEO metadata](https://github.com/joscripty/bettersantonino/blob/main/src/components/SEO.tsx): `src/components/SEO.tsx`
- [Site configuration](https://github.com/joscripty/bettersantonino/blob/main/src/config/site.ts): `src/config/site.ts`
- [Shared UI primitives](https://github.com/joscripty/bettersantonino/tree/main/src/components/ui): `src/components/ui`
- [Typography themes](https://github.com/joscripty/bettersantonino/blob/main/src/lib/typographyThemes.ts): `src/lib/typographyThemes.ts`
- [Application entry](https://github.com/joscripty/bettersantonino/blob/main/src/main.tsx): `src/main.tsx`

### Language support

- [Internationalization setup](https://github.com/joscripty/bettersantonino/blob/main/src/i18n.ts): `src/i18n.ts`
- [Language definitions](https://github.com/joscripty/bettersantonino/blob/main/src/i18n/languages.ts): `src/i18n/languages.ts`
- [Translation hook](https://github.com/joscripty/bettersantonino/blob/main/src/hooks/useTranslation.ts): `src/hooks/useTranslation.ts`

### Other components

- **Site visitor**

## Connections

- Site visitor → Routed application: opens (evidence: `src/App.tsx`)
- Routed application → Home page: routes to (evidence: `src/App.tsx`)
- Routed application → Services pages: routes to (evidence: `src/App.tsx`)
- Routed application → Government pages: routes to (evidence: `src/App.tsx`)
- Routed application → Content documents: routes to (evidence: `src/App.tsx`)
- Routed application → Transparency records: routes to (evidence: `src/App.tsx`)
- Routed application → Emergency hotlines: routes to (evidence: `src/App.tsx`)
- Routed application → About page: routes to (evidence: `src/App.tsx`)
- Routed application → Search page: routes to (evidence: `src/App.tsx`)
- Routed application → Not found page: routes to (evidence: `src/App.tsx`)
- Home page → Search hero: renders (evidence: `src/pages/Home.tsx`)
- Home page → Service category display: renders (evidence: `src/pages/Home.tsx`)
- Home page → Government activity: renders (evidence: `src/pages/Home.tsx`)
- Services pages → YAML content loader: loads categories (evidence: `src/pages/Services.tsx`)
- Services pages → Service category display: renders (evidence: `src/pages/Services.tsx`)
- Government pages → YAML content loader: loads categories (evidence: `src/pages/Government.tsx`)
- Content documents → Markdown renderer: loads content (evidence: `src/pages/Document.tsx`)
- Content documents → Markdown components: renders with (evidence: `src/pages/Document.tsx`)
- Content documents → YAML content loader: reads category data (evidence: `src/pages/Document.tsx`)
- Search page → Local search index: searches locally (evidence: `src/pages/Search.tsx`)
- Search page → Meilisearch client: queries (evidence: `src/pages/Search.tsx`)
- Local search index → YAML content loader: indexes pages (evidence: `src/lib/localSearch.ts`)
- Local search index → Navigation definitions: reads navigation (evidence: `src/lib/localSearch.ts`)
- Local search index → Transparency data loader: searches records (evidence: `src/lib/localSearch.ts`)
- Transparency records → Transparency data loader: loads records (evidence: `src/pages/Transparency.tsx`)
- Transparency records → Record table: renders records (evidence: `src/pages/Transparency.tsx`)
- Transparency records → Navigation definitions: reads sections (evidence: `src/pages/Transparency.tsx`)
- Emergency hotlines → Hotline directory data: displays directory (evidence: `src/pages/Hotlines.tsx`)
- Navigation → Navigation definitions: uses links (evidence: `src/components/layout/Navbar.tsx`)
- Footer links → Navigation definitions: uses links (evidence: `src/components/layout/Footer.tsx`)
- Navigation definitions → YAML content loader: builds category links (evidence: `src/data/navigation.ts`)
- Navigation definitions → Site configuration: reads site links (evidence: `src/data/navigation.ts`)
- SEO metadata → Site configuration: reads metadata defaults (evidence: `src/components/SEO.tsx`)
- Application entry → Internationalization setup: initializes (evidence: `src/main.tsx`)
- Internationalization setup → Language definitions: uses definitions (evidence: `src/i18n.ts`)
- Service category display → Translation hook: translates labels (evidence: `src/components/home/ServicesSection.tsx`)
- Service category display → YAML content loader: reads categories (evidence: `src/components/home/ServicesSection.tsx`)
- Shared UI primitives → Typography themes: supports themes (evidence: `src/components/ui/ThemeSelector.tsx`)
- Search hero → Local search index: uses search (evidence: `src/components/sections/Hero.tsx`)
- Government activity → YAML content loader: uses category data
