How sumit-chame/currancy_converter works
This is a browser-based currency converter. Users choose currencies and an amount, then the app fetches rates, applies any fee/spread, and displays the converted result; they can also inspect historical rates and export chart data. The modular app delegates rate retrieval to a tiered API layer and keeps rate data in a versioned local cache. The README documents URL sharing and PWA support. The sampled excerpts show the main module’s wiring, but some feature details and the worker-to-app request are documented rather than directly sampled.
Main entry points: main.js App bootstrap · api.js Rate API orchestration · index.js Live rates proxy · cache.js Versioned rate cache
Components 17
Conversion experience
- App bootstrap
src/main.js - Conversion and fees
src/main.js - Preferences and sharing
src/main.js - Currency formatting
src/ui.js - App state
src/state.js - Standalone app engine
index.js
Rates and cache
- Rate API orchestration
src/api.js - Live rates proxy
worker/src/index.js - Rate providers
- Versioned rate cache
src/cache.js - Browser storage
History analytics
- Historical lookup
src/api.js - Chart and statistics
src/chart.js - CSV and PNG export
src/chart.js
Offline platform
- Offline service worker
service-worker.js - Cached app assets
Other components
- Currency user
Connections 24
- Currency user → App bootstrap: uses
README.md - App bootstrap → Conversion and fees: wires events
src/main.js - App bootstrap → Rate API orchestration: loads currencies
src/main.js - Conversion and fees → Rate API orchestration: fetches rates
src/main.js - Conversion and fees → App state: updates
src/main.js - Conversion and fees → Currency formatting: formats results
src/main.js - App bootstrap → Preferences and sharing: wires events
src/main.js - Preferences and sharing → App state: updates
src/main.js - Preferences and sharing → Browser storage: stores preferences
src/main.js - Rate API orchestration → Live rates proxy: requests live rates
README.md - Rate API orchestration → Rate providers: fetches rates
src/api.js - Rate API orchestration → Versioned rate cache: reads and writes
src/api.js - Versioned rate cache → Browser storage: persists rates
src/cache.js - Live rates proxy → Rate providers: fetches live rates
worker/src/index.js - Live rates proxy → Rate providers: uses edge cache
worker/src/index.js - App bootstrap → Historical lookup: requests history
src/main.js - Historical lookup → Rate providers: fetches history
src/api.js - App bootstrap → Chart and statistics: renders analytics
src/main.js - Chart and statistics → Currency formatting: formats values
src/chart.js - App bootstrap → CSV and PNG export: wires exports
src/main.js - Currency user → Historical lookup: selects date
README.md - Currency user → CSV and PNG export: downloads data
README.md - App bootstrap → Offline service worker: enables offline app
README.md - Offline service worker → Cached app assets: caches assets
service-worker.js