# nilotpal-lab/quizflow-nil-private architecture

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

- Interactive diagram: https://gitdiagram.com/nilotpal-lab/quizflow-nil-private
- Repository: https://github.com/nilotpal-lab/quizflow-nil-private

## Overview

The repository contains two product areas: QuizFlow, a live multiplayer quiz application, and a TaskFlow productivity app. QuizFlow’s principal workflow is quiz preparation and ingestion, hosting a PIN-based session, player participation, and results/history; its stores provide session state, persistence, and account/community features. TaskFlow manages tasks and related productivity data through client stores and an API client. The README identifies QuizFlow as the live multiplayer engine, but sampled evidence does not establish the full server or deployment topology; edges below are limited to documented or indexed references.

Main entry points: [`src/app/quizflow/studio/page.tsx`](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/quizflow/studio/page.tsx) (Quiz studio), [`src/quizflow/sessionStore.ts`](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/sessionStore.ts) (Session state), [`src/quizflow/supabaseClient.ts`](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/supabaseClient.ts) (Supabase adapter), [`src/app/quizflow/play/page.tsx`](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/quizflow/play/page.tsx) (Play quiz)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_quiz["QuizFlow gameplay"]
  node_host["Host session<br/>[page.tsx]"]
  node_player["Play quiz<br/>[page.tsx]"]
  node_liveboard["Live leaderboard"]
  node_anti["Answer safeguards<br/>[antiCheat.ts]"]
  node_effects["Gameplay effects<br/>[ParticleField.tsx]"]
  node_sound["Sound and speech<br/>[sound.ts]"]
end

subgraph group_quizdata["QuizFlow content and data"]
  node_session["Session state<br/>[sessionStore.ts]"]
  node_quizstudio["Quiz studio<br/>[page.tsx]"]
  node_ingestion["Content ingestion<br/>[ingestion.ts]"]
  node_ingestapi["URL ingestion API<br/>[route.ts]"]
  node_spreadsheet["Spreadsheet parser<br/>[excelQuizParser.ts]"]
  node_generation["Quiz generation API<br/>[route.ts]"]
  node_tournament["Tournament rules API<br/>[route.ts]"]
  node_quizstore["Saved quizzes<br/>[quizStore.ts]"]
  node_history["Quiz history<br/>[historyStore.ts]"]
  node_community["Quiz community<br/>[communityStore.ts]"]
  node_communityapi["Community API<br/>[route.ts]"]
  node_auth["Host accounts<br/>[authStore.ts]"]
  node_supabase["Supabase adapter<br/>[supabaseClient.ts]"]
end

subgraph group_taskflow["TaskFlow productivity"]
  node_taskstore["Task state<br/>[useTaskStore.ts]"]
  node_api["Task API client<br/>[api.ts]"]
  node_taskservice["Task API service"]
  node_taskauth["Task authentication<br/>[useAuthStore.ts]"]
  node_taskviews["Productivity views<br/>[CalendarView.tsx]"]
  node_taskmodal["Task command modal<br/>[OmniModal.tsx]"]
  node_taskparser["Task text parser<br/>[useTaskParser.ts]"]
end

node_taskactor(("Task user"))

node_host -->|"manages session"| node_session
node_player -->|"reads and updates"| node_session
node_player -->|"uses safeguards"| node_anti
node_player -->|"renders effects"| node_effects
node_player -->|"plays sounds"| node_sound
node_host -->|"renders leaderboard"| node_liveboard
node_liveboard -->|"reads session"| node_session
node_quizstudio -->|"uses ingestion"| node_ingestion
node_ingestion -->|"posts URL"| node_ingestapi
node_quizstudio -->|"uses parser"| node_spreadsheet
node_session -->|"repairs questions"| node_spreadsheet
node_quizstudio -->|"uses quiz store"| node_quizstore
node_quizstudio -.->|"generates quizzes"| node_generation
node_quizstudio -.->|"parses tournament rules"| node_tournament
node_session -->|"uses adapter"| node_supabase
node_auth -->|"syncs host accounts"| node_supabase
node_quizstore -->|"persists quizzes"| node_supabase
node_history -->|"persists history"| node_supabase
node_community -->|"uses adapter"| node_supabase
node_community -.->|"uses API"| node_communityapi
node_taskactor -.->|"manages tasks"| node_taskstore
node_taskstore -->|"fetches and mutates"| node_api
node_api -->|"sends requests"| node_taskservice
node_taskactor -.->|"authenticates"| node_taskauth
node_taskauth -->|"calls API"| node_api
node_taskviews -->|"reads task state"| node_taskstore
node_taskmodal -->|"updates tasks"| node_taskstore
node_taskmodal -->|"parses input"| node_taskparser

