# evodmik/robingraph architecture

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

- Interactive diagram: https://gitdiagram.com/evodmik/robingraph
- Repository: https://github.com/evodmik/robingraph

## Overview

RobinGraph is a bird-knowledge exploration service: a user asks a Korean natural-language question, the API routes it to an intent-specific lookup, retrieval resolves bird data and evidence, and the service returns sourced answers. The product also offers species cards, taxonomy, subspecies, ecological relations, observations, and literature search. Data enters through validated ingestion and is served from Neo4j, with PostgreSQL holding ingestion and activation state. The graph combines README-described capabilities with sampled imports and calls; unsampled subsystem links are omitted where their ownership could not be verified.

Main entry points: [`src/robingraph/api/app.py`](https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/app.py) (HTTP application), [`src/robingraph/api/ingest_router.py`](https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/ingest_router.py) (Ingest control API), [`src/robingraph/tracing.py`](https://github.com/evodmik/robingraph/blob/main/src/robingraph/tracing.py) (MLflow tracing), [`scripts/generate_n8n_reference_ingest.py`](https://github.com/evodmik/robingraph/blob/main/scripts/generate_n8n_reference_ingest.py) (Reference ingest workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Question and presentation"]
  node_chat_ui["Chat and cards<br/>[chat.js]"]
  node_birds_ui["Bird card views<br/>[birds.js]"]
end

subgraph group_answering["Routing and answering"]
  node_api["HTTP application<br/>[app.py]"]
  node_jev["Jev intent router<br/>[jev_router.py]"]
  node_semantic["Semantic router<br/>[semantic_router.py]"]
  node_embeddings["Embedding client<br/>[__init__.py]"]
  node_generation["Answer generation<br/>[generation.py]"]
  node_question_service["Question service<br/>[slice.py]"]
end

subgraph group_knowledge["Bird knowledge retrieval"]
  node_repository["Repository interface<br/>[repository.py]"]
  node_species_profile["Species profiles<br/>[species_profile.py]"]
  node_name_relations["Name relations<br/>[name_relations.py]"]
  node_taxonomy["Taxonomy lineage"]
  node_hybrid["Hybrid literature search<br/>[hybrid.py]"]
  node_neo4j_hybrid["Graph hybrid search<br/>[neo4j_hybrid.py]"]
  node_fixture["Fixture corpus<br/>[fixture.py]"]
  node_fixture_repo["Fixture repository"]
  node_neo4j_repo["Neo4j repository"]
end

subgraph group_data["Ingestion and storage"]
  node_neo4j[("Neo4j graph")]
  node_ingest_api["Ingest control API<br/>[ingest_router.py]"]
  node_ingest_store["Ingest state store<br/>[store.py]"]
  node_postgres[("PostgreSQL state")]
  node_validation["Record validation<br/>[validation.py]"]
  node_ingest_workflows["Reference ingest workflows"]
end

subgraph group_operations["Tracing and policy"]
  node_policy["Data policy<br/>[policy.py]"]
  node_tracing["MLflow tracing<br/>[tracing.py]"]
end

node_bird_user(("Bird enthusiast"))
node_mlflow(("MLflow service"))

node_bird_user -->|"asks"| node_chat_ui
node_chat_ui -->|"submits query"| node_api
node_api -->|"classifies intent"| node_jev
node_api -->|"routes intent"| node_semantic
node_semantic -->|"embeds query"| node_embeddings
node_api -->|"composes answers"| node_question_service
node_question_service -->|"queries corpus"| node_repository
node_api -->|"loads profiles"| node_species_profile
node_api -->|"resolves names"| node_name_relations
node_api -->|"loads lineage"| node_taxonomy
node_api -->|"generates answer"| node_generation
node_generation -->|"retrieves evidence"| node_hybrid
node_neo4j_hybrid -->|"implements search"| node_hybrid
node_neo4j_repo -.->|"reads graph"| node_neo4j
node_api -->|"uses fixture mode"| node_fixture_repo
node_fixture_repo -->|"reads corpus"| node_fixture
node_ingest_api -->|"updates runs"| node_ingest_store
node_ingest_store -->|"persists state"| node_postgres
node_ingest_api -.->|"validates records"| node_validation
node_ingest_workflows -.->|"loads sources"| node_ingest_api
node_ingest_workflows -.->|"loads reference data"| node_neo4j
node_api -->|"records spans"| node_tracing
node_jev -->|"records spans"| node_tracing
node_tracing -->|"exports traces"| node_mlflow
node_fixture -->|"filters records"| node_policy
node_api -.->|"serves card data"| node_birds_ui

click node_chat_ui "https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/static/chat.js"
click node_birds_ui "https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/static/birds.js"
click node_api "https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/app.py"
click node_jev "https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/jev_router.py"
click node_semantic "https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/semantic_router.py"
click node_embeddings "https://github.com/evodmik/robingraph/blob/main/src/robingraph/embeddings/__init__.py"
click node_generation "https://github.com/evodmik/robingraph/blob/main/src/robingraph/generation.py"
click node_question_service "https://github.com/evodmik/robingraph/blob/main/src/robingraph/slice.py"
click node_repository "https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/repository.py"
click node_species_profile "https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/species_profile.py"
click node_name_relations "https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/name_relations.py"
click node_taxonomy "https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/taxonomy_lineage.py"
click node_hybrid "https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/hybrid.py"
click node_neo4j_hybrid "https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/neo4j_hybrid.py"
click node_fixture "https://github.com/evodmik/robingraph/blob/main/src/robingraph/fixture.py"
click node_fixture_repo "https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/fixture_repository.py"
click node_neo4j_repo "https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/neo4j_repository.py"
click node_ingest_api "https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/ingest_router.py"
click node_ingest_store "https://github.com/evodmik/robingraph/blob/main/src/robingraph/ingest/store.py"
click node_validation "https://github.com/evodmik/robingraph/blob/main/src/robingraph/ingest/validation.py"
click node_ingest_workflows "https://github.com/evodmik/robingraph/blob/main/scripts/generate_n8n_reference_ingest.py"
click node_policy "https://github.com/evodmik/robingraph/blob/main/src/robingraph/policy.py"
click node_tracing "https://github.com/evodmik/robingraph/blob/main/src/robingraph/tracing.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_chat_ui,node_birds_ui toneBlue
class node_api,node_jev,node_semantic,node_embeddings,node_generation,node_question_service toneAmber
class node_repository,node_species_profile,node_name_relations,node_taxonomy,node_hybrid,node_neo4j_hybrid,node_fixture,node_fixture_repo,node_neo4j_repo toneMint
class node_neo4j,node_ingest_api,node_ingest_store,node_postgres,node_validation,node_ingest_workflows toneRose
class node_policy,node_tracing,node_bird_user,node_mlflow toneIndigo
```

## Components

### Question and presentation

- [Chat and cards](https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/static/chat.js): `src/robingraph/api/static/chat.js`
- [Bird card views](https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/static/birds.js): `src/robingraph/api/static/birds.js`

### Routing and answering

- [HTTP application](https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/app.py): `src/robingraph/api/app.py`
- [Jev intent router](https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/jev_router.py): `src/robingraph/api/jev_router.py`
- [Semantic router](https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/semantic_router.py): `src/robingraph/api/semantic_router.py`
- [Embedding client](https://github.com/evodmik/robingraph/blob/main/src/robingraph/embeddings/__init__.py): `src/robingraph/embeddings/__init__.py`
- [Answer generation](https://github.com/evodmik/robingraph/blob/main/src/robingraph/generation.py): `src/robingraph/generation.py`
- [Question service](https://github.com/evodmik/robingraph/blob/main/src/robingraph/slice.py): `src/robingraph/slice.py`

### Bird knowledge retrieval

- [Repository interface](https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/repository.py): `src/robingraph/retrieval/repository.py`
- [Species profiles](https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/species_profile.py): `src/robingraph/retrieval/species_profile.py`
- [Name relations](https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/name_relations.py): `src/robingraph/retrieval/name_relations.py`
- [Taxonomy lineage](https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/taxonomy_lineage.py): `src/robingraph/retrieval/taxonomy_lineage.py`
- [Hybrid literature search](https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/hybrid.py): `src/robingraph/retrieval/hybrid.py`
- [Graph hybrid search](https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/neo4j_hybrid.py): `src/robingraph/retrieval/neo4j_hybrid.py`
- [Fixture corpus](https://github.com/evodmik/robingraph/blob/main/src/robingraph/fixture.py): `src/robingraph/fixture.py`
- [Fixture repository](https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/fixture_repository.py): `src/robingraph/retrieval/fixture_repository.py`
- [Neo4j repository](https://github.com/evodmik/robingraph/blob/main/src/robingraph/retrieval/neo4j_repository.py): `src/robingraph/retrieval/neo4j_repository.py`

### Ingestion and storage

- **Neo4j graph**
- [Ingest control API](https://github.com/evodmik/robingraph/blob/main/src/robingraph/api/ingest_router.py): `src/robingraph/api/ingest_router.py`
- [Ingest state store](https://github.com/evodmik/robingraph/blob/main/src/robingraph/ingest/store.py): `src/robingraph/ingest/store.py`
- **PostgreSQL state**
- [Record validation](https://github.com/evodmik/robingraph/blob/main/src/robingraph/ingest/validation.py): `src/robingraph/ingest/validation.py`
- [Reference ingest workflows](https://github.com/evodmik/robingraph/blob/main/scripts/generate_n8n_reference_ingest.py): `scripts/generate_n8n_reference_ingest.py`

### Tracing and policy

- [Data policy](https://github.com/evodmik/robingraph/blob/main/src/robingraph/policy.py): `src/robingraph/policy.py`
- [MLflow tracing](https://github.com/evodmik/robingraph/blob/main/src/robingraph/tracing.py): `src/robingraph/tracing.py`

### Other components

- **Bird enthusiast**
- **MLflow service**

## Connections

- Bird enthusiast → Chat and cards: asks (evidence: `README.md`)
- Chat and cards → HTTP application: submits query (evidence: `README.md`)
- HTTP application → Jev intent router: classifies intent (evidence: `src/robingraph/api/app.py`)
- HTTP application → Semantic router: routes intent (evidence: `src/robingraph/api/app.py`)
- Semantic router → Embedding client: embeds query (evidence: `src/robingraph/api/semantic_router.py`)
- HTTP application → Question service: composes answers (evidence: `src/robingraph/api/app.py`)
- Question service → Repository interface: queries corpus (evidence: `src/robingraph/retrieval/repository.py`)
- HTTP application → Species profiles: loads profiles (evidence: `src/robingraph/api/app.py`)
- HTTP application → Name relations: resolves names (evidence: `src/robingraph/api/app.py`)
- HTTP application → Taxonomy lineage: loads lineage (evidence: `src/robingraph/api/app.py`)
- HTTP application → Answer generation: generates answer (evidence: `src/robingraph/api/app.py`)
- Answer generation → Hybrid literature search: retrieves evidence (evidence: `src/robingraph/generation.py`)
- Graph hybrid search → Hybrid literature search: implements search (evidence: `src/robingraph/retrieval/neo4j_hybrid.py`)
- Neo4j repository → Neo4j graph: reads graph (evidence: `README.md`)
- HTTP application → Fixture repository: uses fixture mode (evidence: `src/robingraph/api/app.py`)
- Fixture repository → Fixture corpus: reads corpus (evidence: `src/robingraph/retrieval/fixture_repository.py`)
- Ingest control API → Ingest state store: updates runs (evidence: `src/robingraph/api/ingest_router.py`)
- Ingest state store → PostgreSQL state: persists state (evidence: `README.md`)
- Ingest control API → Record validation: validates records
- Reference ingest workflows → Ingest control API: loads sources
- Reference ingest workflows → Neo4j graph: loads reference data (evidence: `README.md`)
- HTTP application → MLflow tracing: records spans (evidence: `src/robingraph/api/app.py`)
- Jev intent router → MLflow tracing: records spans (evidence: `src/robingraph/api/jev_router.py`)
- MLflow tracing → MLflow service: exports traces (evidence: `src/robingraph/tracing.py`)
- Fixture corpus → Data policy: filters records (evidence: `src/robingraph/fixture.py`)
- HTTP application → Bird card views: serves card data (evidence: `README.md`)
