# dodji1/julia architecture

> Architecture diagram of the GitHub repository dodji1/julia, 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/dodji1/julia
- Repository: https://github.com/dodji1/julia

## Overview

Vitalia is an early-stage, source-grounded legal research assistant, initially focused on Benin tax law. The README documents a planned question-to-cited-answer workflow and corpus ingestion architecture, but the file tree contains no backend or frontend source implementing them; those components are shown as documented plans with null paths. The current repository evidence is limited to the README, the corpus manifest, and an HTML file whose role is not established here.

Main entry points: [`data/metadata/corpus_manifest.yaml`](https://github.com/dodji1/julia/blob/main/data/metadata/corpus_manifest.yaml) (Corpus manifest), [`data/raw`](https://github.com/dodji1/julia/tree/main/data/raw) (Legal documents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_research["Legal research"]
  node_frontend["Frontend"]
  node_api["FastAPI"]
end

subgraph group_rag["RAG workflow"]
  node_orchestrator["RAG orchestrator"]
  node_analyzer["Query analyzer"]
  node_retriever["Retriever"]
  node_reranker["Reranker"]
  node_context["Context builder"]
  node_llm["LLM provider"]
  node_deepseek["DeepSeek"]
  node_verifier["Citation verifier"]
end

subgraph group_ingest["Corpus ingestion"]
  node_embedder["Embedder"]
  node_extraction["Extraction and OCR"]
  node_article_parser["Article parser"]
end

subgraph group_data["Corpus and storage"]
  node_manifest["Corpus manifest"]
  node_passage_store[("Passage store")]
  node_legal_sources["Legal documents"]
end

node_researcher(("Researcher"))

node_researcher -->|"asks question"| node_frontend
node_frontend -->|"sends query"| node_api
node_api -->|"forwards query"| node_orchestrator
node_orchestrator -->|"analyzes query"| node_analyzer
node_orchestrator -->|"retrieves passages"| node_retriever
node_orchestrator -->|"reranks passages"| node_reranker
node_orchestrator -->|"builds context"| node_context
node_orchestrator -->|"requests answer"| node_llm
node_llm -->|"calls provider"| node_deepseek
node_orchestrator -->|"verifies citations"| node_verifier
node_retriever -->|"searches passages"| node_passage_store
node_verifier -->|"reloads excerpts"| node_passage_store
node_legal_sources -->|"provides documents"| node_extraction
node_manifest -->|"describes corpus"| node_extraction
node_extraction -->|"extracts text"| node_article_parser
node_article_parser -.->|"provides passages"| node_embedder
node_embedder -->|"stores embeddings"| node_passage_store

click node_manifest "https://github.com/dodji1/julia/blob/main/data/metadata/corpus_manifest.yaml"
click node_legal_sources "https://github.com/dodji1/julia/tree/main/data/raw"

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_frontend,node_api toneBlue
class node_orchestrator,node_analyzer,node_retriever,node_reranker,node_context,node_llm,node_deepseek,node_verifier toneAmber
class node_embedder,node_extraction,node_article_parser toneMint
class node_manifest,node_passage_store,node_legal_sources toneRose
class node_researcher toneIndigo
```

## Components

### Legal research

- **Frontend**
- **FastAPI**

### RAG workflow

- **RAG orchestrator**
- **Query analyzer**
- **Retriever**
- **Reranker**
- **Context builder**
- **LLM provider**
- **DeepSeek**
- **Citation verifier**

### Corpus ingestion

- **Embedder**
- **Extraction and OCR**
- **Article parser**

### Corpus and storage

- [Corpus manifest](https://github.com/dodji1/julia/blob/main/data/metadata/corpus_manifest.yaml): `data/metadata/corpus_manifest.yaml`
- **Passage store**
- [Legal documents](https://github.com/dodji1/julia/tree/main/data/raw): `data/raw`

### Other components

- **Researcher**

## Connections

- Researcher → Frontend: asks question (evidence: `README.md`)
- Frontend → FastAPI: sends query (evidence: `README.md`)
- FastAPI → RAG orchestrator: forwards query (evidence: `README.md`)
- RAG orchestrator → Query analyzer: analyzes query (evidence: `README.md`)
- RAG orchestrator → Retriever: retrieves passages (evidence: `README.md`)
- RAG orchestrator → Reranker: reranks passages (evidence: `README.md`)
- RAG orchestrator → Context builder: builds context (evidence: `README.md`)
- RAG orchestrator → LLM provider: requests answer (evidence: `README.md`)
- LLM provider → DeepSeek: calls provider (evidence: `README.md`)
- RAG orchestrator → Citation verifier: verifies citations (evidence: `README.md`)
- Retriever → Passage store: searches passages (evidence: `README.md`)
- Citation verifier → Passage store: reloads excerpts (evidence: `README.md`)
- Legal documents → Extraction and OCR: provides documents (evidence: `README.md`)
- Corpus manifest → Extraction and OCR: describes corpus (evidence: `README.md`)
- Extraction and OCR → Article parser: extracts text (evidence: `README.md`)
- Article parser → Embedder: provides passages
- Embedder → Passage store: stores embeddings (evidence: `README.md`)
