# adrianromeroolmedo/ceutameprecupaprocesamiento architecture

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

- Interactive diagram: https://gitdiagram.com/adrianromeroolmedo/ceutameprecupaprocesamiento
- Repository: https://github.com/adrianromeroolmedo/ceutameprecupaprocesamiento

## Overview

This repository is a single-script pipeline for processing pending citizen communications for Ceuta. Its intended workflow reads communications, flags emergencies, sanitizes personal data, classifies non-emergency items, and stores anonymized proposals. The excerpts show sanitization and classification calls and database write logic, but not the complete orchestration or model-loading flow; those connections are omitted where unverified. The README is empty, so capability coverage is based on the script’s docstring and excerpts.

Main entry points: [`qwen_chat.py`](https://github.com/adrianromeroolmedo/ceutameprecupaprocesamiento/blob/main/qwen_chat.py) (Communication processor), [`db_config.example.py`](https://github.com/adrianromeroolmedo/ceutameprecupaprocesamiento/blob/main/db_config.example.py) (Database settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_screening["Screening and privacy"]
  node_pipeline["Communication processor<br/>[qwen_chat.py]"]
  node_privacy["PII sanitization<br/>[qwen_chat.py]"]
  node_emergency["Emergency filter<br/>[qwen_chat.py]"]
end

subgraph group_classification["Classification"]
  node_classifier["Category classifier<br/>[qwen_chat.py]"]
  node_model["Language model"]
end

subgraph group_persistence["Persistence"]
  node_proposals[("Anonymized proposals")]
  node_db[("MySQL/MariaDB")]
  node_config["Database settings"]
end

node_incoming[("Pending communications")]

node_pipeline -->|"sanitizes via"| node_privacy
node_pipeline -.->|"checks emergencies"| node_emergency
node_pipeline -->|"classifies via"| node_classifier
node_classifier -.->|"generates response"| node_model
node_pipeline -->|"fetches records"| node_db
node_pipeline -->|"writes proposals"| node_proposals
node_config -.->|"configures access"| node_db
node_incoming -.->|"stored in"| node_db

click node_pipeline "https://github.com/adrianromeroolmedo/ceutameprecupaprocesamiento/blob/main/qwen_chat.py"
click node_privacy "https://github.com/adrianromeroolmedo/ceutameprecupaprocesamiento/blob/main/qwen_chat.py"
click node_emergency "https://github.com/adrianromeroolmedo/ceutameprecupaprocesamiento/blob/main/qwen_chat.py"
click node_classifier "https://github.com/adrianromeroolmedo/ceutameprecupaprocesamiento/blob/main/qwen_chat.py"
click node_config "https://github.com/adrianromeroolmedo/ceutameprecupaprocesamiento/blob/main/db_config.example.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_pipeline,node_privacy,node_emergency toneBlue
class node_classifier,node_model,node_incoming toneAmber
class node_proposals,node_db,node_config toneMint
```

## Components

### Screening and privacy

- [Communication processor](https://github.com/adrianromeroolmedo/ceutameprecupaprocesamiento/blob/main/qwen_chat.py): `qwen_chat.py`
- [PII sanitization](https://github.com/adrianromeroolmedo/ceutameprecupaprocesamiento/blob/main/qwen_chat.py): `qwen_chat.py`
- [Emergency filter](https://github.com/adrianromeroolmedo/ceutameprecupaprocesamiento/blob/main/qwen_chat.py): `qwen_chat.py`

### Classification

- [Category classifier](https://github.com/adrianromeroolmedo/ceutameprecupaprocesamiento/blob/main/qwen_chat.py): `qwen_chat.py`
- **Language model**

### Persistence

- **Anonymized proposals**
- **MySQL/MariaDB**
- [Database settings](https://github.com/adrianromeroolmedo/ceutameprecupaprocesamiento/blob/main/db_config.example.py): `db_config.example.py`

### Other components

- **Pending communications**

## Connections

- Communication processor → PII sanitization: sanitizes via (evidence: `qwen_chat.py`)
- Communication processor → Emergency filter: checks emergencies (evidence: `qwen_chat.py`)
- Communication processor → Category classifier: classifies via (evidence: `qwen_chat.py`)
- Category classifier → Language model: generates response
- Communication processor → MySQL/MariaDB: fetches records (evidence: `qwen_chat.py`)
- Communication processor → Anonymized proposals: writes proposals (evidence: `qwen_chat.py`)
- Database settings → MySQL/MariaDB: configures access
- Pending communications → MySQL/MariaDB: stored in
