Release V2.3.1: The Enterprise Foundation Update
17 March 2026 > 17 March 2026 - Complete architecture overhaul from single-script to modular SFFB design
What's New
Modular SFFB Architecture
The entire codebase has been rebuilt from the ground up into a clean, enterprise-grade modular structure:
- core/logic.py - Zero-Guess Rollback Engine
-
- core/api_client.py - Async BOT API Client with Pydantic v2 validation
-
- core/engine.py - Processing Orchestrator
-
- core/database.py - SQLite Cache Layer
-
- core/backup_manager.py - Backup & Revert Manager
-
- gui/app.py - CustomTkinter Enterprise GUI
CustomTkinter Desktop GUI
- Professional, zero-emoji enterprise interface
-
- Smart Date Toggle (defaults to today, unlock for historical dates)
-
- Drag-and-drop support for files AND folders (with click-browse fallback)
-
- Per-file batch progress with real-time status updates
-
- "Show File in Folder" button for instant OS file reveal
Zero-Latency SQLite Cache (core/database.py)
- Local data/cache.db stores exchange rates and holidays
-
- Cache-First architecture: SQLite queried before BOT API
-
- Today's rate cached permanently (BOT publishes once per day)
-
- WAL journal mode + threading.Lock() for thread safety
-
- Repeat runs skip API entirely - zero network latency
Fail-Safe Backup System (core/backup_manager.py)
- Pristine timestamped copy created before every file modification
-
- One-click GUI revert: select corrupted file -> restore from backup
-
- 7-day auto-cleanup prevents disk space bloat on legacy hardware
-
- Uses only shutil + os - zero external dependencies
5-Day Zero-Guess Rollback Engine (core/logic.py)
- If a date falls on a weekend or BOT holiday, steps back 1 day at a time
-
- Maximum 5-day safety guardrail - halts with <ERROR: No Rate> if exceeded
-
- O(1) holiday lookup via set() conversion
-
- All rates output as Decimal quantized to 4 decimal places
Memory Guardrails
- Strict 15MB file-size limit on all .xlsx inputs
-
- Per-file workbook.close() + gc.collect() after every save
-
- Designed for legacy office PCs with 4GB RAM
What Changed
| Area | Before | V2.3.1 |
|---|---|---|
| Structure | Single Python script | 7 modular files across core/ and gui/ |
| Interface | Command-line | CustomTkinter desktop GUI |
| Processing | Single file | Batch drag-and-drop (files + folders) |
| Output | Created _processed.xlsx copy | In-place overwrite + instant OS unlock |
| Caching | None - API called every run | SQLite cache with date-gap detection |
| Backups | None | Timestamped auto-backup before every edit |
| API handling | Basic requests | Async httpx + tenacity retry (3 attempts) |
| Validation | None | Pydantic v2 strict schema enforcement |
| Token security | Hardcoded / manual | .env file + startup validation popup |
| Date handling | Manual | Smart Toggle with auto/custom modes |
Requirements
- Python 3.10+
-
- Dependencies: customtkinter, openpyxl, httpx, tenacity, pydantic, python-dotenv
-
- Optional: tkinterdnd2 (enables drag-and-drop)
Note: You must supply your own .env file with valid BOT API credentials. See the README for setup instructions.
Installation
git clone https://github.com/Dry1ceD7/BOT-Exchange-Rates.git
cd BOT-Exchange-Rates
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python main.py