# gaurav13/vaap architecture

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

- Interactive diagram: https://gitdiagram.com/gaurav13/vaap
- Repository: https://github.com/gaurav13/vaap

## Overview

VAAP is a membership and governance portal for an association, with public information, member services, staff administration, and outreach. The user workflow spans discovering the association, applying for membership, participating in events and governance, and receiving member content and notifications; staff administer those activities. The graph includes documented capabilities visible in the tree, but the README is empty and many feature modules were not sampled. Accordingly, some product branches have no asserted call edges; the graph avoids inferring wiring from filenames alone.

Main entry points: [`app/actions/public.ts`](https://github.com/gaurav13/vaap/blob/main/app/actions/public.ts) (Public Actions), [`app/actions/cms.ts`](https://github.com/gaurav13/vaap/blob/main/app/actions/cms.ts) (Content CMS), [`lib/db/index.ts`](https://github.com/gaurav13/vaap/blob/main/lib/db/index.ts) (Postgres Data), [`app/admin/page.tsx`](https://github.com/gaurav13/vaap/blob/main/app/admin/page.tsx) (Admin Workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Public and Member Experience"]
  node_public_site["Public Site<br/>[page.tsx]"]
  node_member_dashboard["Member Dashboard<br/>[page.tsx]"]
end

subgraph group_membership["Membership and Community"]
  node_membership_flow["Membership Flow<br/>[apply-wizard.tsx]"]
  node_public_actions["Public Actions<br/>[public.ts]"]
  node_referrals["Referral Rewards<br/>[referral-engine.ts]"]
  node_events["Events and RSVP"]
  node_kol["Opinion Leaders<br/>[kol.ts]"]
end

subgraph group_governance["Governance and Participation"]
  node_governance["Governance<br/>[governance.ts]"]
  node_elections["Elections<br/>[elections.ts]"]
  node_voting_rights["Voting Rights<br/>[voting-rights.ts]"]
  node_xrpl["XRPL Voting<br/>[xrpl.ts]"]
end

subgraph group_operations["Administration and Outreach"]
  node_content_cms["Content CMS<br/>[cms.ts]"]
  node_articles["Articles<br/>[articles.ts]"]
  node_admin["Admin Workspace<br/>[page.tsx]"]
  node_email_automation["Email Automations<br/>[engine.ts]"]
  node_email_templates["Email Templates<br/>[service.ts]"]
end

subgraph group_platform["Shared Platform"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_session["Session Access<br/>[session.ts]"]
  node_database[("Postgres Data<br/>[index.ts]")]
  node_schema["Data Schema<br/>[schema.ts]"]
  node_notifications["Notifications<br/>[notifications.ts]"]
  node_mailer["Email Delivery<br/>[mailer.ts]"]
  node_seo["SEO Metadata<br/>[subjects.ts]"]
  node_contact["Contact Details<br/>[contact.ts]"]
end

node_visitor(("Visitor or Member"))

node_visitor -->|"browses"| node_public_site
node_visitor -.->|"opens"| node_member_dashboard
node_public_site -->|"loads news"| node_articles
node_public_site -->|"loads content"| node_public_actions
node_public_site -->|"loads pages"| node_content_cms
node_public_site -->|"uses metadata"| node_seo
node_member_dashboard -->|"loads member content"| node_content_cms
node_member_dashboard -->|"loads dashboard data"| node_public_actions
node_member_dashboard -->|"loads articles"| node_articles
node_membership_flow -.->|"submits application"| node_public_actions
node_public_actions -->|"processes referral"| node_referrals
node_public_actions -->|"registers attendees"| node_events
node_public_actions -->|"sends template"| node_email_templates
node_public_actions -->|"notifies users"| node_notifications
node_public_actions -->|"uses contact"| node_contact
node_content_cms -->|"notifies community"| node_notifications
node_admin -.->|"manages content"| node_content_cms
node_admin -.->|"manages rewards"| node_referrals
node_admin -.->|"reviews profiles"| node_kol
node_admin -.->|"manages governance"| node_governance
node_admin -.->|"configures automations"| node_email_automation
node_email_automation -->|"loads live content"| node_email_templates
node_email_automation -->|"sends messages"| node_mailer
node_email_templates -->|"sends email"| node_mailer
node_email_templates -->|"uses support address"| node_contact
node_session -->|"gets session"| node_auth
node_content_cms -->|"checks access"| node_session
node_content_cms -->|"reads and writes"| node_database
node_referrals -->|"reads and writes"| node_database
node_email_automation -->|"reads and writes"| node_database
node_email_templates -->|"reads templates"| node_database
node_mailer -->|"uses delivery data"| node_database
node_database -->|"uses schema"| node_schema
node_governance -.->|"coordinates"| node_elections
node_elections -.->|"checks eligibility"| node_voting_rights
node_elections -.->|"uses ledger voting"| node_xrpl

click node_public_site "https://github.com/gaurav13/vaap/blob/main/app/page.tsx"
click node_member_dashboard "https://github.com/gaurav13/vaap/blob/main/app/dashboard/page.tsx"
click node_content_cms "https://github.com/gaurav13/vaap/blob/main/app/actions/cms.ts"
click node_articles "https://github.com/gaurav13/vaap/blob/main/app/actions/articles.ts"
click node_membership_flow "https://github.com/gaurav13/vaap/blob/main/components/membership/apply/apply-wizard.tsx"
click node_public_actions "https://github.com/gaurav13/vaap/blob/main/app/actions/public.ts"
click node_referrals "https://github.com/gaurav13/vaap/blob/main/lib/referral-engine.ts"
click node_events "https://github.com/gaurav13/vaap/blob/main/lib/event-registration.ts"
click node_kol "https://github.com/gaurav13/vaap/blob/main/app/actions/kol.ts"
click node_governance "https://github.com/gaurav13/vaap/blob/main/lib/governance.ts"
click node_elections "https://github.com/gaurav13/vaap/blob/main/lib/elections.ts"
click node_voting_rights "https://github.com/gaurav13/vaap/blob/main/lib/voting-rights.ts"
click node_xrpl "https://github.com/gaurav13/vaap/blob/main/lib/xrpl.ts"
click node_admin "https://github.com/gaurav13/vaap/blob/main/app/admin/page.tsx"
click node_email_automation "https://github.com/gaurav13/vaap/blob/main/lib/email-automations/engine.ts"
click node_email_templates "https://github.com/gaurav13/vaap/blob/main/lib/email-templates/service.ts"
click node_auth "https://github.com/gaurav13/vaap/blob/main/lib/auth.ts"
click node_session "https://github.com/gaurav13/vaap/blob/main/lib/session.ts"
click node_database "https://github.com/gaurav13/vaap/blob/main/lib/db/index.ts"
click node_schema "https://github.com/gaurav13/vaap/blob/main/lib/db/schema.ts"
click node_notifications "https://github.com/gaurav13/vaap/blob/main/lib/notifications.ts"
click node_mailer "https://github.com/gaurav13/vaap/blob/main/lib/mailer.ts"
click node_seo "https://github.com/gaurav13/vaap/blob/main/lib/seo/subjects.ts"
click node_contact "https://github.com/gaurav13/vaap/blob/main/lib/contact.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_site,node_member_dashboard toneBlue
class node_membership_flow,node_public_actions,node_referrals,node_events,node_kol toneAmber
class node_governance,node_elections,node_voting_rights,node_xrpl toneMint
class node_content_cms,node_articles,node_admin,node_email_automation,node_email_templates toneRose
class node_auth,node_session,node_database,node_schema,node_notifications,node_mailer,node_seo,node_contact,node_visitor toneIndigo
```

## Components

### Public and Member Experience

- [Public Site](https://github.com/gaurav13/vaap/blob/main/app/page.tsx): `app/page.tsx`
- [Member Dashboard](https://github.com/gaurav13/vaap/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`

### Membership and Community

- [Membership Flow](https://github.com/gaurav13/vaap/blob/main/components/membership/apply/apply-wizard.tsx): `components/membership/apply/apply-wizard.tsx`
- [Public Actions](https://github.com/gaurav13/vaap/blob/main/app/actions/public.ts): `app/actions/public.ts`
- [Referral Rewards](https://github.com/gaurav13/vaap/blob/main/lib/referral-engine.ts): `lib/referral-engine.ts`
- [Events and RSVP](https://github.com/gaurav13/vaap/blob/main/lib/event-registration.ts): `lib/event-registration.ts`
- [Opinion Leaders](https://github.com/gaurav13/vaap/blob/main/app/actions/kol.ts): `app/actions/kol.ts`

### Governance and Participation

- [Governance](https://github.com/gaurav13/vaap/blob/main/lib/governance.ts): `lib/governance.ts`
- [Elections](https://github.com/gaurav13/vaap/blob/main/lib/elections.ts): `lib/elections.ts`
- [Voting Rights](https://github.com/gaurav13/vaap/blob/main/lib/voting-rights.ts): `lib/voting-rights.ts`
- [XRPL Voting](https://github.com/gaurav13/vaap/blob/main/lib/xrpl.ts): `lib/xrpl.ts`

### Administration and Outreach

- [Content CMS](https://github.com/gaurav13/vaap/blob/main/app/actions/cms.ts): `app/actions/cms.ts`
- [Articles](https://github.com/gaurav13/vaap/blob/main/app/actions/articles.ts): `app/actions/articles.ts`
- [Admin Workspace](https://github.com/gaurav13/vaap/blob/main/app/admin/page.tsx): `app/admin/page.tsx`
- [Email Automations](https://github.com/gaurav13/vaap/blob/main/lib/email-automations/engine.ts): `lib/email-automations/engine.ts`
- [Email Templates](https://github.com/gaurav13/vaap/blob/main/lib/email-templates/service.ts): `lib/email-templates/service.ts`

### Shared Platform

- [Authentication](https://github.com/gaurav13/vaap/blob/main/lib/auth.ts): `lib/auth.ts`
- [Session Access](https://github.com/gaurav13/vaap/blob/main/lib/session.ts): `lib/session.ts`
- [Postgres Data](https://github.com/gaurav13/vaap/blob/main/lib/db/index.ts): `lib/db/index.ts`
- [Data Schema](https://github.com/gaurav13/vaap/blob/main/lib/db/schema.ts): `lib/db/schema.ts`
- [Notifications](https://github.com/gaurav13/vaap/blob/main/lib/notifications.ts): `lib/notifications.ts`
- [Email Delivery](https://github.com/gaurav13/vaap/blob/main/lib/mailer.ts): `lib/mailer.ts`
- [SEO Metadata](https://github.com/gaurav13/vaap/blob/main/lib/seo/subjects.ts): `lib/seo/subjects.ts`
- [Contact Details](https://github.com/gaurav13/vaap/blob/main/lib/contact.ts): `lib/contact.ts`

### Other components

- **Visitor or Member**

## Connections

- Visitor or Member → Public Site: browses (evidence: `app/page.tsx`)
- Visitor or Member → Member Dashboard: opens
- Public Site → Articles: loads news (evidence: `app/page.tsx`)
- Public Site → Public Actions: loads content (evidence: `app/page.tsx`)
- Public Site → Content CMS: loads pages (evidence: `app/page.tsx`)
- Public Site → SEO Metadata: uses metadata (evidence: `app/page.tsx`)
- Member Dashboard → Content CMS: loads member content (evidence: `app/dashboard/page.tsx`)
- Member Dashboard → Public Actions: loads dashboard data (evidence: `app/dashboard/page.tsx`)
- Member Dashboard → Articles: loads articles (evidence: `app/dashboard/page.tsx`)
- Membership Flow → Public Actions: submits application
- Public Actions → Referral Rewards: processes referral (evidence: `app/actions/public.ts`)
- Public Actions → Events and RSVP: registers attendees (evidence: `app/actions/public.ts`)
- Public Actions → Email Templates: sends template (evidence: `app/actions/public.ts`)
- Public Actions → Notifications: notifies users (evidence: `app/actions/public.ts`)
- Public Actions → Contact Details: uses contact (evidence: `app/actions/public.ts`)
- Content CMS → Notifications: notifies community (evidence: `app/actions/cms.ts`)
- Admin Workspace → Content CMS: manages content
- Admin Workspace → Referral Rewards: manages rewards
- Admin Workspace → Opinion Leaders: reviews profiles
- Admin Workspace → Governance: manages governance
- Admin Workspace → Email Automations: configures automations
- Email Automations → Email Templates: loads live content (evidence: `lib/email-automations/engine.ts`)
- Email Automations → Email Delivery: sends messages (evidence: `lib/email-automations/engine.ts`)
- Email Templates → Email Delivery: sends email (evidence: `lib/email-templates/service.ts`)
- Email Templates → Contact Details: uses support address (evidence: `lib/email-templates/service.ts`)
- Session Access → Authentication: gets session (evidence: `lib/session.ts`)
- Content CMS → Session Access: checks access (evidence: `app/actions/cms.ts`)
- Content CMS → Postgres Data: reads and writes (evidence: `app/actions/cms.ts`)
- Referral Rewards → Postgres Data: reads and writes (evidence: `lib/referral-engine.ts`)
- Email Automations → Postgres Data: reads and writes (evidence: `lib/email-automations/engine.ts`)
- Email Templates → Postgres Data: reads templates (evidence: `lib/email-templates/service.ts`)
- Email Delivery → Postgres Data: uses delivery data (evidence: `lib/mailer.ts`)
- Postgres Data → Data Schema: uses schema (evidence: `lib/db/index.ts`)
- Governance → Elections: coordinates
- Elections → Voting Rights: checks eligibility
- Elections → XRPL Voting: uses ledger voting
