# tanushree2511/cove architecture

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

- Interactive diagram: https://gitdiagram.com/tanushree2511/cove
- Repository: https://github.com/tanushree2511/cove

## Overview

Cove is a local-first photo and video manager with separate photo and video backends. The main photo workflow is import or discover photos, run background face/CLIP indexing and clustering, persist vectors and people, then browse or search from the React app. Video indexing and search are a separate API-backed pipeline; the README says the React Videos link opens a separate Streamlit screen. Some service wiring is documented rather than visible in the excerpts, so those links cite the README.

Main entry points: [`videoModules/api.py`](https://github.com/tanushree2511/cove/blob/main/videoModules/api.py) (Video API), [`cove/api/server.py`](https://github.com/tanushree2511/cove/blob/main/cove/api/server.py) (Photo API), [`frontend/src/components/features/GalleryView.jsx`](https://github.com/tanushree2511/cove/blob/main/frontend/src/components/features/GalleryView.jsx) (Photo views), [`cove/pipeline/production_pipeline.py`](https://github.com/tanushree2511/cove/blob/main/cove/pipeline/production_pipeline.py) (Photo indexing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_photo_ui["Photo interface"]
  node_react_app["React app<br/>[App.jsx]"]
  node_app_state["App state<br/>[useAppStore.js]"]
  node_photo_views["Photo views<br/>[GalleryView.jsx]"]
  node_photo_card["Photo card<br/>[PhotoCard.jsx]"]
  node_search_view["Search view<br/>[SearchView.jsx]"]
  node_photo_api_client["Photo API client<br/>[coveApi.js]"]
end

subgraph group_photo_backend["Photo services"]
  node_photo_api["Photo API<br/>[server.py]"]
  node_photo_files[("Photo library<br/>[server.py]")]
  node_index_pipeline["Photo indexing"]
  node_people["People management<br/>[person_manager.py]"]
end

subgraph group_photo_runtime["Photo analysis"]
  node_face_analysis["Face analysis<br/>[ai_engine.py]"]
  node_face_clusters["Face clustering<br/>[cluster_engine.py]"]
  node_clip_search["CLIP search<br/>[search_engine.py]"]
  node_photo_vectors[("Photo vectors<br/>[vector_storage.py]")]
  node_hardware_profile["Hardware profile<br/>[runtime.py]"]
end

subgraph group_video_backend["Video services"]
  node_video_api["Video API<br/>[api.py]"]
  node_video_processor["Video processing<br/>[video_processor.py]"]
  node_video_faces["Video face analysis<br/>[face_processor.py]"]
  node_video_embedder["Video embeddings<br/>[embedder.py]"]
  node_video_classifier["Video labels<br/>[classifier.py]"]
  node_video_taxonomy["Label taxonomy<br/>[label_taxonomy.py]"]
  node_video_transcode["Video transcoding<br/>[transcode.py]"]
  node_video_database[("Video database<br/>[database.py]")]
  node_video_vectors[("Video vectors<br/>[vector_store.py]")]
end

node_user(("Library user"))
node_video_ui["Video screen"]

node_user -->|"uses"| node_react_app
node_react_app -->|"presents"| node_photo_views
node_photo_views -.->|"reads state"| node_app_state
node_photo_views -.->|"renders"| node_photo_card
node_search_view -->|"renders"| node_photo_card
node_photo_views -.->|"requests library data"| node_photo_api_client
node_search_view -.->|"requests search"| node_photo_api_client
node_photo_api_client -.->|"calls"| node_photo_api
node_photo_api -->|"stores uploads"| node_photo_files
node_photo_api -->|"starts indexing"| node_index_pipeline
node_index_pipeline -->|"analyzes faces"| node_face_analysis
node_index_pipeline -->|"saves embeddings"| node_photo_vectors
node_photo_api -->|"encodes queries"| node_clip_search
node_photo_api -.->|"searches vectors"| node_photo_vectors
node_photo_api -->|"manages people"| node_people
node_photo_api -.->|"clusters faces"| node_face_clusters
node_hardware_profile -->|"configures runtime"| node_clip_search
node_hardware_profile -->|"tunes runtime"| node_face_analysis
node_user -->|"opens Videos"| node_video_ui
node_video_ui -.->|"uses video service"| node_video_api
node_video_api -->|"prepares uploads"| node_video_transcode
node_video_api -->|"queues processing"| node_video_processor
node_video_api -->|"registers videos"| node_video_database
node_video_api -->|"uses face analysis"| node_video_faces
node_video_api -->|"uses embeddings"| node_video_embedder
node_video_api -->|"uses classification"| node_video_classifier
node_video_classifier -->|"uses labels"| node_video_taxonomy
node_video_api -->|"uses vector search"| node_video_vectors

click node_react_app "https://github.com/tanushree2511/cove/blob/main/frontend/src/App.jsx"
click node_app_state "https://github.com/tanushree2511/cove/blob/main/frontend/src/store/useAppStore.js"
click node_photo_views "https://github.com/tanushree2511/cove/blob/main/frontend/src/components/features/GalleryView.jsx"
click node_photo_card "https://github.com/tanushree2511/cove/blob/main/frontend/src/components/features/PhotoCard.jsx"
click node_search_view "https://github.com/tanushree2511/cove/blob/main/frontend/src/components/features/SearchView.jsx"
click node_photo_api_client "https://github.com/tanushree2511/cove/blob/main/frontend/src/lib/coveApi.js"
click node_photo_api "https://github.com/tanushree2511/cove/blob/main/cove/api/server.py"
click node_photo_files "https://github.com/tanushree2511/cove/blob/main/cove/api/server.py"
click node_index_pipeline "https://github.com/tanushree2511/cove/blob/main/cove/pipeline/production_pipeline.py"
click node_people "https://github.com/tanushree2511/cove/blob/main/cove/engines/person_manager.py"
click node_face_analysis "https://github.com/tanushree2511/cove/blob/main/cove/engines/ai_engine.py"
click node_face_clusters "https://github.com/tanushree2511/cove/blob/main/cove/engines/cluster_engine.py"
click node_clip_search "https://github.com/tanushree2511/cove/blob/main/cove/engines/search_engine.py"
click node_photo_vectors "https://github.com/tanushree2511/cove/blob/main/cove/engines/vector_storage.py"
click node_hardware_profile "https://github.com/tanushree2511/cove/blob/main/cove/config/runtime.py"
click node_video_api "https://github.com/tanushree2511/cove/blob/main/videoModules/api.py"
click node_video_processor "https://github.com/tanushree2511/cove/blob/main/videoModules/core/video_processor.py"
click node_video_faces "https://github.com/tanushree2511/cove/blob/main/videoModules/core/face_processor.py"
click node_video_embedder "https://github.com/tanushree2511/cove/blob/main/videoModules/core/embedder.py"
click node_video_classifier "https://github.com/tanushree2511/cove/blob/main/videoModules/core/classifier.py"
click node_video_taxonomy "https://github.com/tanushree2511/cove/blob/main/videoModules/core/label_taxonomy.py"
click node_video_transcode "https://github.com/tanushree2511/cove/blob/main/videoModules/core/transcode.py"
click node_video_database "https://github.com/tanushree2511/cove/blob/main/videoModules/core/database.py"
click node_video_vectors "https://github.com/tanushree2511/cove/blob/main/videoModules/core/vector_store.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_react_app,node_app_state,node_photo_views,node_photo_card,node_search_view,node_photo_api_client,node_user,node_video_ui toneBlue
class node_photo_api,node_photo_files,node_index_pipeline,node_people toneAmber
class node_face_analysis,node_face_clusters,node_clip_search,node_photo_vectors,node_hardware_profile toneMint
class node_video_api,node_video_processor,node_video_faces,node_video_embedder,node_video_classifier,node_video_taxonomy,node_video_transcode,node_video_database,node_video_vectors toneRose
```

## Components

### Photo interface

- [React app](https://github.com/tanushree2511/cove/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [App state](https://github.com/tanushree2511/cove/blob/main/frontend/src/store/useAppStore.js): `frontend/src/store/useAppStore.js`
- [Photo views](https://github.com/tanushree2511/cove/blob/main/frontend/src/components/features/GalleryView.jsx): `frontend/src/components/features/GalleryView.jsx`
- [Photo card](https://github.com/tanushree2511/cove/blob/main/frontend/src/components/features/PhotoCard.jsx): `frontend/src/components/features/PhotoCard.jsx`
- [Search view](https://github.com/tanushree2511/cove/blob/main/frontend/src/components/features/SearchView.jsx): `frontend/src/components/features/SearchView.jsx`
- [Photo API client](https://github.com/tanushree2511/cove/blob/main/frontend/src/lib/coveApi.js): `frontend/src/lib/coveApi.js`

### Photo services

- [Photo API](https://github.com/tanushree2511/cove/blob/main/cove/api/server.py): `cove/api/server.py`
- [Photo library](https://github.com/tanushree2511/cove/blob/main/cove/api/server.py): `cove/api/server.py`
- [Photo indexing](https://github.com/tanushree2511/cove/blob/main/cove/pipeline/production_pipeline.py): `cove/pipeline/production_pipeline.py`
- [People management](https://github.com/tanushree2511/cove/blob/main/cove/engines/person_manager.py): `cove/engines/person_manager.py`

### Photo analysis

- [Face analysis](https://github.com/tanushree2511/cove/blob/main/cove/engines/ai_engine.py): `cove/engines/ai_engine.py`
- [Face clustering](https://github.com/tanushree2511/cove/blob/main/cove/engines/cluster_engine.py): `cove/engines/cluster_engine.py`
- [CLIP search](https://github.com/tanushree2511/cove/blob/main/cove/engines/search_engine.py): `cove/engines/search_engine.py`
- [Photo vectors](https://github.com/tanushree2511/cove/blob/main/cove/engines/vector_storage.py): `cove/engines/vector_storage.py`
- [Hardware profile](https://github.com/tanushree2511/cove/blob/main/cove/config/runtime.py): `cove/config/runtime.py`

### Video services

- [Video API](https://github.com/tanushree2511/cove/blob/main/videoModules/api.py): `videoModules/api.py`
- [Video processing](https://github.com/tanushree2511/cove/blob/main/videoModules/core/video_processor.py): `videoModules/core/video_processor.py`
- [Video face analysis](https://github.com/tanushree2511/cove/blob/main/videoModules/core/face_processor.py): `videoModules/core/face_processor.py`
- [Video embeddings](https://github.com/tanushree2511/cove/blob/main/videoModules/core/embedder.py): `videoModules/core/embedder.py`
- [Video labels](https://github.com/tanushree2511/cove/blob/main/videoModules/core/classifier.py): `videoModules/core/classifier.py`
- [Label taxonomy](https://github.com/tanushree2511/cove/blob/main/videoModules/core/label_taxonomy.py): `videoModules/core/label_taxonomy.py`
- [Video transcoding](https://github.com/tanushree2511/cove/blob/main/videoModules/core/transcode.py): `videoModules/core/transcode.py`
- [Video database](https://github.com/tanushree2511/cove/blob/main/videoModules/core/database.py): `videoModules/core/database.py`
- [Video vectors](https://github.com/tanushree2511/cove/blob/main/videoModules/core/vector_store.py): `videoModules/core/vector_store.py`

### Other components

- **Library user**
- **Video screen**

## Connections

- Library user → React app: uses (evidence: `README.md`)
- React app → Photo views: presents (evidence: `frontend/src/App.jsx`)
- Photo views → App state: reads state
- Photo views → Photo card: renders
- Search view → Photo card: renders (evidence: `frontend/src/components/features/SearchView.jsx`)
- Photo views → Photo API client: requests library data
- Search view → Photo API client: requests search
- Photo API client → Photo API: calls
- Photo API → Photo library: stores uploads (evidence: `cove/api/server.py`)
- Photo API → Photo indexing: starts indexing (evidence: `README.md`)
- Photo indexing → Face analysis: analyzes faces (evidence: `cove/pipeline/production_pipeline.py`)
- Photo indexing → Photo vectors: saves embeddings (evidence: `cove/pipeline/production_pipeline.py`)
- Photo API → CLIP search: encodes queries (evidence: `cove/api/server.py`)
- Photo API → Photo vectors: searches vectors (evidence: `cove/api/server.py`)
- Photo API → People management: manages people (evidence: `cove/api/server.py`)
- Photo API → Face clustering: clusters faces (evidence: `cove/api/server.py`)
- Hardware profile → CLIP search: configures runtime (evidence: `cove/engines/search_engine.py`)
- Hardware profile → Face analysis: tunes runtime (evidence: `cove/engines/ai_engine.py`)
- Library user → Video screen: opens Videos (evidence: `README.md`)
- Video screen → Video API: uses video service (evidence: `README.md`)
- Video API → Video transcoding: prepares uploads (evidence: `videoModules/api.py`)
- Video API → Video processing: queues processing (evidence: `videoModules/api.py`)
- Video API → Video database: registers videos (evidence: `videoModules/api.py`)
- Video API → Video face analysis: uses face analysis (evidence: `videoModules/api.py`)
- Video API → Video embeddings: uses embeddings (evidence: `videoModules/api.py`)
- Video API → Video labels: uses classification (evidence: `videoModules/api.py`)
- Video labels → Label taxonomy: uses labels (evidence: `videoModules/core/classifier.py`)
- Video API → Video vectors: uses vector search (evidence: `videoModules/api.py`)
