# shailesh2302/aether architecture

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

- Interactive diagram: https://gitdiagram.com/shailesh2302/aether
- Repository: https://github.com/shailesh2302/aether

## Overview

Aether combines a web knowledge workspace, REST API, AI document and media processing, and a Rust video worker. The user workflow runs from upload or import through extraction/transcription and vector indexing, then semantic search or document chat; video features also include background processing and clip creation. The graph preserves auth, subscriptions, collaboration/search, and video capabilities documented by the tree. Edges are limited to shown source references or README statements; several unsampled routes and runtime integrations are represented only at subsystem level.

Main entry points: [`apps/api/src/server.ts`](https://github.com/shailesh2302/aether/blob/main/apps/api/src/server.ts) (REST API), [`apps/ai-service/app/services/pipeline.py`](https://github.com/shailesh2302/aether/blob/main/apps/ai-service/app/services/pipeline.py) (Ingestion pipeline), [`apps/api/src/services/vector.service.ts`](https://github.com/shailesh2302/aether/blob/main/apps/api/src/services/vector.service.ts) (Vector operations), [`apps/api/src/routes/file.routes.ts`](https://github.com/shailesh2302/aether/blob/main/apps/api/src/routes/file.routes.ts) (File management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web workspace"]
  node_web["Web app"]
  node_webcomponents["Workspace features"]
end

subgraph group_api["API and accounts"]
  node_api_server["REST API<br/>[server.ts]"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_authmw["Auth middleware<br/>[auth.ts]"]
  node_files["File management<br/>[file.routes.ts]"]
  node_chat["Chat and search<br/>[chat.routes.ts]"]
  node_features["Media and collaboration routes"]
  node_processing["Processing dispatch"]
  node_queue["Job queue<br/>[queue.service.ts]"]
end

subgraph group_ai["AI processing"]
  node_ai_routes["AI endpoints"]
  node_pipeline["Ingestion pipeline<br/>[pipeline.py]"]
  node_documents["Document extraction"]
  node_transcription["Audio transcription<br/>[whisper_service.py]"]
  node_embeddings["Embedding generation"]
  node_rag["RAG and LLM<br/>[rag_service.py]"]
end

subgraph group_worker["Video worker"]
  node_rust_worker["Video job worker<br/>[video_worker.rs]"]
  node_clip_worker["Clip worker<br/>[clip_worker.rs]"]
  node_ffmpeg["Media operations<br/>[mod.rs]"]
end

subgraph group_state["Data and services"]
  node_vectors["Vector operations<br/>[vector.service.ts]"]
  node_database[("PostgreSQL<br/>[db.ts]")]
  node_redis[("Redis<br/>[redis_client.rs]")]
  node_qdrant[("Qdrant")]
end

node_user(("User"))
node_ai_provider{{"LLM and embedding provider"}}

node_user -->|"uses"| node_web
node_web -.->|"requests"| node_api_server
node_web -.->|"renders"| node_webcomponents
node_api_server -->|"registers routes"| node_auth
node_authmw -->|"verifies tokens"| node_auth
node_api_server -->|"registers routes"| node_files
node_api_server -->|"registers routes"| node_chat
node_api_server -->|"registers routes"| node_features
node_files -->|"dispatches processing"| node_processing
node_files -->|"enqueues jobs"| node_queue
node_files -->|"reads vectors"| node_vectors
node_chat -->|"searches vectors"| node_vectors
node_chat -->|"reads and writes"| node_database
node_pipeline -->|"extracts text"| node_documents
node_pipeline -->|"transcribes media"| node_transcription
node_pipeline -->|"embeds chunks"| node_embeddings
node_pipeline -->|"indexes vectors"| node_vectors
node_ai_routes -.->|"starts ingestion"| node_pipeline
node_rag -->|"embeds queries"| node_embeddings
node_rag -->|"retrieves matches"| node_vectors
node_embeddings -->|"requests embeddings"| node_ai_provider
node_vectors -.->|"stores vectors"| node_qdrant
node_rust_worker -->|"consumes jobs"| node_redis
node_clip_worker -->|"creates clips"| node_ffmpeg
node_rust_worker -->|"processes media"| node_ffmpeg
node_queue -.->|"shares job queue"| node_redis
node_chat -.->|"calls AI service"| node_ai_routes

click node_web "https://github.com/shailesh2302/aether/tree/main/apps/web/src/app"
click node_webcomponents "https://github.com/shailesh2302/aether/tree/main/apps/web/src/components"
click node_api_server "https://github.com/shailesh2302/aether/blob/main/apps/api/src/server.ts"
click node_auth "https://github.com/shailesh2302/aether/blob/main/apps/api/src/modules/auth/auth.service.ts"
click node_authmw "https://github.com/shailesh2302/aether/blob/main/apps/api/src/middleware/auth.ts"
click node_files "https://github.com/shailesh2302/aether/blob/main/apps/api/src/routes/file.routes.ts"
click node_chat "https://github.com/shailesh2302/aether/blob/main/apps/api/src/routes/chat.routes.ts"
click node_features "https://github.com/shailesh2302/aether/tree/main/apps/api/src/routes"
click node_processing "https://github.com/shailesh2302/aether/blob/main/apps/api/src/services/processing.service.ts"
click node_queue "https://github.com/shailesh2302/aether/blob/main/apps/api/src/services/queue.service.ts"
click node_ai_routes "https://github.com/shailesh2302/aether/tree/main/apps/ai-service/app/api/routes"
click node_pipeline "https://github.com/shailesh2302/aether/blob/main/apps/ai-service/app/services/pipeline.py"
click node_documents "https://github.com/shailesh2302/aether/blob/main/apps/ai-service/app/services/document_service.py"
click node_transcription "https://github.com/shailesh2302/aether/blob/main/apps/ai-service/app/services/whisper_service.py"
click node_embeddings "https://github.com/shailesh2302/aether/blob/main/apps/ai-service/app/services/embedding_service.py"
click node_rag "https://github.com/shailesh2302/aether/blob/main/apps/ai-service/app/services/rag_service.py"
click node_vectors "https://github.com/shailesh2302/aether/blob/main/apps/api/src/services/vector.service.ts"
click node_database "https://github.com/shailesh2302/aether/blob/main/apps/api/src/config/db.ts"
click node_redis "https://github.com/shailesh2302/aether/blob/main/apps/rust-worker/src/queue/redis_client.rs"
click node_rust_worker "https://github.com/shailesh2302/aether/blob/main/apps/rust-worker/src/workers/video_worker.rs"
click node_clip_worker "https://github.com/shailesh2302/aether/blob/main/apps/rust-worker/src/workers/clip_worker.rs"
click node_ffmpeg "https://github.com/shailesh2302/aether/blob/main/apps/rust-worker/src/ffmpeg/mod.rs"

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_web,node_webcomponents,node_user toneBlue
class node_api_server,node_auth,node_authmw,node_files,node_chat,node_features,node_processing,node_queue toneAmber
class node_ai_routes,node_pipeline,node_documents,node_transcription,node_embeddings,node_rag toneMint
class node_rust_worker,node_clip_worker,node_ffmpeg toneRose
class node_vectors,node_database,node_redis,node_qdrant,node_ai_provider toneIndigo
```

## Components

### Web workspace

- [Web app](https://github.com/shailesh2302/aether/tree/main/apps/web/src/app): `apps/web/src/app`
- [Workspace features](https://github.com/shailesh2302/aether/tree/main/apps/web/src/components): `apps/web/src/components`

### API and accounts

- [REST API](https://github.com/shailesh2302/aether/blob/main/apps/api/src/server.ts): `apps/api/src/server.ts`
- [Authentication](https://github.com/shailesh2302/aether/blob/main/apps/api/src/modules/auth/auth.service.ts): `apps/api/src/modules/auth/auth.service.ts`
- [Auth middleware](https://github.com/shailesh2302/aether/blob/main/apps/api/src/middleware/auth.ts): `apps/api/src/middleware/auth.ts`
- [File management](https://github.com/shailesh2302/aether/blob/main/apps/api/src/routes/file.routes.ts): `apps/api/src/routes/file.routes.ts`
- [Chat and search](https://github.com/shailesh2302/aether/blob/main/apps/api/src/routes/chat.routes.ts): `apps/api/src/routes/chat.routes.ts`
- [Media and collaboration routes](https://github.com/shailesh2302/aether/tree/main/apps/api/src/routes): `apps/api/src/routes`
- [Processing dispatch](https://github.com/shailesh2302/aether/blob/main/apps/api/src/services/processing.service.ts): `apps/api/src/services/processing.service.ts`
- [Job queue](https://github.com/shailesh2302/aether/blob/main/apps/api/src/services/queue.service.ts): `apps/api/src/services/queue.service.ts`

### AI processing

- [AI endpoints](https://github.com/shailesh2302/aether/tree/main/apps/ai-service/app/api/routes): `apps/ai-service/app/api/routes`
- [Ingestion pipeline](https://github.com/shailesh2302/aether/blob/main/apps/ai-service/app/services/pipeline.py): `apps/ai-service/app/services/pipeline.py`
- [Document extraction](https://github.com/shailesh2302/aether/blob/main/apps/ai-service/app/services/document_service.py): `apps/ai-service/app/services/document_service.py`
- [Audio transcription](https://github.com/shailesh2302/aether/blob/main/apps/ai-service/app/services/whisper_service.py): `apps/ai-service/app/services/whisper_service.py`
- [Embedding generation](https://github.com/shailesh2302/aether/blob/main/apps/ai-service/app/services/embedding_service.py): `apps/ai-service/app/services/embedding_service.py`
- [RAG and LLM](https://github.com/shailesh2302/aether/blob/main/apps/ai-service/app/services/rag_service.py): `apps/ai-service/app/services/rag_service.py`

### Video worker

- [Video job worker](https://github.com/shailesh2302/aether/blob/main/apps/rust-worker/src/workers/video_worker.rs): `apps/rust-worker/src/workers/video_worker.rs`
- [Clip worker](https://github.com/shailesh2302/aether/blob/main/apps/rust-worker/src/workers/clip_worker.rs): `apps/rust-worker/src/workers/clip_worker.rs`
- [Media operations](https://github.com/shailesh2302/aether/blob/main/apps/rust-worker/src/ffmpeg/mod.rs): `apps/rust-worker/src/ffmpeg/mod.rs`

### Data and services

- [Vector operations](https://github.com/shailesh2302/aether/blob/main/apps/api/src/services/vector.service.ts): `apps/api/src/services/vector.service.ts`
- [PostgreSQL](https://github.com/shailesh2302/aether/blob/main/apps/api/src/config/db.ts): `apps/api/src/config/db.ts`
- [Redis](https://github.com/shailesh2302/aether/blob/main/apps/rust-worker/src/queue/redis_client.rs): `apps/rust-worker/src/queue/redis_client.rs`
- **Qdrant**

### Other components

- **User**
- **LLM and embedding provider**

## Connections

- User → Web app: uses (evidence: `README.md`)
- Web app → REST API: requests (evidence: `README.md`)
- Web app → Workspace features: renders
- REST API → Authentication: registers routes (evidence: `apps/api/src/server.ts`)
- Auth middleware → Authentication: verifies tokens (evidence: `apps/api/src/middleware/auth.ts`)
- REST API → File management: registers routes (evidence: `apps/api/src/server.ts`)
- REST API → Chat and search: registers routes (evidence: `apps/api/src/server.ts`)
- REST API → Media and collaboration routes: registers routes (evidence: `apps/api/src/server.ts`)
- File management → Processing dispatch: dispatches processing (evidence: `apps/api/src/routes/file.routes.ts`)
- File management → Job queue: enqueues jobs (evidence: `apps/api/src/routes/file.routes.ts`)
- File management → Vector operations: reads vectors (evidence: `apps/api/src/routes/file.routes.ts`)
- Chat and search → Vector operations: searches vectors (evidence: `apps/api/src/routes/chat.routes.ts`)
- Chat and search → PostgreSQL: reads and writes (evidence: `apps/api/src/routes/chat.routes.ts`)
- Ingestion pipeline → Document extraction: extracts text (evidence: `apps/ai-service/app/services/pipeline.py`)
- Ingestion pipeline → Audio transcription: transcribes media (evidence: `apps/ai-service/app/services/pipeline.py`)
- Ingestion pipeline → Embedding generation: embeds chunks (evidence: `apps/ai-service/app/services/pipeline.py`)
- Ingestion pipeline → Vector operations: indexes vectors (evidence: `apps/ai-service/app/services/pipeline.py`)
- AI endpoints → Ingestion pipeline: starts ingestion
- RAG and LLM → Embedding generation: embeds queries (evidence: `apps/ai-service/app/services/rag_service.py`)
- RAG and LLM → Vector operations: retrieves matches (evidence: `apps/ai-service/app/services/rag_service.py`)
- Embedding generation → LLM and embedding provider: requests embeddings (evidence: `apps/ai-service/app/services/embedding_service.py`)
- Vector operations → Qdrant: stores vectors (evidence: `README.md`)
- Video job worker → Redis: consumes jobs
- Clip worker → Media operations: creates clips (evidence: `apps/rust-worker/src/workers/clip_worker.rs`)
- Video job worker → Media operations: processes media (evidence: `apps/rust-worker/src/workers/video_worker.rs`)
- Job queue → Redis: shares job queue
- Chat and search → AI endpoints: calls AI service
