# vrindaverse/tdc architecture

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

- Interactive diagram: https://gitdiagram.com/vrindaverse/tdc
- Repository: https://github.com/vrindaverse/tdc

## Overview

TDC is a developer-community site for discovering events, registering, joining the community, and managing member profiles; administrators oversee members, events, registrations, announcements, and messages. Visitors browse the public site, authenticate through Neon Auth, complete a profile, and register for events; members use their profile for community activity. Admin pages provide operational management and exports. The README identifies Neon Postgres and S3-compatible avatar storage. Some route implementations were not sampled, so their internal call relationships are left out rather than inferred.

Main entry points: [`lib/db/schema.ts`](https://github.com/vrindaverse/tdc/blob/main/lib/db/schema.ts) (Community data model), [`lib/neon-auth.ts`](https://github.com/vrindaverse/tdc/blob/main/lib/neon-auth.ts) (Authentication), [`app/page.tsx`](https://github.com/vrindaverse/tdc/blob/main/app/page.tsx) (Community homepage), [`app/join/page.tsx`](https://github.com/vrindaverse/tdc/blob/main/app/join/page.tsx) (Event registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Community"]
  node_home["Community homepage<br/>[page.tsx]"]
  node_about["TDC story<br/>[page.tsx]"]
  node_events["Event discovery<br/>[page.tsx]"]
  node_contact["Contact page<br/>[page.tsx]"]
end

subgraph group_membership["Membership"]
  node_auth["Authentication<br/>[neon-auth.ts]"]
  node_authpages["Sign-in and verification<br/>[page.tsx]"]
  node_profile_setup["Profile setup<br/>[page.tsx]"]
  node_event_registration["Event registration<br/>[page.tsx]"]
  node_profile["Member profile<br/>[page.tsx]"]
  node_avatar_api["Avatar upload API<br/>[route.ts]"]
end

subgraph group_operations["Administration"]
  node_admin["Admin workspace<br/>[page.tsx]"]
  node_admin_users["Member management<br/>[page.tsx]"]
  node_admin_queries["Admin list queries<br/>[list-queries.ts]"]
  node_admin_export["CSV export<br/>[route.ts]"]
  node_admin_events["Event management<br/>[page.tsx]"]
  node_admin_other["Other admin tools"]
end

subgraph group_platform["Platform Services"]
  node_schema["Community data model<br/>[schema.ts]"]
  node_database[("Neon Postgres")]
  node_auth_service["Neon Auth"]
  node_object_storage[("S3-compatible storage")]
end

node_visitor(("Visitor or member"))

node_visitor -->|"browses"| node_home
node_visitor -->|"reads"| node_about
node_visitor -.->|"discovers"| node_events
node_visitor -->|"signs in"| node_authpages
node_visitor -->|"registers"| node_event_registration
node_visitor -->|"contacts"| node_contact
node_home -->|"checks session"| node_auth
node_home -->|"shows events"| node_events
node_authpages -->|"authenticates"| node_auth
node_auth -->|"uses"| node_auth_service
node_profile_setup -->|"reads colleges"| node_schema
node_event_registration -->|"checks member"| node_auth
node_event_registration -->|"reads events"| node_schema
node_profile -->|"reads member data"| node_schema
node_profile -.->|"uploads avatar"| node_avatar_api
node_avatar_api -->|"updates profile"| node_schema
node_avatar_api -->|"stores image"| node_object_storage
node_admin -->|"queries overview"| node_database
node_admin_users -->|"loads member rows"| node_admin_queries
node_admin_users -->|"links export"| node_admin_export
node_admin_export -->|"loads export rows"| node_admin_queries
node_admin_export -->|"queries events"| node_database
node_admin_events -.->|"manages event data"| node_schema
node_admin_other -.->|"manages community data"| node_schema
node_database -->|"stores model"| node_schema

click node_home "https://github.com/vrindaverse/tdc/blob/main/app/page.tsx"
click node_about "https://github.com/vrindaverse/tdc/blob/main/app/about/page.tsx"
click node_events "https://github.com/vrindaverse/tdc/blob/main/app/events/page.tsx"
click node_contact "https://github.com/vrindaverse/tdc/blob/main/app/contact/page.tsx"
click node_auth "https://github.com/vrindaverse/tdc/blob/main/lib/neon-auth.ts"
click node_authpages "https://github.com/vrindaverse/tdc/blob/main/app/login/page.tsx"
click node_profile_setup "https://github.com/vrindaverse/tdc/blob/main/app/complete-profile/page.tsx"
click node_event_registration "https://github.com/vrindaverse/tdc/blob/main/app/join/page.tsx"
click node_profile "https://github.com/vrindaverse/tdc/blob/main/app/profile/page.tsx"
click node_avatar_api "https://github.com/vrindaverse/tdc/blob/main/app/api/profile/avatar/route.ts"
click node_admin "https://github.com/vrindaverse/tdc/blob/main/app/admin/page.tsx"
click node_admin_users "https://github.com/vrindaverse/tdc/blob/main/app/admin/users/page.tsx"
click node_admin_queries "https://github.com/vrindaverse/tdc/blob/main/lib/admin/list-queries.ts"
click node_admin_export "https://github.com/vrindaverse/tdc/blob/main/app/api/admin/export/%5Btable%5D/route.ts"
click node_admin_events "https://github.com/vrindaverse/tdc/blob/main/app/admin/events/page.tsx"
click node_admin_other "https://github.com/vrindaverse/tdc/tree/main/app/admin"
click node_schema "https://github.com/vrindaverse/tdc/blob/main/lib/db/schema.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_home,node_about,node_events,node_contact toneBlue
class node_auth,node_authpages,node_profile_setup,node_event_registration,node_profile,node_avatar_api toneAmber
class node_admin,node_admin_users,node_admin_queries,node_admin_export,node_admin_events,node_admin_other toneMint
class node_schema,node_database,node_auth_service,node_object_storage toneRose
class node_visitor toneIndigo
```

## Components

### Public Community

- [Community homepage](https://github.com/vrindaverse/tdc/blob/main/app/page.tsx): `app/page.tsx`
- [TDC story](https://github.com/vrindaverse/tdc/blob/main/app/about/page.tsx): `app/about/page.tsx`
- [Event discovery](https://github.com/vrindaverse/tdc/blob/main/app/events/page.tsx): `app/events/page.tsx`
- [Contact page](https://github.com/vrindaverse/tdc/blob/main/app/contact/page.tsx): `app/contact/page.tsx`

### Membership

- [Authentication](https://github.com/vrindaverse/tdc/blob/main/lib/neon-auth.ts): `lib/neon-auth.ts`
- [Sign-in and verification](https://github.com/vrindaverse/tdc/blob/main/app/login/page.tsx): `app/login/page.tsx`
- [Profile setup](https://github.com/vrindaverse/tdc/blob/main/app/complete-profile/page.tsx): `app/complete-profile/page.tsx`
- [Event registration](https://github.com/vrindaverse/tdc/blob/main/app/join/page.tsx): `app/join/page.tsx`
- [Member profile](https://github.com/vrindaverse/tdc/blob/main/app/profile/page.tsx): `app/profile/page.tsx`
- [Avatar upload API](https://github.com/vrindaverse/tdc/blob/main/app/api/profile/avatar/route.ts): `app/api/profile/avatar/route.ts`

### Administration

- [Admin workspace](https://github.com/vrindaverse/tdc/blob/main/app/admin/page.tsx): `app/admin/page.tsx`
- [Member management](https://github.com/vrindaverse/tdc/blob/main/app/admin/users/page.tsx): `app/admin/users/page.tsx`
- [Admin list queries](https://github.com/vrindaverse/tdc/blob/main/lib/admin/list-queries.ts): `lib/admin/list-queries.ts`
- [CSV export](https://github.com/vrindaverse/tdc/blob/main/app/api/admin/export/%5Btable%5D/route.ts): `app/api/admin/export/[table]/route.ts`
- [Event management](https://github.com/vrindaverse/tdc/blob/main/app/admin/events/page.tsx): `app/admin/events/page.tsx`
- [Other admin tools](https://github.com/vrindaverse/tdc/tree/main/app/admin): `app/admin`

### Platform Services

- [Community data model](https://github.com/vrindaverse/tdc/blob/main/lib/db/schema.ts): `lib/db/schema.ts`
- **Neon Postgres**
- **Neon Auth**
- **S3-compatible storage**

### Other components

- **Visitor or member**

## Connections

- Visitor or member → Community homepage: browses (evidence: `app/page.tsx`)
- Visitor or member → TDC story: reads (evidence: `app/about/page.tsx`)
- Visitor or member → Event discovery: discovers
- Visitor or member → Sign-in and verification: signs in (evidence: `app/login/page.tsx`)
- Visitor or member → Event registration: registers (evidence: `app/join/page.tsx`)
- Visitor or member → Contact page: contacts (evidence: `app/contact/page.tsx`)
- Community homepage → Authentication: checks session (evidence: `app/page.tsx`)
- Community homepage → Event discovery: shows events (evidence: `app/page.tsx`)
- Sign-in and verification → Authentication: authenticates (evidence: `app/login/page.tsx`)
- Authentication → Neon Auth: uses (evidence: `README.md`)
- Profile setup → Community data model: reads colleges (evidence: `app/complete-profile/page.tsx`)
- Event registration → Authentication: checks member (evidence: `app/join/page.tsx`)
- Event registration → Community data model: reads events (evidence: `app/join/page.tsx`)
- Member profile → Community data model: reads member data (evidence: `app/profile/page.tsx`)
- Member profile → Avatar upload API: uploads avatar
- Avatar upload API → Community data model: updates profile (evidence: `app/api/profile/avatar/route.ts`)
- Avatar upload API → S3-compatible storage: stores image (evidence: `README.md`)
- Admin workspace → Neon Postgres: queries overview (evidence: `app/admin/page.tsx`)
- Member management → Admin list queries: loads member rows (evidence: `app/admin/users/page.tsx`)
- Member management → CSV export: links export (evidence: `app/admin/users/page.tsx`)
- CSV export → Admin list queries: loads export rows (evidence: `app/api/admin/export/[table]/route.ts`)
- CSV export → Neon Postgres: queries events (evidence: `app/api/admin/export/[table]/route.ts`)
- Event management → Community data model: manages event data
- Other admin tools → Community data model: manages community data (evidence: `app/admin/page.tsx`)
- Neon Postgres → Community data model: stores model (evidence: `README.md`)
