How musab1010/currency-sudan works
This repository is a Sudanese currency-rates web service with separate utilities for checking bank websites and listing bank apps. The main workflow is the server launching a scraper, the scraper fetching and parsing rates, and the server reading saved rates for its API. The tree also includes visitor statistics and OCR code, but the available excerpts do not show OCR wired into the server or the bank-checking utilities exposed through its API. The README is empty, so feature links beyond the shown code are omitted.
Main entry points: server.js Express server · scrape-alsoug.js Alsoug scraper · bank-monitor.js Scheduled bank monitor · bank-checker.js On-demand bank checker
Components 19
Web service
- Express server
server.js - Public website
public/index.html - Admin page
admin/index.html - Visitor records
data/visitors.json - Rates API
server.js
Rate collection
- Alsoug scraper
scrape-alsoug.js - Rate records
data/rates.json - Legacy rate data
data.json
Bank status
- Scheduled bank monitor
bank-monitor.js - On-demand bank checker
bank-checker.js - Bank status records
data/banks-status.json - Bank app checker
app-checker.js - App status records
data/apps-status.json
Standalone utilities
- Image OCR and rate parsing
utils/ocr.js - Arabic and English OCR data
ara.traineddata - English OCR data
eng.traineddata
Other components
- Website visitor
- Alsoug currency site
- Bank websites
Connections 15
- Website visitor → Express server: requests pages and APIs
server.js - Express server → Public website: serves static site
server.js - Express server → Alsoug scraper: launches on schedule
server.js - Alsoug scraper → Alsoug currency site: fetches currency table
scrape-alsoug.js - Alsoug scraper → Rate records: writes parsed rates
scrape-alsoug.js - Rates API → Rate records: reads rates file
server.js - Rates API → Legacy rate data: fallback reads rates
server.js - Express server → Visitor records: reads and updates counts
server.js - Scheduled bank monitor → Bank websites: checks availability
bank-monitor.js - Scheduled bank monitor → Bank status records: writes check results
bank-monitor.js - On-demand bank checker → Bank websites: checks availability
bank-checker.js - On-demand bank checker → Bank status records: writes check results
bank-checker.js - Bank app checker → App status records: writes app status
app-checker.js - Image OCR and rate parsing → Arabic and English OCR data: recognizes Arabic text
- Image OCR and rate parsing → English OCR data: recognizes English text