# lehcimhdz/notificaciones_registro architecture

> Architecture diagram of the GitHub repository lehcimhdz/notificaciones_registro, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lehcimhdz/notificaciones_registro
- Repository: https://github.com/lehcimhdz/notificaciones_registro

## Overview

##### Project Type and Purpose
- This is a small, standalone automation tool (a script/notebook) rather than a full-stack or microservices application.
- Its purpose is to read a list of pending victim‐registration cases from a CSV, use stored account credentials (“Llaves”), and send notifications (via WhatsApp or similar) so that staff no longer have to process each document manually.

##### File‐Structure Analysis
- Top level:
- auto_notificaciones.ipynb – the Jupyter notebook driving the process
- notificaciones.csv – input data (victims to notify)
- PyWhatKit_DB.txt – likely credentials or serialized API tokens for PyWhatKit
- Llaves/ – directory holding key files (API keys, certificates, etc.)
- README.md – high‐level project purpose
- No backend/frontend split, no external database—just local CSV and key files.

##### Key Components
a. Data Source
- notificaciones.csv – CSV file listing user/contact info and notification state
b. Credentials Store
- Llaves/ directory + PyWhatKit_DB.txt
- Holds API keys or authentication tokens for the messaging service
c. Notification Engine
- auto_notificaciones.ipynb (or underlying Python scripts/libraries)
- Reads CSV, loads keys, formats messages, and invokes PyWhatKit (or similar)
d. External Service
- WhatsApp Web API (via PyWhatKit) or SMTP if email is used—represents message delivery
e. Operator/Trigger
- A human or scheduler that launches the notebook or Python script

##### Architectural Patterns & Principles
- Single‐responsibility: separation between data (CSV), credentials (Llaves), and logic (notebook)
- Simple pipeline: Extract (CSV) → Transform (format message) → Load/Send (external API)
- Extensibility: additional channels (email/SMS) could be added by swapping out the PyWhatKit calls

## Diagram (Mermaid)

```mermaid
flowchart TD
    title["Architecture of notificaciones_registro Automation"]

    Operator["Operator / Scheduler"]:::trigger

    subgraph "Notification Engine"
        EngineMain["Notification Engine\n(auto_notificaciones.ipynb)"]:::process
        CSVReader["CSV Reader"]:::process
        MessageFormatter["Message Formatter"]:::process
        SenderModule["Sender Module"]:::process
    end

    DataSource["Data Source\n(notificaciones.csv)"]:::artifact

    subgraph "Credentials Store"
        KeysDir["Llaves/"]:::artifact
        APIFile["PyWhatKit_DB.txt"]:::artifact
    end

    ExternalService["WhatsApp Web API"]:::external
    Logs["Logs"]:::log

    Operator -->|"Launch notebook/process"| EngineMain
    EngineMain -->|"Read CSV"| DataSource
    EngineMain -->|"Load keys"| KeysDir
    EngineMain -->|"Load keys"| APIFile
    EngineMain -->|"Format message"| MessageFormatter
    MessageFormatter -->|"Prepare for send"| SenderModule
    SenderModule -->|"Send message via WhatsApp Web API"| ExternalService
    SenderModule -->|"Log results"| Logs
    SenderModule -->|"Update notification status in CSV"| DataSource

    click DataSource "https://github.com/lehcimhdz/notificaciones_registro/blob/main/notificaciones.csv"
    click KeysDir "https://github.com/lehcimhdz/notificaciones_registro/tree/main/Llaves/"
    click APIFile "https://github.com/lehcimhdz/notificaciones_registro/blob/main/PyWhatKit_DB.txt"
    click EngineMain "https://github.com/lehcimhdz/notificaciones_registro/blob/main/auto_notificaciones.ipynb"

    classDef artifact fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef process fill:#90EE90,stroke:#000,stroke-width:1px
    classDef external fill:#FFA500,stroke:#000,stroke-width:1px
    classDef trigger fill:#D3D3D3,stroke:#000,stroke-width:1px
    classDef log fill:#F0E68C,stroke:#000,stroke-width:1px
```
