# gadotey/mgasystem architecture

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

- Interactive diagram: https://gitdiagram.com/gadotey/mgasystem
- Repository: https://github.com/gadotey/mgasystem

## Overview

MGAS is an early Next.js shell for memorial-event giving, explicitly marked as not production-ready. The visible workflow is an operator viewing a demo dashboard or opening the donation form; the form currently previews input and does not save it. The dashboard displays sample event, summary, and donation data. The repository also contains an initial Prisma data model and a health endpoint. The README describes planned safeguards and future capabilities, not implemented runtime flows; unsampled schema details are therefore not inferred.

Main entry points: [`app/page.tsx`](https://github.com/gadotey/mgasystem/blob/main/app/page.tsx) (Giving dashboard), [`app/donations/new/page.tsx`](https://github.com/gadotey/mgasystem/blob/main/app/donations/new/page.tsx) (Donation page), [`components/Sidebar.tsx`](https://github.com/gadotey/mgasystem/blob/main/components/Sidebar.tsx) (Navigation), [`lib/demo-data.ts`](https://github.com/gadotey/mgasystem/blob/main/lib/demo-data.ts) (Demo event and gifts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pages["Application pages"]
  node_dashboard["Giving dashboard<br/>[page.tsx]"]
  node_new_donation["Donation page<br/>[page.tsx]"]
end

subgraph group_ui["Giving interface"]
  node_sidebar["Navigation<br/>[Sidebar.tsx]"]
  node_memorial["Memorial banner<br/>[MemorialBanner.tsx]"]
  node_stat_card["Giving stat card<br/>[StatCard.tsx]"]
  node_recent_donations["Recent donations"]
  node_donation_form["Donation form<br/>[DonationForm.tsx]"]
end

subgraph group_data["Demo data"]
  node_demo_data["Demo event and gifts<br/>[demo-data.ts]"]
  node_data_model["Prisma data model<br/>[schema.prisma]"]
end

subgraph group_platform["Platform endpoints"]
  node_health["Health endpoint<br/>[route.ts]"]
end

node_operator(("Operator"))
node_health_caller(("Health-check caller"))

node_operator -->|"opens"| node_dashboard
node_operator -->|"opens"| node_new_donation
node_dashboard -->|"renders"| node_sidebar
node_dashboard -->|"renders"| node_memorial
node_dashboard -->|"renders"| node_stat_card
node_dashboard -->|"renders"| node_recent_donations
node_dashboard -->|"reads"| node_demo_data
node_memorial -->|"reads"| node_demo_data
node_recent_donations -->|"reads"| node_demo_data
node_new_donation -->|"renders"| node_sidebar
node_new_donation -->|"renders"| node_donation_form
node_new_donation -->|"reads"| node_demo_data
node_sidebar -->|"links to"| node_dashboard
node_sidebar -->|"links to"| node_new_donation
node_health_caller -->|"checks"| node_health

click node_dashboard "https://github.com/gadotey/mgasystem/blob/main/app/page.tsx"
click node_new_donation "https://github.com/gadotey/mgasystem/blob/main/app/donations/new/page.tsx"
click node_sidebar "https://github.com/gadotey/mgasystem/blob/main/components/Sidebar.tsx"
click node_memorial "https://github.com/gadotey/mgasystem/blob/main/components/MemorialBanner.tsx"
click node_stat_card "https://github.com/gadotey/mgasystem/blob/main/components/StatCard.tsx"
click node_recent_donations "https://github.com/gadotey/mgasystem/blob/main/components/RecentDonations.tsx"
click node_donation_form "https://github.com/gadotey/mgasystem/blob/main/components/DonationForm.tsx"
click node_demo_data "https://github.com/gadotey/mgasystem/blob/main/lib/demo-data.ts"
click node_data_model "https://github.com/gadotey/mgasystem/blob/main/prisma/schema.prisma"
click node_health "https://github.com/gadotey/mgasystem/blob/main/app/api/health/route.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_dashboard,node_new_donation toneBlue
class node_sidebar,node_memorial,node_stat_card,node_recent_donations,node_donation_form toneAmber
class node_demo_data,node_data_model toneMint
class node_health toneRose
class node_operator,node_health_caller toneIndigo
```

## Components

### Application pages

- [Giving dashboard](https://github.com/gadotey/mgasystem/blob/main/app/page.tsx): `app/page.tsx`
- [Donation page](https://github.com/gadotey/mgasystem/blob/main/app/donations/new/page.tsx): `app/donations/new/page.tsx`

### Giving interface

- [Navigation](https://github.com/gadotey/mgasystem/blob/main/components/Sidebar.tsx): `components/Sidebar.tsx`
- [Memorial banner](https://github.com/gadotey/mgasystem/blob/main/components/MemorialBanner.tsx): `components/MemorialBanner.tsx`
- [Giving stat card](https://github.com/gadotey/mgasystem/blob/main/components/StatCard.tsx): `components/StatCard.tsx`
- [Recent donations](https://github.com/gadotey/mgasystem/blob/main/components/RecentDonations.tsx): `components/RecentDonations.tsx`
- [Donation form](https://github.com/gadotey/mgasystem/blob/main/components/DonationForm.tsx): `components/DonationForm.tsx`

### Demo data

- [Demo event and gifts](https://github.com/gadotey/mgasystem/blob/main/lib/demo-data.ts): `lib/demo-data.ts`
- [Prisma data model](https://github.com/gadotey/mgasystem/blob/main/prisma/schema.prisma): `prisma/schema.prisma`

### Platform endpoints

- [Health endpoint](https://github.com/gadotey/mgasystem/blob/main/app/api/health/route.ts): `app/api/health/route.ts`

### Other components

- **Operator**
- **Health-check caller**

## Connections

- Operator → Giving dashboard: opens (evidence: `app/page.tsx`)
- Operator → Donation page: opens (evidence: `app/donations/new/page.tsx`)
- Giving dashboard → Navigation: renders (evidence: `app/page.tsx`)
- Giving dashboard → Memorial banner: renders (evidence: `app/page.tsx`)
- Giving dashboard → Giving stat card: renders (evidence: `app/page.tsx`)
- Giving dashboard → Recent donations: renders (evidence: `app/page.tsx`)
- Giving dashboard → Demo event and gifts: reads (evidence: `app/page.tsx`)
- Memorial banner → Demo event and gifts: reads (evidence: `components/MemorialBanner.tsx`)
- Recent donations → Demo event and gifts: reads (evidence: `components/RecentDonations.tsx`)
- Donation page → Navigation: renders (evidence: `app/donations/new/page.tsx`)
- Donation page → Donation form: renders (evidence: `app/donations/new/page.tsx`)
- Donation page → Demo event and gifts: reads (evidence: `app/donations/new/page.tsx`)
- Navigation → Giving dashboard: links to (evidence: `components/Sidebar.tsx`)
- Navigation → Donation page: links to (evidence: `components/Sidebar.tsx`)
- Health-check caller → Health endpoint: checks (evidence: `README.md`)
