# rawknee-69/idt-studybee architecture

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

- Interactive diagram: https://gitdiagram.com/rawknee-69/idt-studybee
- Repository: https://github.com/rawknee-69/idt-studybee

## Overview

This is a study and learning web application: authenticated users manage learning materials and use study tools, search, audio, and collaborative sessions. The browser app routes into feature pages; its API client sends authenticated requests to the Express server, whose route handlers coordinate persistence and selected services. Collaboration also has a WebSocket path. The README is empty, and the excerpts do not expose most page-to-API calls or every subsystem’s wiring, so those relationships are omitted rather than inferred.

Main entry points: [`client/src/App.tsx`](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/App.tsx) (App routing), [`server/routes.ts`](https://github.com/rawknee-69/idt-studybee/blob/main/server/routes.ts) (API routes), [`server/storage.ts`](https://github.com/rawknee-69/idt-studybee/blob/main/server/storage.ts) (Application storage), [`server/db.ts`](https://github.com/rawknee-69/idt-studybee/blob/main/server/db.ts) (Neon database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Learning app"]
  node_app["App routing<br/>[App.tsx]"]
  node_api_client["Authenticated API client<br/>[queryClient.ts]"]
  node_theme["Theme provider<br/>[ThemeProvider.tsx]"]
end

subgraph group_server["API and identity"]
  node_server_entry["HTTP server entry<br/>[index.ts]"]
  node_routes["API routes<br/>[routes.ts]"]
  node_auth["Clerk authentication<br/>[clerkAuth.ts]"]
  node_text["Text utilities<br/>[textUtils.ts]"]
end

subgraph group_study["Study capabilities"]
  node_dashboard["Dashboard<br/>[dashboard.tsx]"]
  node_materials["Learning materials<br/>[materials.tsx]"]
  node_material_detail["Material detail"]
  node_search["Query search<br/>[query-search.tsx]"]
  node_chat["Study chat<br/>[chat.tsx]"]
  node_flashcards["Flashcards<br/>[flashcards.tsx]"]
  node_quizzes["Quizzes<br/>[quizzes.tsx]"]
  node_mindmaps["Mind maps<br/>[mind-maps.tsx]"]
  node_summaries["Summaries<br/>[summaries.tsx]"]
  node_audio["Audio library<br/>[audio-library.tsx]"]
  node_practice["Practice tools<br/>[concentration.tsx]"]
  node_speech["Speech generation<br/>[deepgram.ts]"]
end

subgraph group_collaboration["Live collaboration"]
  node_collab_ui["Collaboration workspace<br/>[collab.tsx]"]
  node_ws["Collaboration WebSocket<br/>[collabWebSocket.ts]"]
end

subgraph group_data["Persistence and media"]
  node_storage["Application storage<br/>[storage.ts]"]
  node_database[("Neon database<br/>[db.ts]")]
  node_schema["Learning data schema<br/>[schema.ts]"]
  node_object_storage["Object storage<br/>[objectStorage.ts]"]
  node_object_acl["Object access control<br/>[objectAcl.ts]"]
  node_uploadthing["Upload integration<br/>[uploadthing.ts]"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_app
node_app -->|"provides queries"| node_api_client
node_server_entry -->|"registers"| node_routes
node_routes -->|"configures and guards"| node_auth
node_routes -->|"reads and writes"| node_storage
node_storage -->|"queries"| node_database
node_database -->|"uses schema"| node_schema
node_routes -->|"generates audio"| node_speech
node_ws -->|"reads and writes"| node_storage
node_object_storage -->|"checks permissions"| node_object_acl
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_chat
node_app -->|"routes to"| node_collab_ui

click node_app "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/App.tsx"
click node_api_client "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/lib/queryClient.ts"
click node_theme "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/components/ThemeProvider.tsx"
click node_dashboard "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/dashboard.tsx"
click node_materials "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/materials.tsx"
click node_material_detail "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/material-detail.tsx"
click node_search "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/query-search.tsx"
click node_chat "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/chat.tsx"
click node_flashcards "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/flashcards.tsx"
click node_quizzes "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/quizzes.tsx"
click node_mindmaps "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/mind-maps.tsx"
click node_summaries "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/summaries.tsx"
click node_audio "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/audio-library.tsx"
click node_practice "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/concentration.tsx"
click node_collab_ui "https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/collab.tsx"
click node_server_entry "https://github.com/rawknee-69/idt-studybee/blob/main/server/index.ts"
click node_routes "https://github.com/rawknee-69/idt-studybee/blob/main/server/routes.ts"
click node_auth "https://github.com/rawknee-69/idt-studybee/blob/main/server/clerkAuth.ts"
click node_ws "https://github.com/rawknee-69/idt-studybee/blob/main/server/collabWebSocket.ts"
click node_storage "https://github.com/rawknee-69/idt-studybee/blob/main/server/storage.ts"
click node_database "https://github.com/rawknee-69/idt-studybee/blob/main/server/db.ts"
click node_schema "https://github.com/rawknee-69/idt-studybee/blob/main/shared/schema.ts"
click node_speech "https://github.com/rawknee-69/idt-studybee/blob/main/server/deepgram.ts"
click node_text "https://github.com/rawknee-69/idt-studybee/blob/main/server/textUtils.ts"
click node_object_storage "https://github.com/rawknee-69/idt-studybee/blob/main/server/objectStorage.ts"
click node_object_acl "https://github.com/rawknee-69/idt-studybee/blob/main/server/objectAcl.ts"
click node_uploadthing "https://github.com/rawknee-69/idt-studybee/blob/main/server/uploadthing.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_app,node_api_client,node_theme toneBlue
class node_server_entry,node_routes,node_auth,node_text toneAmber
class node_dashboard,node_materials,node_material_detail,node_search,node_chat,node_flashcards,node_quizzes,node_mindmaps,node_summaries,node_audio,node_practice,node_speech toneMint
class node_collab_ui,node_ws toneRose
class node_storage,node_database,node_schema,node_object_storage,node_object_acl,node_uploadthing,node_learner toneIndigo
```

## Components

### Learning app

- [App routing](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Authenticated API client](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/lib/queryClient.ts): `client/src/lib/queryClient.ts`
- [Theme provider](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/components/ThemeProvider.tsx): `client/src/components/ThemeProvider.tsx`

### API and identity

- [HTTP server entry](https://github.com/rawknee-69/idt-studybee/blob/main/server/index.ts): `server/index.ts`
- [API routes](https://github.com/rawknee-69/idt-studybee/blob/main/server/routes.ts): `server/routes.ts`
- [Clerk authentication](https://github.com/rawknee-69/idt-studybee/blob/main/server/clerkAuth.ts): `server/clerkAuth.ts`
- [Text utilities](https://github.com/rawknee-69/idt-studybee/blob/main/server/textUtils.ts): `server/textUtils.ts`

### Study capabilities

- [Dashboard](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/dashboard.tsx): `client/src/pages/dashboard.tsx`
- [Learning materials](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/materials.tsx): `client/src/pages/materials.tsx`
- [Material detail](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/material-detail.tsx): `client/src/pages/material-detail.tsx`
- [Query search](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/query-search.tsx): `client/src/pages/query-search.tsx`
- [Study chat](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/chat.tsx): `client/src/pages/chat.tsx`
- [Flashcards](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/flashcards.tsx): `client/src/pages/flashcards.tsx`
- [Quizzes](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/quizzes.tsx): `client/src/pages/quizzes.tsx`
- [Mind maps](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/mind-maps.tsx): `client/src/pages/mind-maps.tsx`
- [Summaries](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/summaries.tsx): `client/src/pages/summaries.tsx`
- [Audio library](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/audio-library.tsx): `client/src/pages/audio-library.tsx`
- [Practice tools](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/concentration.tsx): `client/src/pages/concentration.tsx`
- [Speech generation](https://github.com/rawknee-69/idt-studybee/blob/main/server/deepgram.ts): `server/deepgram.ts`

### Live collaboration

- [Collaboration workspace](https://github.com/rawknee-69/idt-studybee/blob/main/client/src/pages/collab.tsx): `client/src/pages/collab.tsx`
- [Collaboration WebSocket](https://github.com/rawknee-69/idt-studybee/blob/main/server/collabWebSocket.ts): `server/collabWebSocket.ts`

### Persistence and media

- [Application storage](https://github.com/rawknee-69/idt-studybee/blob/main/server/storage.ts): `server/storage.ts`
- [Neon database](https://github.com/rawknee-69/idt-studybee/blob/main/server/db.ts): `server/db.ts`
- [Learning data schema](https://github.com/rawknee-69/idt-studybee/blob/main/shared/schema.ts): `shared/schema.ts`
- [Object storage](https://github.com/rawknee-69/idt-studybee/blob/main/server/objectStorage.ts): `server/objectStorage.ts`
- [Object access control](https://github.com/rawknee-69/idt-studybee/blob/main/server/objectAcl.ts): `server/objectAcl.ts`
- [Upload integration](https://github.com/rawknee-69/idt-studybee/blob/main/server/uploadthing.ts): `server/uploadthing.ts`

### Other components

- **Learner**

## Connections

- Learner → App routing: uses (evidence: `client/src/App.tsx`)
- App routing → Authenticated API client: provides queries (evidence: `client/src/App.tsx`)
- HTTP server entry → API routes: registers (evidence: `server/index.ts`)
- API routes → Clerk authentication: configures and guards (evidence: `server/routes.ts`)
- API routes → Application storage: reads and writes (evidence: `server/routes.ts`)
- Application storage → Neon database: queries (evidence: `server/storage.ts`)
- Neon database → Learning data schema: uses schema (evidence: `server/db.ts`)
- API routes → Speech generation: generates audio (evidence: `server/routes.ts`)
- Collaboration WebSocket → Application storage: reads and writes (evidence: `server/collabWebSocket.ts`)
- Object storage → Object access control: checks permissions (evidence: `server/objectStorage.ts`)
- App routing → Dashboard: routes to (evidence: `client/src/App.tsx`)
- App routing → Study chat: routes to (evidence: `client/src/App.tsx`)
- App routing → Collaboration workspace: routes to (evidence: `client/src/App.tsx`)
