How pedrobubuli/tp2_arqui_publico works
This repository migrates an arVault currency-exchange service to Azure. A client sends an exchange request with a DNI; the API validates the request, the exchange logic checks the rate and accounts, consults ARCA, reserves funds and performs transfers, then records the outcome in shared Redis. The graph also shows account/rate management and the documented Azure deployment pieces. Runtime calls are grounded in the sampled Node files; infrastructure relationships are documented in the README, but the Terraform and Ansible sources were not sampled.
Main entry points: store.js Redis store · exchange.js Exchange logic · arca.js ARCA client · app.js Exchange API
Components 13
API and exchange
- Exchange API
node/app.js - Exchange logic
node/exchange.js - ARCA client
node/arca.js - Runtime config
node/config.js
Shared state
- Redis store
node/store.js - Account seed
node/state/accounts.json - Rate seed
node/state/rates.json - Shared Redis
redis.tf
Azure infrastructure
- ARCA service
arca.tf - Azure VM scale set
node.tf - VMSS jumpbox
jumpbox.tf
Other components
- Exchange client
- Load generator
Connections 13
- Exchange client → Exchange API: sends requests
README.md - Load generator → Exchange API: sends load
README.md - Exchange API → Exchange logic: calls exchange
node/app.js - Exchange logic → Redis store: reads and writes
node/exchange.js - Exchange logic → ARCA client: validates DNI
node/exchange.js - ARCA client → Runtime config: reads endpoint
node/arca.js - Redis store → Runtime config: reads connection
node/store.js - Redis store → Account seed: loads seed
node/store.js - Redis store → Rate seed: loads seed
node/store.js - Redis store → Shared Redis: reads and writes
node/store.js - ARCA client → ARCA service: POST validates
README.md - Azure VM scale set → Shared Redis: uses shared storage
README.md - VMSS jumpbox → Azure VM scale set: administers instances
README.md