# aluro7in/supermemory architecture

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

- Interactive diagram: https://gitdiagram.com/aluro7in/supermemory
- Repository: https://github.com/aluro7in/supermemory

## Overview

Supermemory is an AI second brain: people save content, organize it into projects, and retrieve it through chat or connected AI tools. The repository includes a web app, browser and Raycast extensions, MCP support, and reusable AI integrations; the actual memory-service backend is not present in this tree. The graph reflects README-described product capabilities, sampled MCP behavior, and source paths available in the tree; wiring within unsampled web and extension flows is therefore shown only at the documented product level.

Main entry points: [`packages/lib/api.ts`](https://github.com/aluro7in/supermemory/blob/main/packages/lib/api.ts) (Web API client), [`apps/web/app/(app)/page.tsx`](https://github.com/aluro7in/supermemory/blob/main/apps/web/app/(app)/page.tsx) (Web application), [`apps/mcp/src/server.ts`](https://github.com/aluro7in/supermemory/blob/main/apps/mcp/src/server.ts) (MCP server), [`apps/browser-extension/entrypoints/content/index.ts`](https://github.com/aluro7in/supermemory/blob/main/apps/browser-extension/entrypoints/content/index.ts) (Page integrations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web app"]
  node_webapp["Web application<br/>[page.tsx]"]
  node_onboarding["Onboarding<br/>[page.tsx]"]
  node_settings["Settings and connections<br/>[page.tsx]"]
end

subgraph group_capture["Capture and organize"]
  node_addmemory["Add memory<br/>[index.tsx]"]
  node_connections["Connected sources"]
  node_browser["Browser extension<br/>[App.tsx]"]
  node_sitecapture["Page integrations<br/>[index.ts]"]
  node_twitterimport["X bookmark import<br/>[twitter-import.ts]"]
  node_raycastadd["Raycast save<br/>[add-memory.tsx]"]
end

subgraph group_retrieval["Memory retrieval"]
  node_chat["Memory chat<br/>[index.tsx]"]
  node_graph["Memory graph<br/>[memory-graph.tsx]"]
  node_raycastsearch["Raycast search"]
end

subgraph group_integrations["AI integrations"]
  node_mcpserver["MCP server<br/>[server.ts]"]
  node_mcpclient["MCP API client<br/>[client.ts]"]
  node_aitools["AI tool adapters<br/>[index.ts]"]
end

subgraph group_shared["Shared capabilities"]
  node_apiclient["Web API client<br/>[api.ts]"]
  node_profile["Onboarding research<br/>[route.ts]"]
end

node_person(("Person"))
node_memoryservice["Supermemory service"]

node_person -->|"sets up account"| node_onboarding
node_person -->|"uses"| node_webapp
node_person -->|"saves from browser"| node_browser
node_person -->|"saves with Raycast"| node_raycastadd
node_person -->|"searches with Raycast"| node_raycastsearch
node_person -->|"connects AI tool"| node_mcpserver
node_onboarding -->|"requests research"| node_profile
node_webapp -->|"opens capture"| node_addmemory
node_webapp -->|"manages sources"| node_connections
node_webapp -->|"opens chat"| node_chat
node_webapp -->|"views graph"| node_graph
node_webapp -->|"configures account"| node_settings
node_addmemory -->|"submits content"| node_apiclient
node_connections -->|"connects sources"| node_apiclient
node_browser -->|"saves page"| node_apiclient
node_sitecapture -->|"captures conversations"| node_apiclient
node_sitecapture -->|"supports import"| node_twitterimport
node_twitterimport -->|"imports bookmarks"| node_apiclient
node_raycastadd -->|"saves memory"| node_memoryservice
node_chat -->|"queries memories"| node_apiclient
node_graph -->|"loads graph data"| node_memoryservice
node_raycastsearch -->|"searches memories"| node_memoryservice
node_apiclient -->|"calls API"| node_memoryservice
node_mcpserver -->|"dispatches tools"| node_mcpclient
node_mcpclient -->|"reads and writes"| node_memoryservice
node_aitools -.->|"integrates memory"| node_memoryservice
node_settings -.->|"configures connection"| node_mcpserver
node_profile -.->|"uses web research"| node_memoryservice

click node_webapp "https://github.com/aluro7in/supermemory/blob/main/apps/web/app/(app)/page.tsx"
click node_onboarding "https://github.com/aluro7in/supermemory/blob/main/apps/web/app/(app)/onboarding/page.tsx"
click node_settings "https://github.com/aluro7in/supermemory/blob/main/apps/web/app/(app)/settings/page.tsx"
click node_addmemory "https://github.com/aluro7in/supermemory/blob/main/apps/web/components/add-document/index.tsx"
click node_connections "https://github.com/aluro7in/supermemory/blob/main/apps/web/components/integrations-view.tsx"
click node_browser "https://github.com/aluro7in/supermemory/blob/main/apps/browser-extension/entrypoints/popup/App.tsx"
click node_sitecapture "https://github.com/aluro7in/supermemory/blob/main/apps/browser-extension/entrypoints/content/index.ts"
click node_twitterimport "https://github.com/aluro7in/supermemory/blob/main/apps/browser-extension/utils/twitter-import.ts"
click node_raycastadd "https://github.com/aluro7in/supermemory/blob/main/apps/raycast-extension/src/add-memory.tsx"
click node_chat "https://github.com/aluro7in/supermemory/blob/main/apps/web/components/chat/index.tsx"
click node_graph "https://github.com/aluro7in/supermemory/blob/main/packages/memory-graph/src/components/memory-graph.tsx"
click node_raycastsearch "https://github.com/aluro7in/supermemory/blob/main/apps/raycast-extension/src/search-memories.tsx"
click node_mcpserver "https://github.com/aluro7in/supermemory/blob/main/apps/mcp/src/server.ts"
click node_mcpclient "https://github.com/aluro7in/supermemory/blob/main/apps/mcp/src/client.ts"
click node_aitools "https://github.com/aluro7in/supermemory/blob/main/packages/tools/src/index.ts"
click node_apiclient "https://github.com/aluro7in/supermemory/blob/main/packages/lib/api.ts"
click node_profile "https://github.com/aluro7in/supermemory/blob/main/apps/web/app/api/onboarding/research/route.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_webapp,node_onboarding,node_settings toneBlue
class node_addmemory,node_connections,node_browser,node_sitecapture,node_twitterimport,node_raycastadd toneAmber
class node_chat,node_graph,node_raycastsearch toneMint
class node_mcpserver,node_mcpclient,node_aitools toneRose
class node_apiclient,node_profile,node_person,node_memoryservice toneIndigo
```

## Components

### Web app

- [Web application](https://github.com/aluro7in/supermemory/blob/main/apps/web/app/(app)/page.tsx): `apps/web/app/(app)/page.tsx`
- [Onboarding](https://github.com/aluro7in/supermemory/blob/main/apps/web/app/(app)/onboarding/page.tsx): `apps/web/app/(app)/onboarding/page.tsx`
- [Settings and connections](https://github.com/aluro7in/supermemory/blob/main/apps/web/app/(app)/settings/page.tsx): `apps/web/app/(app)/settings/page.tsx`

### Capture and organize

- [Add memory](https://github.com/aluro7in/supermemory/blob/main/apps/web/components/add-document/index.tsx): `apps/web/components/add-document/index.tsx`
- [Connected sources](https://github.com/aluro7in/supermemory/blob/main/apps/web/components/integrations-view.tsx): `apps/web/components/integrations-view.tsx`
- [Browser extension](https://github.com/aluro7in/supermemory/blob/main/apps/browser-extension/entrypoints/popup/App.tsx): `apps/browser-extension/entrypoints/popup/App.tsx`
- [Page integrations](https://github.com/aluro7in/supermemory/blob/main/apps/browser-extension/entrypoints/content/index.ts): `apps/browser-extension/entrypoints/content/index.ts`
- [X bookmark import](https://github.com/aluro7in/supermemory/blob/main/apps/browser-extension/utils/twitter-import.ts): `apps/browser-extension/utils/twitter-import.ts`
- [Raycast save](https://github.com/aluro7in/supermemory/blob/main/apps/raycast-extension/src/add-memory.tsx): `apps/raycast-extension/src/add-memory.tsx`

### Memory retrieval

- [Memory chat](https://github.com/aluro7in/supermemory/blob/main/apps/web/components/chat/index.tsx): `apps/web/components/chat/index.tsx`
- [Memory graph](https://github.com/aluro7in/supermemory/blob/main/packages/memory-graph/src/components/memory-graph.tsx): `packages/memory-graph/src/components/memory-graph.tsx`
- [Raycast search](https://github.com/aluro7in/supermemory/blob/main/apps/raycast-extension/src/search-memories.tsx): `apps/raycast-extension/src/search-memories.tsx`

### AI integrations

- [MCP server](https://github.com/aluro7in/supermemory/blob/main/apps/mcp/src/server.ts): `apps/mcp/src/server.ts`
- [MCP API client](https://github.com/aluro7in/supermemory/blob/main/apps/mcp/src/client.ts): `apps/mcp/src/client.ts`
- [AI tool adapters](https://github.com/aluro7in/supermemory/blob/main/packages/tools/src/index.ts): `packages/tools/src/index.ts`

### Shared capabilities

- [Web API client](https://github.com/aluro7in/supermemory/blob/main/packages/lib/api.ts): `packages/lib/api.ts`
- [Onboarding research](https://github.com/aluro7in/supermemory/blob/main/apps/web/app/api/onboarding/research/route.ts): `apps/web/app/api/onboarding/research/route.ts`

### Other components

- **Person**
- **Supermemory service**

## Connections

- Person → Onboarding: sets up account
- Person → Web application: uses
- Person → Browser extension: saves from browser
- Person → Raycast save: saves with Raycast
- Person → Raycast search: searches with Raycast
- Person → MCP server: connects AI tool
- Onboarding → Onboarding research: requests research
- Web application → Add memory: opens capture
- Web application → Connected sources: manages sources
- Web application → Memory chat: opens chat
- Web application → Memory graph: views graph
- Web application → Settings and connections: configures account
- Add memory → Web API client: submits content
- Connected sources → Web API client: connects sources
- Browser extension → Web API client: saves page
- Page integrations → Web API client: captures conversations
- Page integrations → X bookmark import: supports import
- X bookmark import → Web API client: imports bookmarks
- Raycast save → Supermemory service: saves memory
- Memory chat → Web API client: queries memories
- Memory graph → Supermemory service: loads graph data
- Raycast search → Supermemory service: searches memories
- Web API client → Supermemory service: calls API
- MCP server → MCP API client: dispatches tools
- MCP API client → Supermemory service: reads and writes
- AI tool adapters → Supermemory service: integrates memory
- Settings and connections → MCP server: configures connection
- Onboarding research → Supermemory service: uses web research
