# dinesh-2007/visual-second-brain architecture

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

- Interactive diagram: https://gitdiagram.com/dinesh-2007/visual-second-brain
- Repository: https://github.com/dinesh-2007/visual-second-brain

## Overview

SudoShift is a visual productivity workspace for organizing goals, projects, tasks and related materials on interactive canvases. The main user flow is to enter the workspace, open the editor, and build a connected board from typed nodes. The editor also exposes collaboration, inbox, AI-assistance and planning capabilities. Authentication and Supabase-backed data services support the application. The excerpts establish the main routing, canvas and registry relationships; several feature modules are represented by their exact tree paths but were not sampled, so their internal behavior and some wiring are not asserted.

Main entry points: [`src/pages/Editor.tsx`](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/pages/Editor.tsx) (Canvas editor), [`src/lib/supabase.ts`](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/lib/supabase.ts) (Supabase client), [`src/App.tsx`](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/App.tsx) (Application routes), [`src/nodes/registry/registry.tsx`](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/nodes/registry/registry.tsx) (Node registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and access"]
  node_app["Application routes<br/>[App.tsx]"]
  node_auth["Authentication<br/>[AuthContext.tsx]"]
  node_guard["Protected routes<br/>[ProtectedRoute.tsx]"]
  node_home["Workspace home<br/>[Home.tsx]"]
  node_profile["User profile<br/>[Profile.tsx]"]
end

subgraph group_workspace["Canvas workspace"]
  node_editor["Canvas editor<br/>[Editor.tsx]"]
  node_canvas["Interactive canvas<br/>[Canvas.tsx]"]
  node_sidebar["Node sidebar<br/>[Sidebar.tsx]"]
end

subgraph group_domain["Planning content"]
  node_nodecatalog["Node registry<br/>[registry.tsx]"]
  node_nodecategories["Node type map<br/>[nodeTypes.ts]"]
  node_planningnodes["Goals and projects"]
  node_worknodes["Tasks and events"]
  node_resources["Notes and resources"]
  node_nodewrapper["Node presentation<br/>[NodeWrapper.tsx]"]
  node_table["Table node<br/>[TableNode.tsx]"]
end

subgraph group_collab["Collaboration"]
  node_inbox["Notifications inbox<br/>[Inbox.tsx]"]
  node_matrix["Priority matrix"]
end

subgraph group_services["Data and assistance"]
  node_aiwidget["AI assistant"]
  node_aiservice["AI request service<br/>[aiDumpService.ts]"]
  node_supabase["Supabase client<br/>[supabase.ts]"]
end

node_user(("User"))
node_supabase_service[("Supabase")]

node_user -->|"opens"| node_app
node_app -->|"protects routes"| node_guard
node_guard -->|"checks session"| node_auth
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_editor
node_app -->|"routes to"| node_profile
node_auth -->|"uses client"| node_supabase
node_home -->|"uses client"| node_supabase
node_profile -->|"uses client"| node_supabase
node_editor -->|"renders"| node_canvas
node_editor -->|"renders"| node_sidebar
node_editor -->|"uses types"| node_nodecategories
node_canvas -->|"uses types"| node_nodecategories
node_sidebar -->|"uses types"| node_nodecategories
node_sidebar -->|"renders"| node_matrix
node_nodecatalog -->|"registers"| node_planningnodes
node_nodecatalog -->|"registers"| node_worknodes
node_nodecatalog -->|"registers"| node_resources
node_nodewrapper -->|"wraps node"| node_table
node_editor -->|"renders"| node_inbox
node_editor -->|"uses client"| node_supabase
node_inbox -->|"uses client"| node_supabase
node_editor -->|"renders"| node_aiwidget
node_aiwidget -->|"requests AI"| node_aiservice
node_aiservice -.->|"sends request"| node_user
node_supabase -.->|"connects"| node_supabase_service

click node_app "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/App.tsx"
click node_auth "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/auth/AuthContext.tsx"
click node_guard "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/auth/ProtectedRoute.tsx"
click node_home "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/pages/Home.tsx"
click node_profile "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/pages/Profile.tsx"
click node_editor "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/pages/Editor.tsx"
click node_canvas "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/canvas/Canvas.tsx"
click node_sidebar "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/layout/Sidebar.tsx"
click node_nodecatalog "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/nodes/registry/registry.tsx"
click node_nodecategories "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/nodes/registry/nodeTypes.ts"
click node_planningnodes "https://github.com/dinesh-2007/visual-second-brain/tree/main/src/nodes/goal"
click node_worknodes "https://github.com/dinesh-2007/visual-second-brain/tree/main/src/nodes/task"
click node_resources "https://github.com/dinesh-2007/visual-second-brain/tree/main/src/nodes/resource"
click node_nodewrapper "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/nodes/NodeWrapper.tsx"
click node_table "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/nodes/TableNode.tsx"
click node_inbox "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/Inbox.tsx"
click node_matrix "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/layout/EisenhowerMatrixWidget.tsx"
click node_aiwidget "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/canvas/AiAssistantWidget.tsx"
click node_aiservice "https://github.com/dinesh-2007/visual-second-brain/blob/main/src/lib/aiDumpService.ts"
click node_supabase "https://github.com/dinesh-2007/visual-second-brain/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_guard,node_home,node_profile,node_user toneBlue
class node_editor,node_canvas,node_sidebar,node_supabase_service toneAmber
class node_nodecatalog,node_nodecategories,node_planningnodes,node_worknodes,node_resources,node_nodewrapper,node_table toneMint
class node_inbox,node_matrix toneRose
class node_aiwidget,node_aiservice,node_supabase toneIndigo
```

## Components

### App and access

- [Application routes](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/auth/AuthContext.tsx): `src/auth/AuthContext.tsx`
- [Protected routes](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/auth/ProtectedRoute.tsx): `src/auth/ProtectedRoute.tsx`
- [Workspace home](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [User profile](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/pages/Profile.tsx): `src/pages/Profile.tsx`

### Canvas workspace

- [Canvas editor](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/pages/Editor.tsx): `src/pages/Editor.tsx`
- [Interactive canvas](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/canvas/Canvas.tsx): `src/components/canvas/Canvas.tsx`
- [Node sidebar](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/layout/Sidebar.tsx): `src/components/layout/Sidebar.tsx`

### Planning content

- [Node registry](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/nodes/registry/registry.tsx): `src/nodes/registry/registry.tsx`
- [Node type map](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/nodes/registry/nodeTypes.ts): `src/nodes/registry/nodeTypes.ts`
- [Goals and projects](https://github.com/dinesh-2007/visual-second-brain/tree/main/src/nodes/goal): `src/nodes/goal`
- [Tasks and events](https://github.com/dinesh-2007/visual-second-brain/tree/main/src/nodes/task): `src/nodes/task`
- [Notes and resources](https://github.com/dinesh-2007/visual-second-brain/tree/main/src/nodes/resource): `src/nodes/resource`
- [Node presentation](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/nodes/NodeWrapper.tsx): `src/components/nodes/NodeWrapper.tsx`
- [Table node](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/nodes/TableNode.tsx): `src/components/nodes/TableNode.tsx`

### Collaboration

- [Notifications inbox](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/Inbox.tsx): `src/components/Inbox.tsx`
- [Priority matrix](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/layout/EisenhowerMatrixWidget.tsx): `src/components/layout/EisenhowerMatrixWidget.tsx`

### Data and assistance

- [AI assistant](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/components/canvas/AiAssistantWidget.tsx): `src/components/canvas/AiAssistantWidget.tsx`
- [AI request service](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/lib/aiDumpService.ts): `src/lib/aiDumpService.ts`
- [Supabase client](https://github.com/dinesh-2007/visual-second-brain/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### Other components

- **User**
- **Supabase**

## Connections

- User → Application routes: opens (evidence: `src/App.tsx`)
- Application routes → Protected routes: protects routes (evidence: `src/App.tsx`)
- Protected routes → Authentication: checks session (evidence: `src/auth/ProtectedRoute.tsx`)
- Application routes → Workspace home: routes to (evidence: `src/App.tsx`)
- Application routes → Canvas editor: routes to (evidence: `src/App.tsx`)
- Application routes → User profile: routes to (evidence: `src/App.tsx`)
- Authentication → Supabase client: uses client (evidence: `src/auth/AuthContext.tsx`)
- Workspace home → Supabase client: uses client (evidence: `src/pages/Home.tsx`)
- User profile → Supabase client: uses client (evidence: `src/pages/Profile.tsx`)
- Canvas editor → Interactive canvas: renders (evidence: `src/pages/Editor.tsx`)
- Canvas editor → Node sidebar: renders (evidence: `src/pages/Editor.tsx`)
- Canvas editor → Node type map: uses types (evidence: `src/pages/Editor.tsx`)
- Interactive canvas → Node type map: uses types (evidence: `src/components/canvas/Canvas.tsx`)
- Node sidebar → Node type map: uses types (evidence: `src/components/layout/Sidebar.tsx`)
- Node sidebar → Priority matrix: renders (evidence: `src/components/layout/Sidebar.tsx`)
- Node registry → Goals and projects: registers (evidence: `src/nodes/registry/registry.tsx`)
- Node registry → Tasks and events: registers (evidence: `src/nodes/registry/registry.tsx`)
- Node registry → Notes and resources: registers (evidence: `src/nodes/registry/registry.tsx`)
- Node presentation → Table node: wraps node (evidence: `src/components/nodes/TableNode.tsx`)
- Canvas editor → Notifications inbox: renders (evidence: `src/pages/Editor.tsx`)
- Canvas editor → Supabase client: uses client (evidence: `src/pages/Editor.tsx`)
- Notifications inbox → Supabase client: uses client (evidence: `src/components/Inbox.tsx`)
- Canvas editor → AI assistant: renders (evidence: `src/pages/Editor.tsx`)
- AI assistant → AI request service: requests AI (evidence: `src/components/canvas/AiAssistantWidget.tsx`)
- AI request service → User: sends request (evidence: `src/lib/aiDumpService.ts`)
- Supabase client → Supabase: connects (evidence: `src/lib/supabase.ts`)
