# lekhal-kenza3/cosider-ai architecture

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

- Interactive diagram: https://gitdiagram.com/lekhal-kenza3/cosider-ai
- Repository: https://github.com/lekhal-kenza3/cosider-ai

## Overview

COSIDER AI is currently a scaffold for a French-language intelligent-document assistant, not a working document-analysis product. The visible workflow is navigating the Vue interface and uploading a PDF through the backend endpoint; the chat and analysis views are demonstrations, and document processing, AI responses, and database-backed behavior are not implemented in the inspected evidence. The README documents a Vite `/api` proxy to FastAPI. Backend configuration includes future AI and storage settings, but their runtime integrations are not shown.

Main entry points: [`frontend/src/router/index.js`](https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/router/index.js) (Page routing), [`backend/app/main.py`](https://github.com/lekhal-kenza3/cosider-ai/blob/main/backend/app/main.py) (API application), [`backend/app/api/routes/documents.py`](https://github.com/lekhal-kenza3/cosider-ai/blob/main/backend/app/api/routes/documents.py) (PDF upload endpoint), [`backend/app/api/router.py`](https://github.com/lekhal-kenza3/cosider-ai/blob/main/backend/app/api/router.py) (API router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Vue application"]
  node_app["Application shell<br/>[App.vue]"]
  node_layout["Navigation layout<br/>[MainLayout.vue]"]
  node_routes["Page routing<br/>[index.js]"]
  node_dashboard["Dashboard<br/>[DashboardView.vue]"]
  node_documents["Documents page<br/>[DocumentsView.vue]"]
  node_chat["Demo assistant<br/>[ChatView.vue]"]
  node_analysis["Demo analysis<br/>[AnalysisView.vue]"]
  node_history["History page<br/>[HistoryView.vue]"]
  node_warehouse["Warehouse page<br/>[WarehouseView.vue]"]
  node_settings["Local settings<br/>[SettingsView.vue]"]
  node_frontend_api["API client<br/>[api.js]"]
end

subgraph group_backend["FastAPI backend"]
  node_api["API application<br/>[main.py]"]
  node_config["Runtime configuration<br/>[config.py]"]
  node_router["API router<br/>[router.py]"]
  node_health["Health endpoint<br/>[health.py]"]
  node_upload["PDF upload endpoint<br/>[documents.py]"]
  node_pdf_store[("Uploaded PDFs")]
end

subgraph group_future["Planned capabilities"]
  node_processing["Document processing"]
  node_ai["AI and embeddings"]
  node_vectorstore[("Vector storage")]
  node_db[("Database layer")]
end

node_person(("COSIDER user"))
node_ollama["Ollama service"]
node_postgres[("PostgreSQL")]

node_person -->|"uses"| node_app
node_app -->|"renders"| node_layout
node_layout -->|"displays pages"| node_routes
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_documents
node_routes -->|"routes to"| node_chat
node_routes -->|"routes to"| node_analysis
node_routes -->|"routes to"| node_history
node_routes -->|"routes to"| node_warehouse
node_routes -->|"routes to"| node_settings
node_person -->|"uploads PDF"| node_upload
node_api -->|"loads settings"| node_config
node_api -->|"mounts"| node_router
node_router -->|"registers"| node_health
node_router -->|"registers"| node_upload
node_upload -->|"writes PDF"| node_pdf_store
node_person -->|"checks health"| node_api
node_frontend_api -->|"proxy targets"| node_api
node_upload -.->|"future handoff"| node_processing
node_processing -.->|"future extraction"| node_ai
node_ai -.->|"future indexing"| node_vectorstore
node_ai -.->|"configured integration"| node_ollama
node_processing -.->|"future persistence"| node_db
node_db -.->|"configured database"| node_postgres

click node_app "https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/App.vue"
click node_layout "https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/layouts/MainLayout.vue"
click node_routes "https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/router/index.js"
click node_dashboard "https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/DashboardView.vue"
click node_documents "https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/DocumentsView.vue"
click node_chat "https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/ChatView.vue"
click node_analysis "https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/AnalysisView.vue"
click node_history "https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/HistoryView.vue"
click node_warehouse "https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/WarehouseView.vue"
click node_settings "https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/SettingsView.vue"
click node_frontend_api "https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/services/api.js"
click node_api "https://github.com/lekhal-kenza3/cosider-ai/blob/main/backend/app/main.py"
click node_config "https://github.com/lekhal-kenza3/cosider-ai/blob/main/backend/app/core/config.py"
click node_router "https://github.com/lekhal-kenza3/cosider-ai/blob/main/backend/app/api/router.py"
click node_health "https://github.com/lekhal-kenza3/cosider-ai/blob/main/backend/app/api/routes/health.py"
click node_upload "https://github.com/lekhal-kenza3/cosider-ai/blob/main/backend/app/api/routes/documents.py"
click node_pdf_store "https://github.com/lekhal-kenza3/cosider-ai/tree/main/backend/storage/documents"
click node_processing "https://github.com/lekhal-kenza3/cosider-ai/tree/main/backend/app/processing"
click node_ai "https://github.com/lekhal-kenza3/cosider-ai/tree/main/backend/app/ai"
click node_vectorstore "https://github.com/lekhal-kenza3/cosider-ai/tree/main/backend/app/vectorstore"
click node_db "https://github.com/lekhal-kenza3/cosider-ai/tree/main/backend/app/db"

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_routes,node_dashboard,node_documents,node_chat,node_analysis,node_history,node_warehouse,node_settings,node_frontend_api,node_person toneBlue
class node_api,node_config,node_router,node_health,node_upload,node_pdf_store,node_postgres toneAmber
class node_processing,node_ai,node_vectorstore,node_db toneMint
class node_ollama toneIndigo
```

## Components

### Vue application

- [Application shell](https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Navigation layout](https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/layouts/MainLayout.vue): `frontend/src/layouts/MainLayout.vue`
- [Page routing](https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/router/index.js): `frontend/src/router/index.js`
- [Dashboard](https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/DashboardView.vue): `frontend/src/views/DashboardView.vue`
- [Documents page](https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/DocumentsView.vue): `frontend/src/views/DocumentsView.vue`
- [Demo assistant](https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/ChatView.vue): `frontend/src/views/ChatView.vue`
- [Demo analysis](https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/AnalysisView.vue): `frontend/src/views/AnalysisView.vue`
- [History page](https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/HistoryView.vue): `frontend/src/views/HistoryView.vue`
- [Warehouse page](https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/WarehouseView.vue): `frontend/src/views/WarehouseView.vue`
- [Local settings](https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/views/SettingsView.vue): `frontend/src/views/SettingsView.vue`
- [API client](https://github.com/lekhal-kenza3/cosider-ai/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### FastAPI backend

- [API application](https://github.com/lekhal-kenza3/cosider-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Runtime configuration](https://github.com/lekhal-kenza3/cosider-ai/blob/main/backend/app/core/config.py): `backend/app/core/config.py`
- [API router](https://github.com/lekhal-kenza3/cosider-ai/blob/main/backend/app/api/router.py): `backend/app/api/router.py`
- [Health endpoint](https://github.com/lekhal-kenza3/cosider-ai/blob/main/backend/app/api/routes/health.py): `backend/app/api/routes/health.py`
- [PDF upload endpoint](https://github.com/lekhal-kenza3/cosider-ai/blob/main/backend/app/api/routes/documents.py): `backend/app/api/routes/documents.py`
- [Uploaded PDFs](https://github.com/lekhal-kenza3/cosider-ai/tree/main/backend/storage/documents): `backend/storage/documents`

### Planned capabilities

- [Document processing](https://github.com/lekhal-kenza3/cosider-ai/tree/main/backend/app/processing): `backend/app/processing`
- [AI and embeddings](https://github.com/lekhal-kenza3/cosider-ai/tree/main/backend/app/ai): `backend/app/ai`
- [Vector storage](https://github.com/lekhal-kenza3/cosider-ai/tree/main/backend/app/vectorstore): `backend/app/vectorstore`
- [Database layer](https://github.com/lekhal-kenza3/cosider-ai/tree/main/backend/app/db): `backend/app/db`

### Other components

- **COSIDER user**
- **Ollama service**
- **PostgreSQL**

## Connections

- COSIDER user → Application shell: uses (evidence: `README.md`)
- Application shell → Navigation layout: renders (evidence: `frontend/src/App.vue`)
- Navigation layout → Page routing: displays pages (evidence: `frontend/src/layouts/MainLayout.vue`)
- Page routing → Dashboard: routes to (evidence: `frontend/src/router/index.js`)
- Page routing → Documents page: routes to (evidence: `frontend/src/router/index.js`)
- Page routing → Demo assistant: routes to (evidence: `frontend/src/router/index.js`)
- Page routing → Demo analysis: routes to (evidence: `frontend/src/router/index.js`)
- Page routing → History page: routes to (evidence: `frontend/src/router/index.js`)
- Page routing → Warehouse page: routes to (evidence: `frontend/src/router/index.js`)
- Page routing → Local settings: routes to (evidence: `frontend/src/router/index.js`)
- COSIDER user → PDF upload endpoint: uploads PDF (evidence: `backend/app/api/routes/documents.py`)
- API application → Runtime configuration: loads settings (evidence: `backend/app/main.py`)
- API application → API router: mounts (evidence: `backend/app/main.py`)
- API router → Health endpoint: registers (evidence: `backend/app/api/router.py`)
- API router → PDF upload endpoint: registers (evidence: `backend/app/api/router.py`)
- PDF upload endpoint → Uploaded PDFs: writes PDF (evidence: `backend/app/api/routes/documents.py`)
- COSIDER user → API application: checks health (evidence: `README.md`)
- API client → API application: proxy targets (evidence: `README.md`)
- PDF upload endpoint → Document processing: future handoff
- Document processing → AI and embeddings: future extraction
- AI and embeddings → Vector storage: future indexing
- AI and embeddings → Ollama service: configured integration
- Document processing → Database layer: future persistence
- Database layer → PostgreSQL: configured database
