# sriharshasunny/researchgraph-ai architecture

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

- Interactive diagram: https://gitdiagram.com/sriharshasunny/researchgraph-ai
- Repository: https://github.com/sriharshasunny/researchgraph-ai

## Overview

ResearchGraph AI is a research-literature workspace presented as a React application. Users enter through authentication, then navigate a dashboard and tools for paper search, chat, graph exploration, paper details, saved papers, comparisons, literature synthesis, research-gap analysis, and history. AppContext supplies shared workspace state and mock paper data. The README describes only a Vite template; the product capabilities here are inferred from the named application components and sampled UI text. Backend behavior and most feature internals were not inspected, so the graph avoids claiming service-level workflows.

Main entry points: [`src/App.tsx`](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/App.tsx) (Route Dispatcher), [`src/context/AppContext.tsx`](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/context/AppContext.tsx) (Workspace State), [`src/features/auth/AuthPage.tsx`](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/auth/AuthPage.tsx) (Authentication), [`src/main.tsx`](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/main.tsx) (React Bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application Entry"]
  node_app["Route Dispatcher<br/>[App.tsx]"]
  node_auth["Authentication<br/>[AuthPage.tsx]"]
  node_launch["Launch Sequence<br/>[LaunchSequence.tsx]"]
  node_main["React Bootstrap<br/>[main.tsx]"]
end

subgraph group_workspace["Workspace Shell"]
  node_navbar["Navigation Bar<br/>[Navbar.tsx]"]
  node_sidebar["Workspace Sidebar<br/>[Sidebar.tsx]"]
  node_profile["Profile Settings<br/>[ProfileModal.tsx]"]
  node_settings["Preferences<br/>[SettingsModal.tsx]"]
  node_background["Interactive Background"]
end

subgraph group_research["Research Tools"]
  node_dashboard["Dashboard<br/>[Dashboard.tsx]"]
  node_search["Paper Search<br/>[SearchPage.tsx]"]
  node_chat["Research Chat<br/>[ChatPage.tsx]"]
  node_graph["Knowledge Graph"]
  node_details["Paper Details"]
  node_saved["Saved Papers<br/>[SavedPage.tsx]"]
  node_compare["Paper Comparison<br/>[ComparePage.tsx]"]
  node_literature["Literature Review"]
  node_gaps["Research Gaps"]
  node_history["Research History<br/>[HistoryPage.tsx]"]
end

subgraph group_state["Shared State"]
  node_context["Workspace State<br/>[AppContext.tsx]"]
  node_mockdata["Mock Paper Catalog<br/>[mockData.ts]"]
end

node_user(("Researcher"))
node_supabase["Supabase Client<br/>[supabase.ts]"]

node_user -->|"opens"| node_main
node_main -->|"provides state"| node_context
node_main -->|"renders"| node_app
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_launch
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_chat
node_app -->|"renders"| node_graph
node_app -->|"renders"| node_search
node_app -->|"renders"| node_details
node_app -->|"renders"| node_saved
node_app -->|"renders"| node_compare
node_app -->|"renders"| node_literature
node_app -->|"renders"| node_gaps
node_app -->|"renders"| node_history
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_sidebar
node_auth -->|"completes to"| node_launch
node_auth -->|"renders"| node_background
node_auth -.->|"uses client"| node_supabase
node_navbar -->|"opens"| node_profile
node_navbar -->|"opens"| node_settings
node_context -->|"loads papers"| node_mockdata
node_dashboard -->|"reads state"| node_context
node_search -->|"reads state"| node_context
node_chat -->|"reads state"| node_context
node_graph -->|"reads state"| node_context
node_details -->|"reads state"| node_context
node_saved -->|"reads state"| node_context
node_compare -->|"reads state"| node_context
node_literature -->|"reads state"| node_context
node_gaps -->|"reads state"| node_context
node_history -->|"reads state"| node_context
node_profile -->|"uses state"| node_context
node_settings -->|"uses state"| node_context
node_sidebar -->|"uses state"| node_context

click node_app "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/App.tsx"
click node_auth "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/auth/AuthPage.tsx"
click node_launch "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/auth/LaunchSequence.tsx"
click node_main "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/main.tsx"
click node_navbar "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/components/Navbar.tsx"
click node_sidebar "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/components/Sidebar.tsx"
click node_dashboard "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/dashboard/Dashboard.tsx"
click node_search "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/search/SearchPage.tsx"
click node_chat "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/chat/ChatPage.tsx"
click node_graph "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/graph/KnowledgeGraphPage.tsx"
click node_details "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/details/PaperDetailsPage.tsx"
click node_saved "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/saved/SavedPage.tsx"
click node_compare "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/compare/ComparePage.tsx"
click node_literature "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/literature/LiteratureReviewPage.tsx"
click node_gaps "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/gaps/ResearchGapsPage.tsx"
click node_history "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/history/HistoryPage.tsx"
click node_context "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/context/AppContext.tsx"
click node_mockdata "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/data/mockData.ts"
click node_profile "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/components/ProfileModal.tsx"
click node_settings "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/components/SettingsModal.tsx"
click node_background "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/components/InteractiveSpaceBackground.tsx"
click node_supabase "https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/lib/supabase.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_launch,node_main,node_supabase toneBlue
class node_navbar,node_sidebar,node_profile,node_settings,node_background toneAmber
class node_dashboard,node_search,node_chat,node_graph,node_details,node_saved,node_compare,node_literature,node_gaps,node_history toneMint
class node_context,node_mockdata toneRose
class node_user toneIndigo
```

## Components

### Application Entry

- [Route Dispatcher](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/auth/AuthPage.tsx): `src/features/auth/AuthPage.tsx`
- [Launch Sequence](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/auth/LaunchSequence.tsx): `src/features/auth/LaunchSequence.tsx`
- [React Bootstrap](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/main.tsx): `src/main.tsx`

### Workspace Shell

- [Navigation Bar](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`
- [Workspace Sidebar](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/components/Sidebar.tsx): `src/components/Sidebar.tsx`
- [Profile Settings](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/components/ProfileModal.tsx): `src/components/ProfileModal.tsx`
- [Preferences](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/components/SettingsModal.tsx): `src/components/SettingsModal.tsx`
- [Interactive Background](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/components/InteractiveSpaceBackground.tsx): `src/components/InteractiveSpaceBackground.tsx`

### Research Tools

- [Dashboard](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/dashboard/Dashboard.tsx): `src/features/dashboard/Dashboard.tsx`
- [Paper Search](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/search/SearchPage.tsx): `src/features/search/SearchPage.tsx`
- [Research Chat](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/chat/ChatPage.tsx): `src/features/chat/ChatPage.tsx`
- [Knowledge Graph](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/graph/KnowledgeGraphPage.tsx): `src/features/graph/KnowledgeGraphPage.tsx`
- [Paper Details](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/details/PaperDetailsPage.tsx): `src/features/details/PaperDetailsPage.tsx`
- [Saved Papers](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/saved/SavedPage.tsx): `src/features/saved/SavedPage.tsx`
- [Paper Comparison](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/compare/ComparePage.tsx): `src/features/compare/ComparePage.tsx`
- [Literature Review](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/literature/LiteratureReviewPage.tsx): `src/features/literature/LiteratureReviewPage.tsx`
- [Research Gaps](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/gaps/ResearchGapsPage.tsx): `src/features/gaps/ResearchGapsPage.tsx`
- [Research History](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/features/history/HistoryPage.tsx): `src/features/history/HistoryPage.tsx`

### Shared State

- [Workspace State](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/context/AppContext.tsx): `src/context/AppContext.tsx`
- [Mock Paper Catalog](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/data/mockData.ts): `src/data/mockData.ts`

### Other components

- **Researcher**
- [Supabase Client](https://github.com/sriharshasunny/researchgraph-ai/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

## Connections

- Researcher → React Bootstrap: opens
- React Bootstrap → Workspace State: provides state (evidence: `src/main.tsx`)
- React Bootstrap → Route Dispatcher: renders (evidence: `src/main.tsx`)
- Route Dispatcher → Authentication: routes to (evidence: `src/App.tsx`)
- Route Dispatcher → Launch Sequence: routes to (evidence: `src/App.tsx`)
- Route Dispatcher → Dashboard: renders (evidence: `src/App.tsx`)
- Route Dispatcher → Research Chat: renders (evidence: `src/App.tsx`)
- Route Dispatcher → Knowledge Graph: renders (evidence: `src/App.tsx`)
- Route Dispatcher → Paper Search: renders (evidence: `src/App.tsx`)
- Route Dispatcher → Paper Details: renders (evidence: `src/App.tsx`)
- Route Dispatcher → Saved Papers: renders (evidence: `src/App.tsx`)
- Route Dispatcher → Paper Comparison: renders (evidence: `src/App.tsx`)
- Route Dispatcher → Literature Review: renders (evidence: `src/App.tsx`)
- Route Dispatcher → Research Gaps: renders (evidence: `src/App.tsx`)
- Route Dispatcher → Research History: renders (evidence: `src/App.tsx`)
- Route Dispatcher → Navigation Bar: renders (evidence: `src/App.tsx`)
- Route Dispatcher → Workspace Sidebar: renders (evidence: `src/App.tsx`)
- Authentication → Launch Sequence: completes to (evidence: `src/App.tsx`)
- Authentication → Interactive Background: renders (evidence: `src/features/auth/AuthPage.tsx`)
- Authentication → Supabase Client: uses client (evidence: `src/features/auth/AuthPage.tsx`)
- Navigation Bar → Profile Settings: opens (evidence: `src/components/Navbar.tsx`)
- Navigation Bar → Preferences: opens (evidence: `src/components/Navbar.tsx`)
- Workspace State → Mock Paper Catalog: loads papers (evidence: `src/context/AppContext.tsx`)
- Dashboard → Workspace State: reads state (evidence: `src/features/dashboard/Dashboard.tsx`)
- Paper Search → Workspace State: reads state (evidence: `src/features/search/SearchPage.tsx`)
- Research Chat → Workspace State: reads state (evidence: `src/features/chat/ChatPage.tsx`)
- Knowledge Graph → Workspace State: reads state (evidence: `src/features/graph/KnowledgeGraphPage.tsx`)
- Paper Details → Workspace State: reads state (evidence: `src/features/details/PaperDetailsPage.tsx`)
- Saved Papers → Workspace State: reads state (evidence: `src/features/saved/SavedPage.tsx`)
- Paper Comparison → Workspace State: reads state (evidence: `src/features/compare/ComparePage.tsx`)
- Literature Review → Workspace State: reads state (evidence: `src/features/literature/LiteratureReviewPage.tsx`)
- Research Gaps → Workspace State: reads state (evidence: `src/features/gaps/ResearchGapsPage.tsx`)
- Research History → Workspace State: reads state (evidence: `src/features/history/HistoryPage.tsx`)
- Profile Settings → Workspace State: uses state (evidence: `src/components/ProfileModal.tsx`)
- Preferences → Workspace State: uses state (evidence: `src/components/SettingsModal.tsx`)
- Workspace Sidebar → Workspace State: uses state (evidence: `src/components/Sidebar.tsx`)