click node_host "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/quizflow/host/page.tsx"
click node_player "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/quizflow/play/page.tsx"
click node_session "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/sessionStore.ts"
click node_liveboard "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/RealtimeLeaderboardModal.tsx"
click node_anti "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/antiCheat.ts"
click node_effects "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/ParticleField.tsx"
click node_sound "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/sound.ts"
click node_quizstudio "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/quizflow/studio/page.tsx"
click node_ingestion "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/ingestion.ts"
click node_ingestapi "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/api/ingest-url/route.ts"
click node_spreadsheet "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/excelQuizParser.ts"
click node_generation "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/api/generate-quiz/route.ts"
click node_tournament "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/api/quizflow/parse-tournament-rules/route.ts"
click node_quizstore "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/quizStore.ts"
click node_history "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/historyStore.ts"
click node_community "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/communityStore.ts"
click node_communityapi "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/api/community/route.ts"
click node_auth "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/authStore.ts"
click node_supabase "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/supabaseClient.ts"
click node_taskstore "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/store/useTaskStore.ts"
click node_api "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/lib/api.ts"
click node_taskauth "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/store/useAuthStore.ts"
click node_taskviews "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/components/views/CalendarView.tsx"
click node_taskmodal "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/components/modals/OmniModal.tsx"
click node_taskparser "https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/hooks/useTaskParser.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_host,node_player,node_liveboard,node_anti,node_effects,node_sound toneBlue
class node_session,node_quizstudio,node_ingestion,node_ingestapi,node_spreadsheet,node_generation,node_tournament,node_quizstore,node_history,node_community,node_communityapi,node_auth,node_supabase toneAmber
class node_taskstore,node_api,node_taskservice,node_taskauth,node_taskviews,node_taskmodal,node_taskparser toneMint
class node_taskactor toneRose
```

## Components

### QuizFlow gameplay

- [Host session](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/quizflow/host/page.tsx): `src/app/quizflow/host/page.tsx`
- [Play quiz](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/quizflow/play/page.tsx): `src/app/quizflow/play/page.tsx`
- [Live leaderboard](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/RealtimeLeaderboardModal.tsx): `src/quizflow/RealtimeLeaderboardModal.tsx`
- [Answer safeguards](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/antiCheat.ts): `src/quizflow/antiCheat.ts`
- [Gameplay effects](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/ParticleField.tsx): `src/quizflow/ParticleField.tsx`
- [Sound and speech](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/sound.ts): `src/quizflow/sound.ts`

### QuizFlow content and data

- [Session state](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/sessionStore.ts): `src/quizflow/sessionStore.ts`
- [Quiz studio](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/quizflow/studio/page.tsx): `src/app/quizflow/studio/page.tsx`
- [Content ingestion](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/ingestion.ts): `src/quizflow/ingestion.ts`
- [URL ingestion API](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/api/ingest-url/route.ts): `src/app/api/ingest-url/route.ts`
- [Spreadsheet parser](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/excelQuizParser.ts): `src/quizflow/excelQuizParser.ts`
- [Quiz generation API](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/api/generate-quiz/route.ts): `src/app/api/generate-quiz/route.ts`
- [Tournament rules API](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/api/quizflow/parse-tournament-rules/route.ts): `src/app/api/quizflow/parse-tournament-rules/route.ts`
- [Saved quizzes](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/quizStore.ts): `src/quizflow/quizStore.ts`
- [Quiz history](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/historyStore.ts): `src/quizflow/historyStore.ts`
- [Quiz community](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/communityStore.ts): `src/quizflow/communityStore.ts`
- [Community API](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/app/api/community/route.ts): `src/app/api/community/route.ts`
- [Host accounts](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/authStore.ts): `src/quizflow/authStore.ts`
- [Supabase adapter](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/quizflow/supabaseClient.ts): `src/quizflow/supabaseClient.ts`

### TaskFlow productivity

- [Task state](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/store/useTaskStore.ts): `src/store/useTaskStore.ts`
- [Task API client](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/lib/api.ts): `src/lib/api.ts`
- **Task API service**
- [Task authentication](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/store/useAuthStore.ts): `src/store/useAuthStore.ts`
- [Productivity views](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/components/views/CalendarView.tsx): `src/components/views/CalendarView.tsx`
- [Task command modal](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/components/modals/OmniModal.tsx): `src/components/modals/OmniModal.tsx`
- [Task text parser](https://github.com/nilotpal-lab/quizflow-nil-private/blob/main/src/hooks/useTaskParser.ts): `src/hooks/useTaskParser.ts`

### Other components

- **Task user**

## Connections

- Host session → Session state: manages session (evidence: `src/app/quizflow/host/page.tsx`)
- Play quiz → Session state: reads and updates (evidence: `src/app/quizflow/play/page.tsx`)
- Play quiz → Answer safeguards: uses safeguards (evidence: `src/app/quizflow/play/page.tsx`)
- Play quiz → Gameplay effects: renders effects (evidence: `src/app/quizflow/play/page.tsx`)
- Play quiz → Sound and speech: plays sounds (evidence: `src/app/quizflow/play/page.tsx`)
- Host session → Live leaderboard: renders leaderboard (evidence: `src/app/quizflow/host/page.tsx`)
- Live leaderboard → Session state: reads session (evidence: `src/quizflow/RealtimeLeaderboardModal.tsx`)
- Quiz studio → Content ingestion: uses ingestion (evidence: `src/app/quizflow/studio/page.tsx`)
- Content ingestion → URL ingestion API: posts URL (evidence: `src/quizflow/ingestion.ts`)
- Quiz studio → Spreadsheet parser: uses parser (evidence: `src/app/quizflow/studio/page.tsx`)
- Session state → Spreadsheet parser: repairs questions (evidence: `src/quizflow/sessionStore.ts`)
- Quiz studio → Saved quizzes: uses quiz store (evidence: `src/app/quizflow/studio/page.tsx`)
- Quiz studio → Quiz generation API: generates quizzes
- Quiz studio → Tournament rules API: parses tournament rules
- Session state → Supabase adapter: uses adapter (evidence: `src/quizflow/sessionStore.ts`)
- Host accounts → Supabase adapter: syncs host accounts (evidence: `src/quizflow/authStore.ts`)
- Saved quizzes → Supabase adapter: persists quizzes (evidence: `src/quizflow/quizStore.ts`)
- Quiz history → Supabase adapter: persists history (evidence: `src/quizflow/historyStore.ts`)
- Quiz community → Supabase adapter: uses adapter (evidence: `src/quizflow/communityStore.ts`)
- Quiz community → Community API: uses API
- Task user → Task state: manages tasks
- Task state → Task API client: fetches and mutates (evidence: `src/store/useTaskStore.ts`)
- Task API client → Task API service: sends requests (evidence: `src/lib/api.ts`)
- Task user → Task authentication: authenticates
- Task authentication → Task API client: calls API (evidence: `src/store/useAuthStore.ts`)
- Productivity views → Task state: reads task state (evidence: `src/components/views/CalendarView.tsx`)
- Task command modal → Task state: updates tasks (evidence: `src/components/modals/OmniModal.tsx`)
- Task command modal → Task text parser: parses input (evidence: `src/components/modals/OmniModal.tsx`)
