# antonio9966/antonio-ia-generador-de-archivos architecture

> Architecture diagram of the GitHub repository antonio9966/antonio-ia-generador-de-archivos, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/antonio9966/antonio-ia-generador-de-archivos
- Repository: https://github.com/antonio9966/antonio-ia-generador-de-archivos

## Overview

Antonio IA is a Flask application for scientific literature review. A user searches a topic, reviews bibliographic results, selects articles for structured extraction, then generates comparison and synthesis outputs or exports them. The frontend’s requests and the comparison route are visible in the excerpts; search providers, PDF processing, and the remaining service links are supported by sampled imports or documented module responsibilities, but some exact runtime call paths were not shown. Dashed edges mark those unverified links.

Main entry points: [`app.py`](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/app.py) (API and orchestration), [`services/groq_service.py`](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/groq_service.py) (Groq client), [`static/js/app.js`](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/static/js/app.js) (Review interface), [`services/extraction_service.py`](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/extraction_service.py) (Structured extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_frontend["Review interface<br/>[app.js]"]
  node_flask["API and orchestration<br/>[app.py]"]
end

subgraph group_discovery["Literature discovery"]
  node_search["Literature search<br/>[app.py]"]
  node_openalex["OpenAlex"]
  node_crossref["Crossref"]
end

subgraph group_analysis["Scientific analysis"]
  node_groq["Groq client<br/>[groq_service.py]"]
  node_extract["Structured extraction"]
  node_pdf["PDF processing<br/>[pdf_service.py]"]
  node_compare["Comparative matrix"]
  node_synthesis["Literature synthesis"]
end

subgraph group_outputs["Exports and documents"]
  node_documents["Document generation"]
  node_download["Export downloads<br/>[app.py]"]
end

node_user(("Researcher"))
node_groq_api["Groq API"]
node_pdf_source["PDF sources"]

node_user -->|"uses"| node_frontend
node_frontend -->|"requests API"| node_flask
node_flask -->|"routes search"| node_search
node_search -->|"queries"| node_openalex
node_search -->|"queries"| node_crossref
node_flask -.->|"dispatches extraction"| node_extract
node_extract -.->|"processes documents"| node_pdf
node_pdf -->|"downloads PDFs"| node_pdf_source
node_extract -->|"requests structured analysis"| node_groq
node_flask -->|"expands queries"| node_groq
node_groq -->|"completes prompts"| node_groq_api
node_flask -->|"generates comparison"| node_compare
node_compare -->|"requests analysis"| node_groq
node_flask -.->|"generates synthesis"| node_synthesis
node_synthesis -->|"requests analysis"| node_groq
node_flask -.->|"generates documents"| node_documents
node_flask -->|"exports results"| node_download
node_frontend -->|"requests export"| node_download

click node_frontend "https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/static/js/app.js"
click node_flask "https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/app.py"
click node_search "https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/app.py"
click node_groq "https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/groq_service.py"
click node_extract "https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/extraction_service.py"
click node_pdf "https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/pdf_service.py"
click node_compare "https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/scientific_analysis.py"
click node_synthesis "https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/scientific_analysis.py"
click node_documents "https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/document_service.py"
click node_download "https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/app.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_frontend,node_flask toneBlue
class node_search,node_openalex,node_crossref toneAmber
class node_groq,node_extract,node_pdf,node_compare,node_synthesis,node_groq_api toneMint
class node_documents,node_download toneRose
class node_user,node_pdf_source toneIndigo
```

## Components

### Web interface

- [Review interface](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/static/js/app.js): `static/js/app.js`
- [API and orchestration](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/app.py): `app.py`

### Literature discovery

- [Literature search](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/app.py): `app.py`
- **OpenAlex**
- **Crossref**

### Scientific analysis

- [Groq client](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/groq_service.py): `services/groq_service.py`
- [Structured extraction](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/extraction_service.py): `services/extraction_service.py`
- [PDF processing](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/pdf_service.py): `services/pdf_service.py`
- [Comparative matrix](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/scientific_analysis.py): `services/scientific_analysis.py`
- [Literature synthesis](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/scientific_analysis.py): `services/scientific_analysis.py`

### Exports and documents

- [Document generation](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/services/document_service.py): `services/document_service.py`
- [Export downloads](https://github.com/antonio9966/antonio-ia-generador-de-archivos/blob/main/app.py): `app.py`

### Other components

- **Researcher**
- **Groq API**
- **PDF sources**

## Connections

- Researcher → Review interface: uses (evidence: `static/js/app.js`)
- Review interface → API and orchestration: requests API (evidence: `static/js/app.js`)
- API and orchestration → Literature search: routes search (evidence: `app.py`)
- Literature search → OpenAlex: queries (evidence: `app.py`)
- Literature search → Crossref: queries (evidence: `app.py`)
- API and orchestration → Structured extraction: dispatches extraction (evidence: `app.py`)
- Structured extraction → PDF processing: processes documents (evidence: `services/extraction_service.py`)
- PDF processing → PDF sources: downloads PDFs (evidence: `services/pdf_service.py`)
- Structured extraction → Groq client: requests structured analysis (evidence: `services/extraction_service.py`)
- API and orchestration → Groq client: expands queries (evidence: `app.py`)
- Groq client → Groq API: completes prompts (evidence: `services/groq_service.py`)
- API and orchestration → Comparative matrix: generates comparison (evidence: `app.py`)
- Comparative matrix → Groq client: requests analysis (evidence: `services/scientific_analysis.py`)
- API and orchestration → Literature synthesis: generates synthesis (evidence: `app.py`)
- Literature synthesis → Groq client: requests analysis (evidence: `services/scientific_analysis.py`)
- API and orchestration → Document generation: generates documents (evidence: `app.py`)
- API and orchestration → Export downloads: exports results (evidence: `app.py`)
- Review interface → Export downloads: requests export (evidence: `static/js/app.js`)
