# npl1228/teamorie architecture

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

- Interactive diagram: https://gitdiagram.com/npl1228/teamorie
- Repository: https://github.com/npl1228/teamorie

## Overview

Teamorie is a collaborative chat application with an AI agent that turns conversation into searchable project and team memories. Users enter through the web app, use chat and collaboration features, and can query the agent; the backend routes messages into storage, retrieval, or private-agent workflows. Memory extraction and retrieval depend on Gemini and Chroma, while account and chat data use SQLite through the storage module. The excerpts show core AI and routing relationships; frontend-to-backend transport and several backend route details were not sampled, so those links are omitted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/npl1228/teamorie/blob/main/frontend/src/App.jsx) (App routing), [`backend/bot.py`](https://github.com/npl1228/teamorie/blob/main/backend/bot.py) (Message router), [`backend/memory/storage.py`](https://github.com/npl1228/teamorie/blob/main/backend/memory/storage.py) (Account and chat data), [`backend/pipelines/storage_pipeline.py`](https://github.com/npl1228/teamorie/blob/main/backend/pipelines/storage_pipeline.py) (Message storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["App routing<br/>[App.jsx]"]
  node_layout["App layout<br/>[Layout.jsx]"]
  node_chatui["Chat room<br/>[ChatRoom.jsx]"]
  node_chatlist["Chat lists<br/>[ChatList.jsx]"]
  node_chatinfo["Chat details<br/>[ChatInfo.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_friends["Friends<br/>[FriendsList.jsx]"]
  node_notifications["Notifications<br/>[Notifications.jsx]"]
  node_settings["Settings<br/>[Settings.jsx]"]
  node_landing["Landing<br/>[Landing.jsx]"]
  node_login["Login<br/>[Login.jsx]"]
  node_meeting["Meeting room<br/>[MeetingRoom.jsx]"]
  node_meetingleft["Meeting exit<br/>[MeetingLeft.jsx]"]
end

subgraph group_api["Backend API"]
  node_api["HTTP and sockets<br/>[main.py]"]
end

subgraph group_agent["Agent workflows"]
  node_bot["Message router<br/>[bot.py]"]
  node_storagepipe["Message storage"]
  node_privatepipe["Private agent"]
  node_retrieval["Memory retrieval"]
  node_pruning["Memory pruning"]
  node_gemini["Gemini services<br/>[gemini.py]"]
end

subgraph group_memory["Memory services"]
  node_sqlstorage["Account and chat data<br/>[storage.py]"]
  node_chromamodule["Vector memory<br/>[chroma.py]"]
  node_sqlite[("SQLite database")]
  node_chromadb[("Chroma store")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes"| node_landing
node_app -->|"routes"| node_login
node_app -->|"routes"| node_dashboard
node_app -->|"wraps"| node_layout
node_app -->|"routes"| node_chatui
node_app -->|"routes"| node_chatlist
node_app -->|"routes"| node_chatinfo
node_app -->|"routes"| node_friends
node_app -->|"routes"| node_notifications
node_app -->|"routes"| node_settings
node_app -->|"routes"| node_meeting
node_app -->|"routes"| node_meetingleft
node_api -->|"calls"| node_sqlstorage
node_api -.->|"dispatches"| node_bot
node_bot -->|"reads chat"| node_sqlstorage
node_bot -->|"dispatches"| node_privatepipe
node_bot -->|"buffers messages"| node_storagepipe
node_bot -->|"queries memories"| node_retrieval
node_bot -->|"classifies intent"| node_gemini
node_bot -->|"loads history"| node_sqlstorage
node_storagepipe -->|"buffers and reads"| node_sqlstorage
node_storagepipe -->|"summarizes"| node_gemini
node_storagepipe -->|"stores nodes"| node_chromamodule
node_storagepipe -->|"checks pruning"| node_pruning
node_storagepipe -->|"registers projects"| node_sqlstorage
node_privatepipe -->|"loads projects"| node_sqlstorage
node_privatepipe -->|"classifies message"| node_gemini
node_privatepipe -->|"routes queries"| node_retrieval
node_privatepipe -->|"stores or corrects"| node_chromamodule
node_retrieval -->|"loads weights"| node_sqlstorage
node_retrieval -->|"searches and fetches"| node_chromamodule
node_retrieval -->|"generates response"| node_gemini
node_pruning -->|"reads and deletes"| node_chromamodule
node_sqlstorage -.->|"reads and writes"| node_sqlite
node_chromamodule -->|"reads and writes"| node_chromadb

click node_app "https://github.com/npl1228/teamorie/blob/main/frontend/src/App.jsx"
click node_layout "https://github.com/npl1228/teamorie/blob/main/frontend/src/components/Layout.jsx"
click node_chatui "https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/ChatRoom.jsx"
click node_chatlist "https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/ChatList.jsx"
click node_chatinfo "https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/ChatInfo.jsx"
click node_dashboard "https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/Dashboard.jsx"
click node_friends "https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/FriendsList.jsx"
click node_notifications "https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/Notifications.jsx"
click node_settings "https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/Settings.jsx"
click node_landing "https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/Landing.jsx"
click node_login "https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/Login.jsx"
click node_meeting "https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/MeetingRoom.jsx"
click node_meetingleft "https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/MeetingLeft.jsx"
click node_api "https://github.com/npl1228/teamorie/blob/main/backend/main.py"
click node_bot "https://github.com/npl1228/teamorie/blob/main/backend/bot.py"
click node_storagepipe "https://github.com/npl1228/teamorie/blob/main/backend/pipelines/storage_pipeline.py"
click node_privatepipe "https://github.com/npl1228/teamorie/blob/main/backend/pipelines/private_agent_pipeline.py"
click node_retrieval "https://github.com/npl1228/teamorie/blob/main/backend/pipelines/retrieval_pipeline.py"
click node_pruning "https://github.com/npl1228/teamorie/blob/main/backend/pipelines/pruning_pipeline.py"
click node_gemini "https://github.com/npl1228/teamorie/blob/main/backend/llm/gemini.py"
click node_sqlstorage "https://github.com/npl1228/teamorie/blob/main/backend/memory/storage.py"
click node_chromamodule "https://github.com/npl1228/teamorie/blob/main/backend/memory/chroma.py"

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_layout,node_chatui,node_chatlist,node_chatinfo,node_dashboard,node_friends,node_notifications,node_settings,node_landing,node_login,node_meeting,node_meetingleft,node_user toneBlue
class node_api toneAmber
class node_bot,node_storagepipe,node_privatepipe,node_retrieval,node_pruning,node_gemini toneMint
class node_sqlstorage,node_chromamodule,node_sqlite,node_chromadb toneRose
```

## Components

### Web application

- [App routing](https://github.com/npl1228/teamorie/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [App layout](https://github.com/npl1228/teamorie/blob/main/frontend/src/components/Layout.jsx): `frontend/src/components/Layout.jsx`
- [Chat room](https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/ChatRoom.jsx): `frontend/src/pages/ChatRoom.jsx`
- [Chat lists](https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/ChatList.jsx): `frontend/src/pages/ChatList.jsx`
- [Chat details](https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/ChatInfo.jsx): `frontend/src/pages/ChatInfo.jsx`
- [Dashboard](https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Friends](https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/FriendsList.jsx): `frontend/src/pages/FriendsList.jsx`
- [Notifications](https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/Notifications.jsx): `frontend/src/pages/Notifications.jsx`
- [Settings](https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/Settings.jsx): `frontend/src/pages/Settings.jsx`
- [Landing](https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/Landing.jsx): `frontend/src/pages/Landing.jsx`
- [Login](https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Meeting room](https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/MeetingRoom.jsx): `frontend/src/pages/MeetingRoom.jsx`
- [Meeting exit](https://github.com/npl1228/teamorie/blob/main/frontend/src/pages/MeetingLeft.jsx): `frontend/src/pages/MeetingLeft.jsx`

### Backend API

- [HTTP and sockets](https://github.com/npl1228/teamorie/blob/main/backend/main.py): `backend/main.py`

### Agent workflows

- [Message router](https://github.com/npl1228/teamorie/blob/main/backend/bot.py): `backend/bot.py`
- [Message storage](https://github.com/npl1228/teamorie/blob/main/backend/pipelines/storage_pipeline.py): `backend/pipelines/storage_pipeline.py`
- [Private agent](https://github.com/npl1228/teamorie/blob/main/backend/pipelines/private_agent_pipeline.py): `backend/pipelines/private_agent_pipeline.py`
- [Memory retrieval](https://github.com/npl1228/teamorie/blob/main/backend/pipelines/retrieval_pipeline.py): `backend/pipelines/retrieval_pipeline.py`
- [Memory pruning](https://github.com/npl1228/teamorie/blob/main/backend/pipelines/pruning_pipeline.py): `backend/pipelines/pruning_pipeline.py`
- [Gemini services](https://github.com/npl1228/teamorie/blob/main/backend/llm/gemini.py): `backend/llm/gemini.py`

### Memory services

- [Account and chat data](https://github.com/npl1228/teamorie/blob/main/backend/memory/storage.py): `backend/memory/storage.py`
- [Vector memory](https://github.com/npl1228/teamorie/blob/main/backend/memory/chroma.py): `backend/memory/chroma.py`
- **SQLite database**
- **Chroma store**

### Other components

- **User**

## Connections

- User → App routing: uses
- App routing → Landing: routes (evidence: `frontend/src/App.jsx`)
- App routing → Login: routes (evidence: `frontend/src/App.jsx`)
- App routing → Dashboard: routes (evidence: `frontend/src/App.jsx`)
- App routing → App layout: wraps (evidence: `frontend/src/App.jsx`)
- App routing → Chat room: routes (evidence: `frontend/src/App.jsx`)
- App routing → Chat lists: routes (evidence: `frontend/src/App.jsx`)
- App routing → Chat details: routes (evidence: `frontend/src/App.jsx`)
- App routing → Friends: routes (evidence: `frontend/src/App.jsx`)
- App routing → Notifications: routes (evidence: `frontend/src/App.jsx`)
- App routing → Settings: routes (evidence: `frontend/src/App.jsx`)
- App routing → Meeting room: routes (evidence: `frontend/src/App.jsx`)
- App routing → Meeting exit: routes (evidence: `frontend/src/App.jsx`)
- HTTP and sockets → Account and chat data: calls (evidence: `backend/main.py`)
- HTTP and sockets → Message router: dispatches (evidence: `backend/main.py`)
- Message router → Account and chat data: reads chat (evidence: `backend/bot.py`)
- Message router → Private agent: dispatches (evidence: `backend/bot.py`)
- Message router → Message storage: buffers messages (evidence: `backend/bot.py`)
- Message router → Memory retrieval: queries memories (evidence: `backend/bot.py`)
- Message router → Gemini services: classifies intent (evidence: `backend/bot.py`)
- Message router → Account and chat data: loads history (evidence: `backend/bot.py`)
- Message storage → Account and chat data: buffers and reads (evidence: `backend/pipelines/storage_pipeline.py`)
- Message storage → Gemini services: summarizes (evidence: `backend/pipelines/storage_pipeline.py`)
- Message storage → Vector memory: stores nodes (evidence: `backend/pipelines/storage_pipeline.py`)
- Message storage → Memory pruning: checks pruning (evidence: `backend/pipelines/storage_pipeline.py`)
- Message storage → Account and chat data: registers projects (evidence: `backend/pipelines/storage_pipeline.py`)
- Private agent → Account and chat data: loads projects (evidence: `backend/pipelines/private_agent_pipeline.py`)
- Private agent → Gemini services: classifies message (evidence: `backend/pipelines/private_agent_pipeline.py`)
- Private agent → Memory retrieval: routes queries (evidence: `backend/pipelines/private_agent_pipeline.py`)
- Private agent → Vector memory: stores or corrects (evidence: `backend/pipelines/private_agent_pipeline.py`)
- Memory retrieval → Account and chat data: loads weights (evidence: `backend/pipelines/retrieval_pipeline.py`)
- Memory retrieval → Vector memory: searches and fetches (evidence: `backend/pipelines/retrieval_pipeline.py`)
- Memory retrieval → Gemini services: generates response (evidence: `backend/pipelines/retrieval_pipeline.py`)
- Memory pruning → Vector memory: reads and deletes (evidence: `backend/pipelines/pruning_pipeline.py`)
- Account and chat data → SQLite database: reads and writes
- Vector memory → Chroma store: reads and writes (evidence: `backend/memory/chroma.py`)
