# ratila67/elkhetic architecture

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

- Interactive diagram: https://gitdiagram.com/ratila67/elkhetic
- Repository: https://github.com/ratila67/elkhetic

## Overview

This repository provides movie-data ingestion, Elasticsearch-backed search, and Kibana analytics. The main user workflow is a browser search form that sends title or synopsis text and optional genre, language, and year filters to the Flask endpoint; the endpoint queries Elasticsearch and returns ranked movie results. The tree and README also identify a CSV-based ingestion workflow and dashboard/analytics assets, but their runtime wiring is not shown in the sampled source, so those relationships are left unverified.

Main entry points: [`search/app.py`](https://github.com/ratila67/elkhetic/blob/dev/search/app.py) (Search interface), [`logstash/pipeline/logstash.conf`](https://github.com/ratila67/elkhetic/blob/dev/logstash/pipeline/logstash.conf) (Logstash pipeline), [`DATA`](https://github.com/ratila67/elkhetic/tree/dev/DATA) (Movies CSV), [`elasticsearch/mappings/movies_clean_mapping.json`](https://github.com/ratila67/elkhetic/blob/dev/elasticsearch/mappings/movies_clean_mapping.json) (Movie mapping)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_search["Movie Search"]
  node_search_ui["Search interface<br/>[app.py]"]
  node_search_api["Search API<br/>[app.py]"]
end

subgraph group_ingest["Data Ingestion"]
  node_dataset["Movies CSV"]
  node_logstash["Logstash pipeline<br/>[logstash.conf]"]
  node_mapping["Movie mapping"]
end

subgraph group_analytics["Analytics"]
  node_analytics_queries["Analytics queries<br/>[queries.md]"]
  node_dashboard["Kibana dashboard"]
  node_kibana_export["Kibana export<br/>[export.ndjson]"]
end

node_user(("Movie seeker"))
node_elasticsearch[("Elasticsearch")]

node_user -->|"uses"| node_search_ui
node_search_ui -->|"requests"| node_search_api
node_search_api -->|"queries"| node_elasticsearch
node_dataset -.->|"ingested by"| node_logstash
node_logstash -.->|"loads records"| node_elasticsearch
node_mapping -.->|"defines fields"| node_elasticsearch
node_analytics_queries -.->|"queries"| node_elasticsearch
node_dashboard -.->|"visualizes data"| node_elasticsearch

click node_search_ui "https://github.com/ratila67/elkhetic/blob/dev/search/app.py"
click node_search_api "https://github.com/ratila67/elkhetic/blob/dev/search/app.py"
click node_dataset "https://github.com/ratila67/elkhetic/tree/dev/DATA"
click node_logstash "https://github.com/ratila67/elkhetic/blob/dev/logstash/pipeline/logstash.conf"
click node_mapping "https://github.com/ratila67/elkhetic/blob/dev/elasticsearch/mappings/movies_clean_mapping.json"
click node_analytics_queries "https://github.com/ratila67/elkhetic/blob/dev/elasticsearch/queries/queries.md"
click node_dashboard "https://github.com/ratila67/elkhetic/blob/dev/kibana/movies_dashboard_final.ndjson"
click node_kibana_export "https://github.com/ratila67/elkhetic/blob/dev/kibana/export.ndjson"

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_search_ui,node_search_api toneBlue
class node_dataset,node_logstash,node_mapping,node_elasticsearch toneAmber
class node_analytics_queries,node_dashboard,node_kibana_export toneMint
class node_user toneIndigo
```

## Components

### Movie Search

- [Search interface](https://github.com/ratila67/elkhetic/blob/dev/search/app.py): `search/app.py`
- [Search API](https://github.com/ratila67/elkhetic/blob/dev/search/app.py): `search/app.py`

### Data Ingestion

- [Movies CSV](https://github.com/ratila67/elkhetic/tree/dev/DATA): `DATA`
- [Logstash pipeline](https://github.com/ratila67/elkhetic/blob/dev/logstash/pipeline/logstash.conf): `logstash/pipeline/logstash.conf`
- [Movie mapping](https://github.com/ratila67/elkhetic/blob/dev/elasticsearch/mappings/movies_clean_mapping.json): `elasticsearch/mappings/movies_clean_mapping.json`

### Analytics

- [Analytics queries](https://github.com/ratila67/elkhetic/blob/dev/elasticsearch/queries/queries.md): `elasticsearch/queries/queries.md`
- [Kibana dashboard](https://github.com/ratila67/elkhetic/blob/dev/kibana/movies_dashboard_final.ndjson): `kibana/movies_dashboard_final.ndjson`
- [Kibana export](https://github.com/ratila67/elkhetic/blob/dev/kibana/export.ndjson): `kibana/export.ndjson`

### Other components

- **Movie seeker**
- **Elasticsearch**

## Connections

- Movie seeker → Search interface: uses (evidence: `search/app.py`)
- Search interface → Search API: requests (evidence: `search/app.py`)
- Search API → Elasticsearch: queries (evidence: `search/app.py`)
- Movies CSV → Logstash pipeline: ingested by
- Logstash pipeline → Elasticsearch: loads records
- Movie mapping → Elasticsearch: defines fields
- Analytics queries → Elasticsearch: queries
- Kibana dashboard → Elasticsearch: visualizes data
