Skip to content

Feat/sincronizacion tasa de cambio bcv#26

Closed
josean798 wants to merge 23 commits into
mainfrom
feat/sincronizacion-tasa-de-cambio-bcv
Closed

Feat/sincronizacion tasa de cambio bcv#26
josean798 wants to merge 23 commits into
mainfrom
feat/sincronizacion-tasa-de-cambio-bcv

Conversation

@josean798

Copy link
Copy Markdown
Collaborator

🚀 Pull Request: Sistema de Sincronización de Tasas BCV

Este Pull Request introduce un nuevo sistema para sincronizar automáticamente las tasas de cambio del Banco Central de Venezuela (BCV). Incluye la infraestructura necesaria para el scraping (extracción de datos), persistencia en base de datos y la auto-aplicación de estas tasas a los eventos.


✨ Aspectos Clave

  • 🗄️ Nueva entidad y tabla BcvRate: Creada para almacenar las tasas obtenidas.
  • 🔄 Modelos actualizados: Se modificaron los modelos ExchangeRate y Event para soportar la sincronización automática.
  • 🧠 Integración de un Proveedor: Se añade un servicio que busca, cachea e integra las tasas del BCV, actualizando automáticamente los eventos configurados para esto.
  • 📦 Nuevas dependencias: Se incorporan herramientas para realizar peticiones HTTP y scraping de forma eficiente.

🛠️ Cambios Detallados

🔄 Sistema de Auto-Sincronización de Tasas BCV

  • Persistencia de datos: Se añadió la entidad, tabla y repositorio BcvRate para almacenar las tasas del BCV, junto con el esquema de Prisma y su respectiva migración. [1] [2] [3] [4] [5]
  • ⚙️ Servicio BcvProvider: Se implementó este servicio para consultar, guardar en caché y refrescar las tasas, actualizando automáticamente los eventos que tengan la opción autoSyncBcv activa.
  • 🕷️ Scraper del BCV: Desarrollado utilizando cheerio y undici para extraer los valores actualizados del USD y EUR directamente desde la página oficial del BCV.
  • 🏗️ Inyección de Dependencias: Se integraron el proveedor y el repositorio en el contenedor de DI, asegurando su inicialización al arrancar la aplicación. [1] [2] [3] [4] [5]

📊 Cambios en Esquemas y Entidades

  • 📅 Modelo Event: Se extendió para incluir el campo booleano autoSyncBcv, permitiendo a cada evento decidir si desea activar la sincronización automática. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • 💵 Modelo ExchangeRate: Se actualizó para admitir el campo source (manual o bcv). Además, el campo setBy ahora permite valores nulos (nullable) para diferenciar si la tasa fue fijada de forma manual por un usuario o de forma automática por el sistema. [1] [2] [3] [4]

📦 Nuevas Dependencias

  • 📦 Se agregaron cheerio (para el parsing de HTML) y undici (para realizar peticiones HTTP de manera eficiente). [1] [2]

Abisaac1809 and others added 23 commits May 20, 2026 14:20
* chore: backend structure following clean architecture

* fix: replace eslintignore file

* feat: prisma configuration

* fix: postgresql volume in docker composer

* fix: migrate ci to use pnpm instead of npm

* fix: if the database url is not declared, the server fail fast

* feat: add database url to the env example

* feat: generate prisma client step in ci

* fix: delete database url env variable

* fix: allow prisma builds in the instalation
* feat: add events, users and event members to the prisma schema

* feat(api): user repository and its implementation with prisma

* feat(api): user entity

* feat(api): auth module

* feat(api): container for creating each module

* feat(api): enviromental variable is missing error

* feat(api): global error handler

* feat(api): validate schema middleware

* fix(api): configure to not use the js extention in the imports

* feat(api): auth middleware and user seeder

* feat(web): eventflow logos

* feat(web): global styles

* feat(web): axios instance configuration

* feat(web): login page

* feat(shared): add zod as a dependency
…po-de-entradas

FEAT: Implementacion Modulo tipo de entradas
* feat(db): add exchange rate and payment method to the prisma schema

* feat(api): add payment method module

* feat(api): add exchange rate module

* feat(api): add update event endpoint to the events module

* feat(web): add event settings page

* fix: apply suggestions from code review
* feat(db): add order, order item, customer and payment tables to the prisma schema

* feat(api): transaction manager implementation with prisma

* feat(api): sales module with its types and schemas

* feat(web): add sales page

* fix: apply suggestions from code review
* feat(db): add ticket model to the prisma schema

* feat(api): add ticketing module with crypto service

* feat(shared): add types and schemas for the ticketing module

* feat(web): add download tickets modal in the sales module

* feat: apply suggestions from code review
* feat(db): add access log model to the prisma schema

* feat(api): add access module implementation

* feat(shared): access types and schemas

* feat(web): add door registers page

* feat: apply suggestions from code review
Copilot AI review requested due to automatic review settings June 3, 2026 16:40
@josean798 josean798 linked an issue Jun 3, 2026 that may be closed by this pull request
33 tasks

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants