# maaruph1234/evergreen architecture

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

- Interactive diagram: https://gitdiagram.com/maaruph1234/evergreen
- Repository: https://github.com/maaruph1234/evergreen

## Overview

Evergreen Lifecare Support Foundation’s product is a multi-page public website with visitor engagement and operational portals. Visitors browse programs and events, ask FAQs, donate, or apply; donors and staff use separate authenticated views, while applicants can check status by code. The graph preserves the documented beneficiary and outreach capabilities as well as the sampled flows. Some page-to-library links are supported only by the SOURCE INDEX; unsampled implementation details and their internal call paths are not inferred.

Main entry points: [`src/lib/donor-auth.ts`](https://github.com/maaruph1234/evergreen/blob/main/src/lib/donor-auth.ts) (Donor and program data), [`src/lib/chatbot.ts`](https://github.com/maaruph1234/evergreen/blob/main/src/lib/chatbot.ts) (FAQ chatbot), [`src/pages/index.ts`](https://github.com/maaruph1234/evergreen/blob/main/src/pages/index.ts) (Homepage), [`src/pages`](https://github.com/maaruph1234/evergreen/tree/main/src/pages) (Public pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public information"]
  node_public_pages["Public pages"]
  node_programs_page["Programs page<br/>[programs.ts]"]
  node_events_page["Events page<br/>[events.ts]"]
end

subgraph group_engagement["Visitor engagement"]
  node_site_navigation["Site navigation<br/>[menu.ts]"]
  node_chatbot["FAQ chatbot<br/>[chatbot.ts]"]
  node_faq_content["FAQ knowledge base<br/>[faq-data.ts]"]
  node_site_links["WhatsApp links<br/>[site-config.ts]"]
  node_event_countdown["Event countdown<br/>[countdown.ts]"]
  node_program_counters["Program counters<br/>[counters.ts]"]
end

subgraph group_applications["Applications and status"]
  node_application_page["Application form<br/>[apply.ts]"]
  node_application_status_page["Status page<br/>[status.ts]"]
  node_beneficiary_portal["Beneficiary status lookup"]
end

subgraph group_operations["Donor and staff operations"]
  node_home_page["Homepage<br/>[index.ts]"]
  node_donor_portal["Donor dashboard<br/>[donor-portal.ts]"]
  node_admin_page["Admin panel<br/>[admin.ts]"]
  node_outreach_export["Outreach exports<br/>[outreach-export.ts]"]
  node_behind_scenes["Behind-the-scenes media<br/>[behind-scenes.ts]"]
end

subgraph group_backend["Data services"]
  node_donor_data["Donor and program data<br/>[donor-auth.ts]"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_supabase[("Supabase service")]
end

node_visitor(("Visitor"))

node_visitor -->|"browses"| node_public_pages
node_visitor -->|"views programs"| node_programs_page
node_visitor -->|"views events"| node_events_page
node_visitor -->|"submits application"| node_application_page
node_visitor -->|"checks status"| node_application_status_page
node_public_pages -->|"initializes"| node_site_navigation
node_public_pages -->|"initializes"| node_chatbot
node_programs_page -->|"initializes"| node_program_counters
node_programs_page -->|"initializes"| node_chatbot
node_events_page -->|"initializes"| node_event_countdown
node_events_page -->|"initializes"| node_chatbot
node_chatbot -->|"matches questions"| node_faq_content
node_chatbot -->|"creates WhatsApp links"| node_site_links
node_application_page -->|"submits application"| node_donor_data
node_application_status_page -->|"initializes lookup"| node_beneficiary_portal
node_beneficiary_portal -->|"uses data access"| node_donor_data
node_visitor -->|"donates"| node_home_page
node_home_page -->|"records pledge"| node_donor_data
node_home_page -->|"initializes"| node_donor_portal
node_home_page -->|"initializes"| node_behind_scenes
node_donor_portal -->|"loads donor records"| node_donor_data
node_admin_page -->|"manages records"| node_donor_data
node_admin_page -->|"uses exports"| node_outreach_export
node_donor_data -->|"uses client"| node_supabase_client
node_donor_data -->|"reads and writes"| node_supabase
node_supabase_client -->|"connects to"| node_supabase

click node_public_pages "https://github.com/maaruph1234/evergreen/tree/main/src/pages"
click node_programs_page "https://github.com/maaruph1234/evergreen/blob/main/src/pages/programs.ts"
click node_events_page "https://github.com/maaruph1234/evergreen/blob/main/src/pages/events.ts"
click node_site_navigation "https://github.com/maaruph1234/evergreen/blob/main/src/lib/menu.ts"
click node_chatbot "https://github.com/maaruph1234/evergreen/blob/main/src/lib/chatbot.ts"
click node_faq_content "https://github.com/maaruph1234/evergreen/blob/main/src/lib/faq-data.ts"
click node_site_links "https://github.com/maaruph1234/evergreen/blob/main/src/lib/site-config.ts"
click node_event_countdown "https://github.com/maaruph1234/evergreen/blob/main/src/lib/countdown.ts"
click node_program_counters "https://github.com/maaruph1234/evergreen/blob/main/src/lib/counters.ts"
click node_application_page "https://github.com/maaruph1234/evergreen/blob/main/src/pages/apply.ts"
click node_application_status_page "https://github.com/maaruph1234/evergreen/blob/main/src/pages/status.ts"
click node_beneficiary_portal "https://github.com/maaruph1234/evergreen/blob/main/src/lib/beneficiary-portal.ts"
click node_home_page "https://github.com/maaruph1234/evergreen/blob/main/src/pages/index.ts"
click node_donor_portal "https://github.com/maaruph1234/evergreen/blob/main/src/lib/donor-portal.ts"
click node_admin_page "https://github.com/maaruph1234/evergreen/blob/main/src/pages/admin.ts"
click node_outreach_export "https://github.com/maaruph1234/evergreen/blob/main/src/lib/outreach-export.ts"
click node_behind_scenes "https://github.com/maaruph1234/evergreen/blob/main/src/lib/behind-scenes.ts"
click node_donor_data "https://github.com/maaruph1234/evergreen/blob/main/src/lib/donor-auth.ts"
click node_supabase_client "https://github.com/maaruph1234/evergreen/blob/main/src/lib/supabase.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_public_pages,node_programs_page,node_events_page toneBlue
class node_site_navigation,node_chatbot,node_faq_content,node_site_links,node_event_countdown,node_program_counters toneAmber
class node_application_page,node_application_status_page,node_beneficiary_portal toneMint
class node_home_page,node_donor_portal,node_admin_page,node_outreach_export,node_behind_scenes toneRose
class node_donor_data,node_supabase_client,node_supabase,node_visitor toneIndigo
```

## Components

### Public information

- [Public pages](https://github.com/maaruph1234/evergreen/tree/main/src/pages): `src/pages`
- [Programs page](https://github.com/maaruph1234/evergreen/blob/main/src/pages/programs.ts): `src/pages/programs.ts`
- [Events page](https://github.com/maaruph1234/evergreen/blob/main/src/pages/events.ts): `src/pages/events.ts`

### Visitor engagement

- [Site navigation](https://github.com/maaruph1234/evergreen/blob/main/src/lib/menu.ts): `src/lib/menu.ts`
- [FAQ chatbot](https://github.com/maaruph1234/evergreen/blob/main/src/lib/chatbot.ts): `src/lib/chatbot.ts`
- [FAQ knowledge base](https://github.com/maaruph1234/evergreen/blob/main/src/lib/faq-data.ts): `src/lib/faq-data.ts`
- [WhatsApp links](https://github.com/maaruph1234/evergreen/blob/main/src/lib/site-config.ts): `src/lib/site-config.ts`
- [Event countdown](https://github.com/maaruph1234/evergreen/blob/main/src/lib/countdown.ts): `src/lib/countdown.ts`
- [Program counters](https://github.com/maaruph1234/evergreen/blob/main/src/lib/counters.ts): `src/lib/counters.ts`

### Applications and status

- [Application form](https://github.com/maaruph1234/evergreen/blob/main/src/pages/apply.ts): `src/pages/apply.ts`
- [Status page](https://github.com/maaruph1234/evergreen/blob/main/src/pages/status.ts): `src/pages/status.ts`
- [Beneficiary status lookup](https://github.com/maaruph1234/evergreen/blob/main/src/lib/beneficiary-portal.ts): `src/lib/beneficiary-portal.ts`

### Donor and staff operations

- [Homepage](https://github.com/maaruph1234/evergreen/blob/main/src/pages/index.ts): `src/pages/index.ts`
- [Donor dashboard](https://github.com/maaruph1234/evergreen/blob/main/src/lib/donor-portal.ts): `src/lib/donor-portal.ts`
- [Admin panel](https://github.com/maaruph1234/evergreen/blob/main/src/pages/admin.ts): `src/pages/admin.ts`
- [Outreach exports](https://github.com/maaruph1234/evergreen/blob/main/src/lib/outreach-export.ts): `src/lib/outreach-export.ts`
- [Behind-the-scenes media](https://github.com/maaruph1234/evergreen/blob/main/src/lib/behind-scenes.ts): `src/lib/behind-scenes.ts`

### Data services

- [Donor and program data](https://github.com/maaruph1234/evergreen/blob/main/src/lib/donor-auth.ts): `src/lib/donor-auth.ts`
- [Supabase client](https://github.com/maaruph1234/evergreen/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- **Supabase service**

### Other components

- **Visitor**

## Connections

- Visitor → Public pages: browses (evidence: `README.md`)
- Visitor → Programs page: views programs (evidence: `README.md`)
- Visitor → Events page: views events (evidence: `README.md`)
- Visitor → Application form: submits application (evidence: `src/pages/apply.ts`)
- Visitor → Status page: checks status (evidence: `README.md`)
- Public pages → Site navigation: initializes (evidence: `src/pages/about.ts`)
- Public pages → FAQ chatbot: initializes (evidence: `src/pages/about.ts`)
- Programs page → Program counters: initializes (evidence: `src/pages/programs.ts`)
- Programs page → FAQ chatbot: initializes (evidence: `src/pages/programs.ts`)
- Events page → Event countdown: initializes (evidence: `src/pages/events.ts`)
- Events page → FAQ chatbot: initializes (evidence: `src/pages/events.ts`)
- FAQ chatbot → FAQ knowledge base: matches questions (evidence: `src/lib/chatbot.ts`)
- FAQ chatbot → WhatsApp links: creates WhatsApp links (evidence: `src/lib/chatbot.ts`)
- Application form → Donor and program data: submits application (evidence: `src/pages/apply.ts`)
- Status page → Beneficiary status lookup: initializes lookup (evidence: `src/pages/status.ts`)
- Beneficiary status lookup → Donor and program data: uses data access (evidence: `src/lib/beneficiary-portal.ts`)
- Visitor → Homepage: donates (evidence: `src/pages/index.ts`)
- Homepage → Donor and program data: records pledge (evidence: `src/pages/index.ts`)
- Homepage → Donor dashboard: initializes (evidence: `src/pages/index.ts`)
- Homepage → Behind-the-scenes media: initializes (evidence: `src/pages/index.ts`)
- Donor dashboard → Donor and program data: loads donor records (evidence: `src/lib/donor-portal.ts`)
- Admin panel → Donor and program data: manages records (evidence: `src/pages/admin.ts`)
- Admin panel → Outreach exports: uses exports (evidence: `src/pages/admin.ts`)
- Donor and program data → Supabase client: uses client (evidence: `src/lib/donor-auth.ts`)
- Donor and program data → Supabase service: reads and writes (evidence: `src/lib/donor-auth.ts`)
- Supabase client → Supabase service: connects to (evidence: `README.md`)
