# tazimsheriff/onday-site architecture

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

- Interactive diagram: https://gitdiagram.com/tazimsheriff/onday-site
- Repository: https://github.com/tazimsheriff/onday-site

## Overview

Out of Syllabus is a first-year meetup companion: participants register or log in, use a dashboard to see tasks, team, points and rewards, maintain a shareable profile card, and follow the leaderboard; organizers manage students, teams, scores and goodies. The runtime is organized around Next.js page routes, server actions, session authentication and a SQLite-backed domain store. The excerpts show several page-to-service calls and the session/database relationship; other route-to-service links are indicated as unverified where only imports are indexed.

Main entry points: [`lib/db.ts`](https://github.com/tazimsheriff/onday-site/blob/main/lib/db.ts) (SQLite domain store), [`lib/actions.ts`](https://github.com/tazimsheriff/onday-site/blob/main/lib/actions.ts) (Form actions), [`lib/auth.ts`](https://github.com/tazimsheriff/onday-site/blob/main/lib/auth.ts) (Session and roles), [`app/profile/page.tsx`](https://github.com/tazimsheriff/onday-site/blob/main/app/profile/page.tsx) (Profile and QR)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Discovery and access"]
  node_home["Meetup home<br/>[page.tsx]"]
  node_signup["Sign up<br/>[page.tsx]"]
  node_login["Login<br/>[page.tsx]"]
end

subgraph group_participant["Participant experience"]
  node_dashboard["Participant desk<br/>[page.tsx]"]
  node_profile["Profile and QR<br/>[page.tsx]"]
  node_publiccard["Shareable card<br/>[page.tsx]"]
  node_leaderboard["Leaderboard<br/>[page.tsx]"]
  node_redeem["Goodie redemption<br/>[page.tsx]"]
end

subgraph group_organizer["Organizer tools"]
  node_adminhome["Organizer overview<br/>[page.tsx]"]
  node_students["Student management<br/>[page.tsx]"]
  node_studentdetail["Student details<br/>[page.tsx]"]
  node_teams["Team management<br/>[page.tsx]"]
  node_goodies["Goodie management<br/>[page.tsx]"]
  node_adminlayout["Admin access gate<br/>[layout.tsx]"]
end

subgraph group_services["Shared services"]
  node_shell["Navigation shell<br/>[shell.tsx]"]
  node_actions["Form actions<br/>[actions.ts]"]
  node_auth["Session and roles<br/>[auth.ts]"]
  node_ui["UI components<br/>[ui.tsx]"]
  node_teamselect["Team selector<br/>[team-select.tsx]"]
  node_format["Formatting helpers<br/>[format.ts]"]
  node_origin["Request origin<br/>[origin.ts]"]
  node_qr["QR generation<br/>[qr.ts]"]
end

subgraph group_data["Domain data"]
  node_database[("SQLite domain store<br/>[db.ts]")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_home
node_visitor -->|"registers"| node_signup
node_visitor -->|"signs in"| node_login
node_home -->|"reads event stats and goodies"| node_database
node_signup -.->|"submits signup"| node_actions
node_login -.->|"submits login"| node_actions
node_actions -->|"sets and clears sessions"| node_auth
node_auth -->|"loads user"| node_database
node_shell -.->|"reads session"| node_auth
node_dashboard -->|"requires participant"| node_auth
node_dashboard -->|"gets request origin"| node_origin
node_dashboard -->|"creates card QR"| node_qr
node_profile -->|"requires participant"| node_auth
node_profile -->|"reads connections"| node_database
node_profile -->|"gets request origin"| node_origin
node_profile -->|"creates card QR"| node_qr
node_profile -.->|"submits profile changes"| node_actions
node_publiccard -.->|"loads card profile"| node_database
node_leaderboard -->|"loads rankings and members"| node_database
node_leaderboard -->|"reads session"| node_auth
node_redeem -->|"requires participant"| node_auth
node_redeem -->|"reads goodies and claims"| node_database
node_redeem -->|"submits redemption"| node_actions
node_adminlayout -.->|"requires admin"| node_auth
node_students -.->|"loads students and teams"| node_database
node_students -->|"submits student updates"| node_actions
node_students -.->|"renders team selection"| node_teamselect
node_studentdetail -.->|"loads student record"| node_database
node_studentdetail -.->|"submits student changes"| node_actions
node_teams -.->|"loads team data"| node_database
node_teams -.->|"submits team changes"| node_actions
node_goodies -.->|"loads goodies"| node_database
node_goodies -.->|"submits goodie changes"| node_actions
node_actions -->|"writes domain changes"| node_database
node_database -.->|"normalizes stored values"| node_format
node_ui -->|"formats flash text"| node_format

click node_home "https://github.com/tazimsheriff/onday-site/blob/main/app/page.tsx"
click node_signup "https://github.com/tazimsheriff/onday-site/blob/main/app/signup/page.tsx"
click node_login "https://github.com/tazimsheriff/onday-site/blob/main/app/login/page.tsx"
click node_shell "https://github.com/tazimsheriff/onday-site/blob/main/components/shell.tsx"
click node_dashboard "https://github.com/tazimsheriff/onday-site/blob/main/app/dashboard/page.tsx"
click node_profile "https://github.com/tazimsheriff/onday-site/blob/main/app/profile/page.tsx"
click node_publiccard "https://github.com/tazimsheriff/onday-site/blob/main/app/card/%5Bslug%5D/page.tsx"
click node_leaderboard "https://github.com/tazimsheriff/onday-site/blob/main/app/leaderboard/page.tsx"
click node_redeem "https://github.com/tazimsheriff/onday-site/blob/main/app/redeem/page.tsx"
click node_adminhome "https://github.com/tazimsheriff/onday-site/blob/main/app/admin/page.tsx"
click node_students "https://github.com/tazimsheriff/onday-site/blob/main/app/admin/students/page.tsx"
click node_studentdetail "https://github.com/tazimsheriff/onday-site/blob/main/app/admin/students/%5Bid%5D/page.tsx"
click node_teams "https://github.com/tazimsheriff/onday-site/blob/main/app/admin/teams/page.tsx"
click node_goodies "https://github.com/tazimsheriff/onday-site/blob/main/app/admin/goodies/page.tsx"
click node_adminlayout "https://github.com/tazimsheriff/onday-site/blob/main/app/admin/layout.tsx"
click node_actions "https://github.com/tazimsheriff/onday-site/blob/main/lib/actions.ts"
click node_auth "https://github.com/tazimsheriff/onday-site/blob/main/lib/auth.ts"
click node_ui "https://github.com/tazimsheriff/onday-site/blob/main/components/ui.tsx"
click node_teamselect "https://github.com/tazimsheriff/onday-site/blob/main/components/team-select.tsx"
click node_format "https://github.com/tazimsheriff/onday-site/blob/main/lib/format.ts"
click node_origin "https://github.com/tazimsheriff/onday-site/blob/main/lib/origin.ts"
click node_qr "https://github.com/tazimsheriff/onday-site/blob/main/lib/qr.ts"
click node_database "https://github.com/tazimsheriff/onday-site/blob/main/lib/db.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_signup,node_login toneBlue
class node_dashboard,node_profile,node_publiccard,node_leaderboard,node_redeem toneAmber
class node_adminhome,node_students,node_studentdetail,node_teams,node_goodies,node_adminlayout toneMint
class node_shell,node_actions,node_auth,node_ui,node_teamselect,node_format,node_origin,node_qr toneRose
class node_database,node_visitor toneIndigo
```

## Components

### Discovery and access

- [Meetup home](https://github.com/tazimsheriff/onday-site/blob/main/app/page.tsx): `app/page.tsx`
- [Sign up](https://github.com/tazimsheriff/onday-site/blob/main/app/signup/page.tsx): `app/signup/page.tsx`
- [Login](https://github.com/tazimsheriff/onday-site/blob/main/app/login/page.tsx): `app/login/page.tsx`

### Participant experience

- [Participant desk](https://github.com/tazimsheriff/onday-site/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`
- [Profile and QR](https://github.com/tazimsheriff/onday-site/blob/main/app/profile/page.tsx): `app/profile/page.tsx`
- [Shareable card](https://github.com/tazimsheriff/onday-site/blob/main/app/card/%5Bslug%5D/page.tsx): `app/card/[slug]/page.tsx`
- [Leaderboard](https://github.com/tazimsheriff/onday-site/blob/main/app/leaderboard/page.tsx): `app/leaderboard/page.tsx`
- [Goodie redemption](https://github.com/tazimsheriff/onday-site/blob/main/app/redeem/page.tsx): `app/redeem/page.tsx`

### Organizer tools

- [Organizer overview](https://github.com/tazimsheriff/onday-site/blob/main/app/admin/page.tsx): `app/admin/page.tsx`
- [Student management](https://github.com/tazimsheriff/onday-site/blob/main/app/admin/students/page.tsx): `app/admin/students/page.tsx`
- [Student details](https://github.com/tazimsheriff/onday-site/blob/main/app/admin/students/%5Bid%5D/page.tsx): `app/admin/students/[id]/page.tsx`
- [Team management](https://github.com/tazimsheriff/onday-site/blob/main/app/admin/teams/page.tsx): `app/admin/teams/page.tsx`
- [Goodie management](https://github.com/tazimsheriff/onday-site/blob/main/app/admin/goodies/page.tsx): `app/admin/goodies/page.tsx`
- [Admin access gate](https://github.com/tazimsheriff/onday-site/blob/main/app/admin/layout.tsx): `app/admin/layout.tsx`

### Shared services

- [Navigation shell](https://github.com/tazimsheriff/onday-site/blob/main/components/shell.tsx): `components/shell.tsx`
- [Form actions](https://github.com/tazimsheriff/onday-site/blob/main/lib/actions.ts): `lib/actions.ts`
- [Session and roles](https://github.com/tazimsheriff/onday-site/blob/main/lib/auth.ts): `lib/auth.ts`
- [UI components](https://github.com/tazimsheriff/onday-site/blob/main/components/ui.tsx): `components/ui.tsx`
- [Team selector](https://github.com/tazimsheriff/onday-site/blob/main/components/team-select.tsx): `components/team-select.tsx`
- [Formatting helpers](https://github.com/tazimsheriff/onday-site/blob/main/lib/format.ts): `lib/format.ts`
- [Request origin](https://github.com/tazimsheriff/onday-site/blob/main/lib/origin.ts): `lib/origin.ts`
- [QR generation](https://github.com/tazimsheriff/onday-site/blob/main/lib/qr.ts): `lib/qr.ts`

### Domain data

- [SQLite domain store](https://github.com/tazimsheriff/onday-site/blob/main/lib/db.ts): `lib/db.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Meetup home: opens (evidence: `app/page.tsx`)
- Visitor → Sign up: registers (evidence: `app/signup/page.tsx`)
- Visitor → Login: signs in (evidence: `app/login/page.tsx`)
- Meetup home → SQLite domain store: reads event stats and goodies (evidence: `app/page.tsx`)
- Sign up → Form actions: submits signup (evidence: `app/signup/page.tsx`)
- Login → Form actions: submits login (evidence: `app/login/page.tsx`)
- Form actions → Session and roles: sets and clears sessions (evidence: `lib/actions.ts`)
- Session and roles → SQLite domain store: loads user (evidence: `lib/auth.ts`)
- Navigation shell → Session and roles: reads session (evidence: `components/shell.tsx`)
- Participant desk → Session and roles: requires participant (evidence: `app/dashboard/page.tsx`)
- Participant desk → Request origin: gets request origin (evidence: `app/dashboard/page.tsx`)
- Participant desk → QR generation: creates card QR (evidence: `app/dashboard/page.tsx`)
- Profile and QR → Session and roles: requires participant (evidence: `app/profile/page.tsx`)
- Profile and QR → SQLite domain store: reads connections (evidence: `app/profile/page.tsx`)
- Profile and QR → Request origin: gets request origin (evidence: `app/profile/page.tsx`)
- Profile and QR → QR generation: creates card QR (evidence: `app/profile/page.tsx`)
- Profile and QR → Form actions: submits profile changes (evidence: `app/profile/page.tsx`)
- Shareable card → SQLite domain store: loads card profile (evidence: `app/card/[slug]/page.tsx`)
- Leaderboard → SQLite domain store: loads rankings and members (evidence: `app/leaderboard/page.tsx`)
- Leaderboard → Session and roles: reads session (evidence: `app/leaderboard/page.tsx`)
- Goodie redemption → Session and roles: requires participant (evidence: `app/redeem/page.tsx`)
- Goodie redemption → SQLite domain store: reads goodies and claims (evidence: `app/redeem/page.tsx`)
- Goodie redemption → Form actions: submits redemption (evidence: `app/redeem/page.tsx`)
- Admin access gate → Session and roles: requires admin (evidence: `app/admin/layout.tsx`)
- Student management → SQLite domain store: loads students and teams (evidence: `app/admin/students/page.tsx`)
- Student management → Form actions: submits student updates (evidence: `app/admin/students/page.tsx`)
- Student management → Team selector: renders team selection (evidence: `app/admin/students/page.tsx`)
- Student details → SQLite domain store: loads student record (evidence: `app/admin/students/[id]/page.tsx`)
- Student details → Form actions: submits student changes (evidence: `app/admin/students/[id]/page.tsx`)
- Team management → SQLite domain store: loads team data (evidence: `app/admin/teams/page.tsx`)
- Team management → Form actions: submits team changes (evidence: `app/admin/teams/page.tsx`)
- Goodie management → SQLite domain store: loads goodies (evidence: `app/admin/goodies/page.tsx`)
- Goodie management → Form actions: submits goodie changes (evidence: `app/admin/goodies/page.tsx`)
- Form actions → SQLite domain store: writes domain changes (evidence: `lib/actions.ts`)
- SQLite domain store → Formatting helpers: normalizes stored values (evidence: `lib/db.ts`)
- UI components → Formatting helpers: formats flash text (evidence: `components/ui.tsx`)
