# renothingg/remind architecture

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

- Interactive diagram: https://gitdiagram.com/renothingg/remind
- Repository: https://github.com/renothingg/remind

## Overview

ReMind is a React/TypeScript chat workspace backed by a Flask API. The main workflow is user chat input → frontend chat state and API transport → streaming chat endpoint → AI provider/tools → streamed response and session history. Other documented branches cover sign-in and settings, files/media, sharing, Minds/Canvas, GitHub, privacy, and Telegram. Source excerpts are selective; README-documented links are cited, and uncertain subsystem wiring is omitted rather than inferred.

Main entry points: [`routes/features`](https://github.com/renothingg/remind/tree/main/routes/features) (Feature routes), [`app_factory.py`](https://github.com/renothingg/remind/blob/main/app_factory.py) (App assembly), [`src/services/api.ts`](https://github.com/renothingg/remind/blob/main/src/services/api.ts) (API client), [`services/tool_execution.py`](https://github.com/renothingg/remind/blob/main/services/tool_execution.py) (Tool execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web workspace"]
  node_spa["React app<br/>[App.tsx]"]
  node_chat_hook["Chat state<br/>[useChat.ts]"]
  node_api_client["API client<br/>[api.ts]"]
  node_auth_ui["Auth context<br/>[AuthContext.tsx]"]
  node_settings["Settings context"]
end

subgraph group_backend["Flask API"]
  node_routes["Feature routes"]
  node_app_factory["App assembly<br/>[app_factory.py]"]
  node_chat_history["Chat history<br/>[chat_history.py]"]
  node_file_pipeline["Secure uploads<br/>[files.py]"]
  node_media["Voice and translation<br/>[voice.py]"]
  node_minds["Minds<br/>[minds.py]"]
  node_github["GitHub integration<br/>[github_app.py]"]
end

subgraph group_ai["AI and tools"]
  node_ai_provider["AI adapters"]
  node_tool_runtime["Tool execution<br/>[tool_execution.py]"]
  node_tool_validation["Tool validation<br/>[tool_validation.py]"]
  node_web_research["Web research<br/>[research_tools.py]"]
end

subgraph group_identity["Identity and privacy"]
  node_auth_service["Auth service<br/>[auth.py]"]
  node_privacy["Privacy flows<br/>[privacy.py]"]
end

subgraph group_operations["State and integrations"]
  node_database[("Application database")]
  node_redis[("Redis")]
  node_celery["Celery worker<br/>[celery_worker.py]"]
  node_telegram["Telegram bot<br/>[telegram_bot.py]"]
end

node_user(("User"))
node_ai_external{{"AI provider"}}
node_tts_external{{"Google Translate TTS"}}

node_user -->|"uses"| node_spa
node_spa -->|"manages chat"| node_chat_hook
node_chat_hook -->|"sends requests"| node_api_client
node_api_client -->|"HTTP / SSE"| node_routes
node_routes -->|"registered by"| node_app_factory
node_routes -.->|"uses services"| node_chat_history
node_routes -.->|"invokes AI"| node_ai_provider
node_ai_provider -.->|"queries"| node_ai_external
node_tool_runtime -->|"validates calls"| node_tool_validation
node_tool_runtime -.->|"runs research"| node_web_research
node_auth_ui -.->|"uses API"| node_api_client
node_routes -.->|"authenticates"| node_auth_service
node_app_factory -->|"sets up auth"| node_auth_service
node_settings -->|"reads auth state"| node_auth_ui
node_routes -.->|"handles uploads"| node_file_pipeline
node_routes -.->|"serves media"| node_media
node_routes -->|"routes Minds"| node_minds
node_routes -.->|"serves GitHub"| node_github
node_routes -.->|"serves privacy"| node_privacy
node_chat_history -.->|"persists history"| node_database
node_app_factory -.->|"configures storage"| node_database
node_app_factory -.->|"uses Redis"| node_redis
node_redis -->|"queues tasks"| node_celery
node_telegram -.->|"synchronized channel"| node_routes
node_media -->|"synthesizes speech"| node_tts_external

click node_spa "https://github.com/renothingg/remind/blob/main/src/App.tsx"
click node_chat_hook "https://github.com/renothingg/remind/blob/main/src/hooks/useChat.ts"
click node_api_client "https://github.com/renothingg/remind/blob/main/src/services/api.ts"
click node_auth_ui "https://github.com/renothingg/remind/blob/main/src/context/AuthContext.tsx"
click node_settings "https://github.com/renothingg/remind/blob/main/src/context/SettingsContext.tsx"
click node_routes "https://github.com/renothingg/remind/tree/main/routes/features"
click node_app_factory "https://github.com/renothingg/remind/blob/main/app_factory.py"
click node_chat_history "https://github.com/renothingg/remind/blob/main/services/chat_history.py"
click node_ai_provider "https://github.com/renothingg/remind/tree/main/ai_engine"
click node_tool_runtime "https://github.com/renothingg/remind/blob/main/services/tool_execution.py"
click node_tool_validation "https://github.com/renothingg/remind/blob/main/services/tool_validation.py"
click node_web_research "https://github.com/renothingg/remind/blob/main/services/research_tools.py"
click node_auth_service "https://github.com/renothingg/remind/blob/main/utils/auth.py"
click node_file_pipeline "https://github.com/renothingg/remind/blob/main/services/files.py"
click node_media "https://github.com/renothingg/remind/blob/main/services/voice.py"
click node_minds "https://github.com/renothingg/remind/blob/main/routes/features/minds.py"
click node_github "https://github.com/renothingg/remind/blob/main/services/github_app.py"
click node_privacy "https://github.com/renothingg/remind/blob/main/utils/privacy.py"
click node_celery "https://github.com/renothingg/remind/blob/main/celery_worker.py"
click node_telegram "https://github.com/renothingg/remind/blob/main/telegram_bot.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_spa,node_chat_hook,node_api_client,node_auth_ui,node_settings,node_user toneBlue
class node_routes,node_app_factory,node_chat_history,node_file_pipeline,node_media,node_minds,node_github toneAmber
class node_ai_provider,node_tool_runtime,node_tool_validation,node_web_research toneMint
class node_auth_service,node_privacy toneRose
class node_database,node_redis,node_celery,node_telegram,node_ai_external,node_tts_external toneIndigo
```

## Components

### Web workspace

- [React app](https://github.com/renothingg/remind/blob/main/src/App.tsx): `src/App.tsx`
- [Chat state](https://github.com/renothingg/remind/blob/main/src/hooks/useChat.ts): `src/hooks/useChat.ts`
- [API client](https://github.com/renothingg/remind/blob/main/src/services/api.ts): `src/services/api.ts`
- [Auth context](https://github.com/renothingg/remind/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Settings context](https://github.com/renothingg/remind/blob/main/src/context/SettingsContext.tsx): `src/context/SettingsContext.tsx`

### Flask API

- [Feature routes](https://github.com/renothingg/remind/tree/main/routes/features): `routes/features`
- [App assembly](https://github.com/renothingg/remind/blob/main/app_factory.py): `app_factory.py`
- [Chat history](https://github.com/renothingg/remind/blob/main/services/chat_history.py): `services/chat_history.py`
- [Secure uploads](https://github.com/renothingg/remind/blob/main/services/files.py): `services/files.py`
- [Voice and translation](https://github.com/renothingg/remind/blob/main/services/voice.py): `services/voice.py`
- [Minds](https://github.com/renothingg/remind/blob/main/routes/features/minds.py): `routes/features/minds.py`
- [GitHub integration](https://github.com/renothingg/remind/blob/main/services/github_app.py): `services/github_app.py`

### AI and tools

- [AI adapters](https://github.com/renothingg/remind/tree/main/ai_engine): `ai_engine`
- [Tool execution](https://github.com/renothingg/remind/blob/main/services/tool_execution.py): `services/tool_execution.py`
- [Tool validation](https://github.com/renothingg/remind/blob/main/services/tool_validation.py): `services/tool_validation.py`
- [Web research](https://github.com/renothingg/remind/blob/main/services/research_tools.py): `services/research_tools.py`

### Identity and privacy

- [Auth service](https://github.com/renothingg/remind/blob/main/utils/auth.py): `utils/auth.py`
- [Privacy flows](https://github.com/renothingg/remind/blob/main/utils/privacy.py): `utils/privacy.py`

### State and integrations

- **Application database**
- **Redis**
- [Celery worker](https://github.com/renothingg/remind/blob/main/celery_worker.py): `celery_worker.py`
- [Telegram bot](https://github.com/renothingg/remind/blob/main/telegram_bot.py): `telegram_bot.py`

### Other components

- **User**
- **AI provider**
- **Google Translate TTS**

## Connections

- User → React app: uses
- React app → Chat state: manages chat (evidence: `src/App.tsx`)
- Chat state → API client: sends requests (evidence: `src/hooks/useChat.ts`)
- API client → Feature routes: HTTP / SSE
- Feature routes → App assembly: registered by (evidence: `app_factory.py`)
- Feature routes → Chat history: uses services (evidence: `routes/features/sessions.py`)
- Feature routes → AI adapters: invokes AI
- AI adapters → AI provider: queries
- Tool execution → Tool validation: validates calls
- Tool execution → Web research: runs research
- Auth context → API client: uses API (evidence: `src/context/AuthContext.tsx`)
- Feature routes → Auth service: authenticates (evidence: `routes/features/sessions.py`)
- App assembly → Auth service: sets up auth (evidence: `app_factory.py`)
- Settings context → Auth context: reads auth state (evidence: `src/context/SettingsContext.tsx`)
- Feature routes → Secure uploads: handles uploads
- Feature routes → Voice and translation: serves media
- Feature routes → Minds: routes Minds (evidence: `routes/features/sessions.py`)
- Feature routes → GitHub integration: serves GitHub
- Feature routes → Privacy flows: serves privacy
- Chat history → Application database: persists history
- App assembly → Application database: configures storage
- App assembly → Redis: uses Redis
- Redis → Celery worker: queues tasks
- Telegram bot → Feature routes: synchronized channel
- Voice and translation → Google Translate TTS: synthesizes speech
