# ronakkadam141/intellinote architecture

> Architecture diagram of the GitHub repository ronakkadam141/intellinote, 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/ronakkadam141/intellinote
- Repository: https://github.com/ronakkadam141/intellinote

## Overview

Intellinote is an AI-powered collaborative note-taking platform. Its documented product spans account access, workspaces and membership, folders and documents, live collaboration, images, and AI assistance. The backend mounts HTTP routes, whose controllers perform domain operations; a separate Yjs server supports real-time editing. The frontend includes authentication, workspace, and document screens, but the sampled evidence does not establish their API-call relationships. Several backend subsystems are documented by the README or indexed modules but were not sampled, so their internal links are left out where unverified.

Main entry points: [`backend/src/app.js`](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/app.js) (HTTP application), [`backend/src/controllers/workspaceController.js`](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/workspaceController.js) (Workspace operations), [`backend/src/controllers/documentController.js`](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/documentController.js) (Document operations), [`backend/src/controllers/folderController.js`](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/folderController.js) (Folder operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User interface"]
  node_webapp["Web application<br/>[page.tsx]"]
  node_authui["Auth screens<br/>[page.tsx]"]
  node_workspacesui["Workspace screens<br/>[page.tsx]"]
  node_documentui["Document editor<br/>[page.tsx]"]
end

subgraph group_routing["HTTP routing"]
  node_expressapp["HTTP application<br/>[app.js]"]
  node_authroutes["Auth routes<br/>[auth.js]"]
  node_documentroutes["Document routes<br/>[documents.js]"]
  node_folderroutes["Folder routes<br/>[folders.js]"]
  node_airoutes["AI routes<br/>[ai.js]"]
  node_imageroutes["Image routes<br/>[images.js]"]
  node_workspaceroutes["Workspace routes<br/>[workspace.js]"]
  node_memberroutes["Member routes<br/>[member.js]"]
  node_server["Backend server<br/>[server.js]"]
end

subgraph group_domain["Workspace content"]
  node_authcontroller["Account operations<br/>[authController.js]"]
  node_workspacecontroller["Workspace operations"]
  node_membercontroller["Membership operations"]
  node_documentcontroller["Document operations"]
  node_foldercontroller["Folder operations"]
  node_userstore[("User records<br/>[User.js]")]
  node_workspacestore[("Workspace records<br/>[Workspace.js]")]
  node_membershipstore[("Membership records<br/>[WorkspaceMember.js]")]
  node_documentstore[("Document records<br/>[Document.js]")]
  node_folderstore[("Folder records<br/>[Folder.js]")]
end

subgraph group_collaboration["Live collaboration"]
  node_yjsserver["Yjs collaboration<br/>[yjsServer.js]"]
  node_ticketstore[("Websocket tickets<br/>[wsTicketStore.js]")]
  node_prosemirror["Editor schema<br/>[schema.js]"]
end

subgraph group_integrations["AI and media"]
  node_aicontroller["AI operations<br/>[aiController.js]"]
  node_aiservice["AI service<br/>[aiService.js]"]
  node_geminiprovider["Gemini provider<br/>[geminiProvider.js]"]
  node_imagecontroller["Image operations<br/>[imageController.js]"]
end

node_user(("User"))
node_cloudinary["Cloudinary"]

node_user -->|"uses"| node_webapp
node_expressapp -->|"mounts"| node_authroutes
node_expressapp -->|"mounts"| node_documentroutes
node_expressapp -->|"mounts"| node_folderroutes
node_expressapp -->|"mounts"| node_airoutes
node_expressapp -->|"mounts"| node_imageroutes
node_expressapp -->|"mounts"| node_workspaceroutes
node_expressapp -->|"mounts"| node_memberroutes
node_authroutes -->|"dispatches"| node_authcontroller
node_documentroutes -->|"dispatches"| node_documentcontroller
node_folderroutes -->|"dispatches"| node_foldercontroller
node_airoutes -->|"dispatches"| node_aicontroller
node_imageroutes -->|"dispatches"| node_imagecontroller
node_workspaceroutes -.->|"dispatches"| node_workspacecontroller
node_memberroutes -->|"dispatches"| node_membercontroller
node_authcontroller -->|"reads and writes"| node_userstore
node_workspacecontroller -->|"reads and writes"| node_workspacestore
node_workspacecontroller -->|"reads and writes"| node_membershipstore
node_workspacecontroller -->|"reads and deletes"| node_documentstore
node_workspacecontroller -->|"deletes"| node_folderstore
node_membercontroller -->|"looks up"| node_userstore
node_membercontroller -->|"manages"| node_membershipstore
node_documentcontroller -->|"reads and writes"| node_documentstore
node_documentcontroller -->|"reads"| node_folderstore
node_documentcontroller -->|"creates tickets"| node_ticketstore
node_documentcontroller -->|"cleans images"| node_imagecontroller
node_foldercontroller -->|"reads and writes"| node_folderstore
node_foldercontroller -->|"reads and updates"| node_documentstore
node_foldercontroller -->|"cleans images"| node_imagecontroller
node_yjsserver -->|"persists state"| node_documentstore
node_yjsserver -->|"validates tickets"| node_ticketstore
node_yjsserver -->|"uses schema"| node_prosemirror
node_aicontroller -.->|"requests AI"| node_aiservice
node_aiservice -->|"delegates"| node_geminiprovider
node_imagecontroller -->|"uploads and deletes"| node_cloudinary
node_server -->|"serves"| node_expressapp
node_server -->|"initializes"| node_yjsserver

click node_webapp "https://github.com/ronakkadam141/intellinote/blob/main/frontend/src/app/page.tsx"
click node_authui "https://github.com/ronakkadam141/intellinote/blob/main/frontend/src/app/login/page.tsx"
click node_workspacesui "https://github.com/ronakkadam141/intellinote/blob/main/frontend/src/app/workspaces/%5BworkspaceId%5D/page.tsx"
click node_documentui "https://github.com/ronakkadam141/intellinote/blob/main/frontend/src/app/workspaces/%5BworkspaceId%5D/documents/%5BdocumentId%5D/page.tsx"
click node_expressapp "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/app.js"
click node_authroutes "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/auth.js"
click node_documentroutes "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/documents.js"
click node_folderroutes "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/folders.js"
click node_airoutes "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/ai.js"
click node_imageroutes "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/images.js"
click node_workspaceroutes "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/workspace.js"
click node_memberroutes "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/member.js"
click node_authcontroller "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/authController.js"
click node_workspacecontroller "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/workspaceController.js"
click node_membercontroller "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/memberController.js"
click node_documentcontroller "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/documentController.js"
click node_foldercontroller "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/folderController.js"
click node_userstore "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/models/User.js"
click node_workspacestore "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/models/Workspace.js"
click node_membershipstore "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/models/WorkspaceMember.js"
click node_documentstore "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/models/Document.js"
click node_folderstore "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/models/Folder.js"
click node_yjsserver "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/lib/yjsServer.js"
click node_ticketstore "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/lib/wsTicketStore.js"
click node_prosemirror "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/prosemirror/schema.js"
click node_aicontroller "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/aiController.js"
click node_aiservice "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/services/aiService.js"
click node_geminiprovider "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/services/aiProviders/geminiProvider.js"
click node_imagecontroller "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/imageController.js"
click node_server "https://github.com/ronakkadam141/intellinote/blob/main/backend/src/server.js"

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_webapp,node_authui,node_workspacesui,node_documentui,node_user toneBlue
class node_expressapp,node_authroutes,node_documentroutes,node_folderroutes,node_airoutes,node_imageroutes,node_workspaceroutes,node_memberroutes,node_server toneAmber
class node_authcontroller,node_workspacecontroller,node_membercontroller,node_documentcontroller,node_foldercontroller,node_userstore,node_workspacestore,node_membershipstore,node_documentstore,node_folderstore toneMint
class node_yjsserver,node_ticketstore,node_prosemirror toneRose
class node_aicontroller,node_aiservice,node_geminiprovider,node_imagecontroller,node_cloudinary toneIndigo
```

## Components

### User interface

- [Web application](https://github.com/ronakkadam141/intellinote/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [Auth screens](https://github.com/ronakkadam141/intellinote/blob/main/frontend/src/app/login/page.tsx): `frontend/src/app/login/page.tsx`
- [Workspace screens](https://github.com/ronakkadam141/intellinote/blob/main/frontend/src/app/workspaces/%5BworkspaceId%5D/page.tsx): `frontend/src/app/workspaces/[workspaceId]/page.tsx`
- [Document editor](https://github.com/ronakkadam141/intellinote/blob/main/frontend/src/app/workspaces/%5BworkspaceId%5D/documents/%5BdocumentId%5D/page.tsx): `frontend/src/app/workspaces/[workspaceId]/documents/[documentId]/page.tsx`

### HTTP routing

- [HTTP application](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/app.js): `backend/src/app.js`
- [Auth routes](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/auth.js): `backend/src/routes/auth.js`
- [Document routes](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/documents.js): `backend/src/routes/documents.js`
- [Folder routes](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/folders.js): `backend/src/routes/folders.js`
- [AI routes](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/ai.js): `backend/src/routes/ai.js`
- [Image routes](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/images.js): `backend/src/routes/images.js`
- [Workspace routes](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/workspace.js): `backend/src/routes/workspace.js`
- [Member routes](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/routes/member.js): `backend/src/routes/member.js`
- [Backend server](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/server.js): `backend/src/server.js`

### Workspace content

- [Account operations](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/authController.js): `backend/src/controllers/authController.js`
- [Workspace operations](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/workspaceController.js): `backend/src/controllers/workspaceController.js`
- [Membership operations](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/memberController.js): `backend/src/controllers/memberController.js`
- [Document operations](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/documentController.js): `backend/src/controllers/documentController.js`
- [Folder operations](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/folderController.js): `backend/src/controllers/folderController.js`
- [User records](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/models/User.js): `backend/src/models/User.js`
- [Workspace records](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/models/Workspace.js): `backend/src/models/Workspace.js`
- [Membership records](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/models/WorkspaceMember.js): `backend/src/models/WorkspaceMember.js`
- [Document records](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/models/Document.js): `backend/src/models/Document.js`
- [Folder records](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/models/Folder.js): `backend/src/models/Folder.js`

### Live collaboration

- [Yjs collaboration](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/lib/yjsServer.js): `backend/src/lib/yjsServer.js`
- [Websocket tickets](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/lib/wsTicketStore.js): `backend/src/lib/wsTicketStore.js`
- [Editor schema](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/prosemirror/schema.js): `backend/src/prosemirror/schema.js`

### AI and media

- [AI operations](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/aiController.js): `backend/src/controllers/aiController.js`
- [AI service](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/services/aiService.js): `backend/src/services/aiService.js`
- [Gemini provider](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/services/aiProviders/geminiProvider.js): `backend/src/services/aiProviders/geminiProvider.js`
- [Image operations](https://github.com/ronakkadam141/intellinote/blob/main/backend/src/controllers/imageController.js): `backend/src/controllers/imageController.js`

### Other components

- **User**
- **Cloudinary**

## Connections

- User → Web application: uses
- HTTP application → Auth routes: mounts (evidence: `backend/src/app.js`)
- HTTP application → Document routes: mounts (evidence: `backend/src/app.js`)
- HTTP application → Folder routes: mounts (evidence: `backend/src/app.js`)
- HTTP application → AI routes: mounts (evidence: `backend/src/app.js`)
- HTTP application → Image routes: mounts (evidence: `backend/src/app.js`)
- HTTP application → Workspace routes: mounts (evidence: `backend/src/app.js`)
- HTTP application → Member routes: mounts (evidence: `backend/src/app.js`)
- Auth routes → Account operations: dispatches (evidence: `backend/src/routes/auth.js`)
- Document routes → Document operations: dispatches (evidence: `backend/src/routes/documents.js`)
- Folder routes → Folder operations: dispatches (evidence: `backend/src/routes/folders.js`)
- AI routes → AI operations: dispatches (evidence: `backend/src/routes/ai.js`)
- Image routes → Image operations: dispatches (evidence: `backend/src/routes/images.js`)
- Workspace routes → Workspace operations: dispatches
- Member routes → Membership operations: dispatches (evidence: `backend/src/routes/member.js`)
- Account operations → User records: reads and writes (evidence: `backend/src/controllers/authController.js`)
- Workspace operations → Workspace records: reads and writes (evidence: `backend/src/controllers/workspaceController.js`)
- Workspace operations → Membership records: reads and writes (evidence: `backend/src/controllers/workspaceController.js`)
- Workspace operations → Document records: reads and deletes (evidence: `backend/src/controllers/workspaceController.js`)
- Workspace operations → Folder records: deletes (evidence: `backend/src/controllers/workspaceController.js`)
- Membership operations → User records: looks up (evidence: `backend/src/controllers/memberController.js`)
- Membership operations → Membership records: manages (evidence: `backend/src/controllers/memberController.js`)
- Document operations → Document records: reads and writes (evidence: `backend/src/controllers/documentController.js`)
- Document operations → Folder records: reads (evidence: `backend/src/controllers/documentController.js`)
- Document operations → Websocket tickets: creates tickets (evidence: `backend/src/controllers/documentController.js`)
- Document operations → Image operations: cleans images (evidence: `backend/src/controllers/documentController.js`)
- Folder operations → Folder records: reads and writes (evidence: `backend/src/controllers/folderController.js`)
- Folder operations → Document records: reads and updates (evidence: `backend/src/controllers/folderController.js`)
- Folder operations → Image operations: cleans images (evidence: `backend/src/controllers/folderController.js`)
- Yjs collaboration → Document records: persists state (evidence: `backend/src/lib/yjsServer.js`)
- Yjs collaboration → Websocket tickets: validates tickets (evidence: `backend/src/lib/yjsServer.js`)
- Yjs collaboration → Editor schema: uses schema (evidence: `backend/src/lib/yjsServer.js`)
- AI operations → AI service: requests AI
- AI service → Gemini provider: delegates (evidence: `backend/src/services/aiService.js`)
- Image operations → Cloudinary: uploads and deletes (evidence: `backend/src/controllers/imageController.js`)
- Backend server → HTTP application: serves (evidence: `backend/src/server.js`)
- Backend server → Yjs collaboration: initializes (evidence: `backend/src/server.js`)
