Currency CLI
Terminal currency converter with dual official & black market rates.
01 / Overview
A street-smart, natural-language command-line currency converter built for economies where parallel market rates diverge from official bank rates. Users can enter natural queries like "convert 10 birr to zimbabwe money", and the CLI parses the intent, interactively disambiguates multi-currency matches, and computes conversions using both official and real-time black market rates.
02 / Architecture & Engineering
Engineered with Java 21 and JLine for zero-dependency native console execution with instant sub-millisecond startup times. The client communicates with an edge microservice deployed on Cloudflare Workers that caches global rates from currency-api.com and enriches them with parallel market feeds from Black-Market-Rates-Real. Local disk caching provides seamless offline capability.
03 / Technical Highlights
Natural-language prompt parser extracting amounts and source/target currency phrases around keywords ("convert ... to ...").
Interactive terminal selector powered by JLine that gracefully disambiguates multi-currency queries (e.g. "dollar" or regional currencies) with arrow-key selection.
Dual-market calculation engine fetching official rates alongside real-world black market / parallel rates, displaying spread deltas.
High-performance edge caching layer hosted on Cloudflare Workers caching upstream currency-api.com responses and merging parallel market datasets.
Offline-first local cache in ~/.currency-* ensuring instant sub-millisecond conversion queries even when disconnected.
Technologies Used
Deliverables
- ▸ Standalone Runnable JAR & Maven Package
- ▸ Interactive Terminal Console (JLine 3)
- ▸ Cloudflare Workers Edge API & Cache
- ▸ Dual-Market Rate Ingestion Pipeline