# antonio9966/agente-ia-3 architecture

> Architecture diagram of the GitHub repository antonio9966/agente-ia-3, 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/agente-ia-3
- Repository: https://github.com/antonio9966/agente-ia-3

## Overview

Antonio IA is a web application for finding scientific literature, extracting comparable study data, and producing editable academic matrices and exports. A user submits a filtered query in the browser; the API can expand it, searches OpenAlex and Crossref, and returns papers for selection. The user then requests AI-assisted extraction and synthesis, edits the resulting matrix, and exports Word or Excel. The README also documents citation-style formatting and Markdown/HTML copying. Evidence is limited to the supplied excerpts and README; unsampled routes and implementation details are not inferred.

Main entry points: [`main.py`](https://github.com/antonio9966/agente-ia-3/blob/master/main.py) (FastAPI endpoints), [`services/academic_search.py`](https://github.com/antonio9966/agente-ia-3/blob/master/services/academic_search.py) (Literature search), [`static/app.js`](https://github.com/antonio9966/agente-ia-3/blob/master/static/app.js) (Search and matrix UI), [`services/groq_service.py`](https://github.com/antonio9966/agente-ia-3/blob/master/services/groq_service.py) (AI expansion and analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser experience"]
  node_web_ui["Search and matrix UI<br/>[app.js]"]
end

subgraph group_api["API orchestration"]
  node_api_server["FastAPI endpoints<br/>[main.py]"]
end

subgraph group_research["Research services"]
  node_academic_search["Literature search<br/>[academic_search.py]"]
  node_openalex["OpenAlex"]
  node_crossref["Crossref"]
  node_groq_logic["AI expansion and analysis<br/>[groq_service.py]"]
  node_groq_cloud["Groq Cloud"]
end

subgraph group_outputs["Matrix outputs"]
  node_word_export["Word matrix generator<br/>[doc_generator.py]"]
  node_excel_export["Excel matrix generator<br/>[doc_generator.py]"]
end

node_researcher(("Researcher"))

node_researcher -->|"submits query"| node_web_ui
node_web_ui -->|"requests API"| node_api_server
node_api_server -->|"searches literature"| node_academic_search
node_academic_search -->|"queries works"| node_openalex
node_academic_search -->|"queries records"| node_crossref
node_api_server -->|"requests AI tasks"| node_groq_logic
node_groq_logic -->|"sends prompts"| node_groq_cloud
node_api_server -->|"generates DOCX"| node_word_export
node_api_server -->|"generates XLSX"| node_excel_export
node_word_export -->|"returns document"| node_api_server
node_excel_export -->|"returns spreadsheet"| node_api_server

click node_web_ui "https://github.com/antonio9966/agente-ia-3/blob/master/static/app.js"
click node_api_server "https://github.com/antonio9966/agente-ia-3/blob/master/main.py"
click node_academic_search "https://github.com/antonio9966/agente-ia-3/blob/master/services/academic_search.py"
click node_groq_logic "https://github.com/antonio9966/agente-ia-3/blob/master/services/groq_service.py"
click node_word_export "https://github.com/antonio9966/agente-ia-3/blob/master/services/doc_generator.py"
click node_excel_export "https://github.com/antonio9966/agente-ia-3/blob/master/services/doc_generator.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_web_ui toneBlue
class node_api_server toneAmber
class node_academic_search,node_openalex,node_crossref,node_groq_logic,node_groq_cloud toneMint
class node_word_export,node_excel_export toneRose
class node_researcher toneIndigo
```

## Components

### Browser experience

- [Search and matrix UI](https://github.com/antonio9966/agente-ia-3/blob/master/static/app.js): `static/app.js`

### API orchestration

- [FastAPI endpoints](https://github.com/antonio9966/agente-ia-3/blob/master/main.py): `main.py`

### Research services

- [Literature search](https://github.com/antonio9966/agente-ia-3/blob/master/services/academic_search.py): `services/academic_search.py`
- **OpenAlex**
- **Crossref**
- [AI expansion and analysis](https://github.com/antonio9966/agente-ia-3/blob/master/services/groq_service.py): `services/groq_service.py`
- **Groq Cloud**

### Matrix outputs

- [Word matrix generator](https://github.com/antonio9966/agente-ia-3/blob/master/services/doc_generator.py): `services/doc_generator.py`
- [Excel matrix generator](https://github.com/antonio9966/agente-ia-3/blob/master/services/doc_generator.py): `services/doc_generator.py`

### Other components

- **Researcher**

## Connections

- Researcher → Search and matrix UI: submits query (evidence: `static/app.js`)
- Search and matrix UI → FastAPI endpoints: requests API (evidence: `static/app.js`)
- FastAPI endpoints → Literature search: searches literature (evidence: `main.py`)
- Literature search → OpenAlex: queries works (evidence: `services/academic_search.py`)
- Literature search → Crossref: queries records (evidence: `services/academic_search.py`)
- FastAPI endpoints → AI expansion and analysis: requests AI tasks (evidence: `main.py`)
- AI expansion and analysis → Groq Cloud: sends prompts (evidence: `services/groq_service.py`)
- FastAPI endpoints → Word matrix generator: generates DOCX (evidence: `main.py`)
- FastAPI endpoints → Excel matrix generator: generates XLSX (evidence: `main.py`)
- Word matrix generator → FastAPI endpoints: returns document (evidence: `main.py`)
- Excel matrix generator → FastAPI endpoints: returns spreadsheet (evidence: `main.py`)
