# nandani-bytecode/shared-notes architecture

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

- Interactive diagram: https://gitdiagram.com/nandani-bytecode/shared-notes
- Repository: https://github.com/nandani-bytecode/shared-notes

## Overview

StudySpace is a student-facing platform for finding and discussing community study materials, then organizing personal references to them in a private workspace. The main flow is community discovery → resource viewing/discussion → add a reference → personalize and organize it. The README documents these product capabilities; the graph also reflects routes and dependencies visible in the sampled source index. DataContext and several feature components were only partially excerpted, so uncertain implementation-level connections are omitted.

Main entry points: [`src/App.tsx`](https://github.com/nandani-bytecode/shared-notes/blob/main/src/App.tsx) (Routes and access), [`src/context/DataContext.tsx`](https://github.com/nandani-bytecode/shared-notes/blob/main/src/context/DataContext.tsx) (Study and workspace state), [`src/pages/WorkspacePage.tsx`](https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/WorkspacePage.tsx) (Personal workspace), [`src/pages/CommunityDetailPage.tsx`](https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/CommunityDetailPage.tsx) (Community resources)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application and identity"]
  node_app["Routes and access<br/>[App.tsx]"]
  node_auth["Authentication<br/>[AuthContext.tsx]"]
  node_layout["Application shell<br/>[Layout.tsx]"]
end

subgraph group_community["Communities and materials"]
  node_community_list["Community discovery"]
  node_community_detail["Community resources"]
  node_community_actions["Community creation and joining"]
  node_upload["Resource and announcement actions"]
  node_subjects["Subject browsing"]
end

subgraph group_study["Study experience"]
  node_dashboard["Study dashboard<br/>[DashboardPage.tsx]"]
  node_viewer_page["Resource route"]
  node_viewer["Resource viewer"]
  node_discussion["Discussion feed"]
  node_search["Global search"]
  node_pdf["PDF generation<br/>[pdfGenerator.ts]"]
end

subgraph group_personal["Personal workspace"]
  node_workspace["Personal workspace<br/>[WorkspacePage.tsx]"]
  node_workspace_controls["Workspace controls"]
  node_workspace_cards["Workspace resource cards<br/>[ResourceCard.tsx]"]
end

subgraph group_state["Application state"]
  node_data["Study and workspace state<br/>[DataContext.tsx]"]
  node_catalog["Demo study data<br/>[mockData.ts]"]
  node_browser_store[("Browser local storage")]
end

node_student(("Student"))

node_student -->|"uses"| node_app
node_app -->|"provides"| node_auth
node_app -->|"provides"| node_data
node_app -->|"routes through"| node_layout
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_community_list
node_app -->|"routes to"| node_community_detail
node_app -->|"routes to"| node_subjects
node_app -->|"routes to"| node_viewer_page
node_app -->|"routes to"| node_discussion
node_app -->|"routes to"| node_workspace
node_auth -->|"loads demo users"| node_catalog
node_data -->|"loads study data"| node_catalog
node_data -->|"reads current user"| node_auth
node_data -->|"reads and writes"| node_browser_store
node_community_detail -->|"opens actions"| node_upload
node_viewer_page -->|"renders"| node_viewer
node_viewer -->|"generates PDF data"| node_pdf
node_workspace -->|"renders"| node_workspace_controls
node_workspace -->|"renders"| node_workspace_cards
node_workspace -->|"uses workspace state"| node_data
node_search -->|"searches study data"| node_data
node_community_list -->|"uses community state"| node_data
node_community_detail -->|"uses community state"| node_data
node_viewer -->|"uses resource state"| node_data
node_community_detail -->|"adds resource references"| node_workspace
node_viewer -->|"shows resource discussion"| node_discussion
node_community_actions -->|"updates communities"| node_data
node_upload -->|"submits resource"| node_data

click node_app "https://github.com/nandani-bytecode/shared-notes/blob/main/src/App.tsx"
click node_auth "https://github.com/nandani-bytecode/shared-notes/blob/main/src/context/AuthContext.tsx"
click node_layout "https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/layout/Layout.tsx"
click node_dashboard "https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/DashboardPage.tsx"
click node_community_list "https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/CommunitiesPage.tsx"
click node_community_detail "https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/CommunityDetailPage.tsx"
click node_community_actions "https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/communities/CreateCommunityModal.tsx"
click node_upload "https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/communities/UploadResourceModal.tsx"
click node_subjects "https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/SubjectDetailPage.tsx"
click node_viewer_page "https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/ResourceViewerPage.tsx"
click node_viewer "https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/viewer/ResourceViewerModal.tsx"
click node_discussion "https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/DiscussionsPage.tsx"
click node_search "https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/search/GlobalSearchModal.tsx"
click node_workspace "https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/WorkspacePage.tsx"
click node_workspace_controls "https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/workspace/PersonalRenameModal.tsx"
click node_workspace_cards "https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/workspace/ResourceCard.tsx"
click node_data "https://github.com/nandani-bytecode/shared-notes/blob/main/src/context/DataContext.tsx"
click node_catalog "https://github.com/nandani-bytecode/shared-notes/blob/main/src/data/mockData.ts"
click node_pdf "https://github.com/nandani-bytecode/shared-notes/blob/main/src/utils/pdfGenerator.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_auth,node_layout toneBlue
class node_community_list,node_community_detail,node_community_actions,node_upload,node_subjects toneAmber
class node_dashboard,node_viewer_page,node_viewer,node_discussion,node_search,node_pdf toneMint
class node_workspace,node_workspace_controls,node_workspace_cards toneRose
class node_data,node_catalog,node_browser_store,node_student toneIndigo
```

## Components

### Application and identity

- [Routes and access](https://github.com/nandani-bytecode/shared-notes/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication](https://github.com/nandani-bytecode/shared-notes/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Application shell](https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/layout/Layout.tsx): `src/components/layout/Layout.tsx`

### Communities and materials

- [Community discovery](https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/CommunitiesPage.tsx): `src/pages/CommunitiesPage.tsx`
- [Community resources](https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/CommunityDetailPage.tsx): `src/pages/CommunityDetailPage.tsx`
- [Community creation and joining](https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/communities/CreateCommunityModal.tsx): `src/components/communities/CreateCommunityModal.tsx`
- [Resource and announcement actions](https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/communities/UploadResourceModal.tsx): `src/components/communities/UploadResourceModal.tsx`
- [Subject browsing](https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/SubjectDetailPage.tsx): `src/pages/SubjectDetailPage.tsx`

### Study experience

- [Study dashboard](https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/DashboardPage.tsx): `src/pages/DashboardPage.tsx`
- [Resource route](https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/ResourceViewerPage.tsx): `src/pages/ResourceViewerPage.tsx`
- [Resource viewer](https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/viewer/ResourceViewerModal.tsx): `src/components/viewer/ResourceViewerModal.tsx`
- [Discussion feed](https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/DiscussionsPage.tsx): `src/pages/DiscussionsPage.tsx`
- [Global search](https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/search/GlobalSearchModal.tsx): `src/components/search/GlobalSearchModal.tsx`
- [PDF generation](https://github.com/nandani-bytecode/shared-notes/blob/main/src/utils/pdfGenerator.ts): `src/utils/pdfGenerator.ts`

### Personal workspace

- [Personal workspace](https://github.com/nandani-bytecode/shared-notes/blob/main/src/pages/WorkspacePage.tsx): `src/pages/WorkspacePage.tsx`
- [Workspace controls](https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/workspace/PersonalRenameModal.tsx): `src/components/workspace/PersonalRenameModal.tsx`
- [Workspace resource cards](https://github.com/nandani-bytecode/shared-notes/blob/main/src/components/workspace/ResourceCard.tsx): `src/components/workspace/ResourceCard.tsx`

### Application state

- [Study and workspace state](https://github.com/nandani-bytecode/shared-notes/blob/main/src/context/DataContext.tsx): `src/context/DataContext.tsx`
- [Demo study data](https://github.com/nandani-bytecode/shared-notes/blob/main/src/data/mockData.ts): `src/data/mockData.ts`
- **Browser local storage**

### Other components

- **Student**

## Connections

- Student → Routes and access: uses (evidence: `README.md`)
- Routes and access → Authentication: provides (evidence: `src/App.tsx`)
- Routes and access → Study and workspace state: provides (evidence: `src/App.tsx`)
- Routes and access → Application shell: routes through (evidence: `src/App.tsx`)
- Routes and access → Study dashboard: routes to (evidence: `src/App.tsx`)
- Routes and access → Community discovery: routes to (evidence: `src/App.tsx`)
- Routes and access → Community resources: routes to (evidence: `src/App.tsx`)
- Routes and access → Subject browsing: routes to (evidence: `src/App.tsx`)
- Routes and access → Resource route: routes to (evidence: `src/App.tsx`)
- Routes and access → Discussion feed: routes to (evidence: `src/App.tsx`)
- Routes and access → Personal workspace: routes to (evidence: `src/App.tsx`)
- Authentication → Demo study data: loads demo users (evidence: `src/context/AuthContext.tsx`)
- Study and workspace state → Demo study data: loads study data (evidence: `src/context/DataContext.tsx`)
- Study and workspace state → Authentication: reads current user (evidence: `src/context/DataContext.tsx`)
- Study and workspace state → Browser local storage: reads and writes (evidence: `src/context/DataContext.tsx`)
- Community resources → Resource and announcement actions: opens actions (evidence: `src/pages/CommunityDetailPage.tsx`)
- Resource route → Resource viewer: renders (evidence: `src/pages/ResourceViewerPage.tsx`)
- Resource viewer → PDF generation: generates PDF data (evidence: `src/components/viewer/ResourceViewerModal.tsx`)
- Personal workspace → Workspace controls: renders (evidence: `src/pages/WorkspacePage.tsx`)
- Personal workspace → Workspace resource cards: renders (evidence: `src/pages/WorkspacePage.tsx`)
- Personal workspace → Study and workspace state: uses workspace state (evidence: `src/pages/WorkspacePage.tsx`)
- Global search → Study and workspace state: searches study data (evidence: `src/components/search/GlobalSearchModal.tsx`)
- Community discovery → Study and workspace state: uses community state (evidence: `src/pages/CommunitiesPage.tsx`)
- Community resources → Study and workspace state: uses community state (evidence: `src/pages/CommunityDetailPage.tsx`)
- Resource viewer → Study and workspace state: uses resource state (evidence: `src/components/viewer/ResourceViewerModal.tsx`)
- Community resources → Personal workspace: adds resource references (evidence: `README.md`)
- Resource viewer → Discussion feed: shows resource discussion (evidence: `README.md`)
- Community creation and joining → Study and workspace state: updates communities (evidence: `src/components/communities/CreateCommunityModal.tsx`)
- Resource and announcement actions → Study and workspace state: submits resource (evidence: `src/components/communities/UploadResourceModal.tsx`)
