Currency Nostalgia is a currency comparison API that allows users to compare historical USD exchange rates with today's product prices. It uses CurrencyFreaks free API for current exchange rates and manually added JSON data for historical values and product prices.
- Fetches live exchange rates using CurrencyFreaks API.
- Compares historical product prices with today's equivalents.
- Stores historical exchange rates and product data in local JSON files.
- Schedules daily currency rate updates using
node-cron
.
You can test the API live on Render:
-
Get the latest exchange rates:
https://webappkindathingidk.onrender.com/currency/latest -
Compare historical vs current product price:
https://webappkindathingidk.onrender.com/nostalgia/compare?year=2015&productId=1
β³ You can modifyyear
andproductId
to test other combinations.
project-root/
βββ node_modules/ # Node.js modules
βββ public/ # Static files (CSS, JavaScript, images)
β βββ css/
β βββ js/
β βββ img/
βββ views/ # Frontend files (HTML, template engine files)
β βββ layouts/
βββ routes/ # Route definitions
β βββ currency.js
β βββ nostalgia.js
βββ controllers/ # Route handlers
β βββ currencyController.js
β βββ nostalgiaController.js
βββ config/ # API and DB configuration
β βββ api.js
β βββ supabase.js
βββ services/
β βββ exchangeRateSerices.js
βββ data/ # Data Files
β βββ products.json
β βββ historicalExchange.json
βββ utils/ # Utility functions
β βββ apiUtils.js
βββ .env # Environment variables
βββ .gitignore # Files to be ignored by Git
βββ package.json # Node.js project configuration
βββ server.js # Main server file
βββ README.md # Project description
Projenin Γ§alΔ±Εabilmesi iΓ§in aΕaΔΔ±daki adΔ±mlarΔ± takip edin:
git clone https://github.com/Glory42/webAppKindaThingidk.git
cd webAppKindaThingidk
npm install
In the project root, create a .env file with the following content:
CURRENCY_API_KEY=your_currencyfreaks_api_key
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your_supabase_anon_key`
npm start
The API will be accessible at:
http://localhost:3000
Package | Purpose |
---|---|
express |
Web framework |
axios |
HTTP client |
cors |
Cross-Origin Resource Sharing |
node-cron |
Scheduled background tasks |
@supabase/supabase-js |
Supabase client for DB access |
-
data/products.json: Historical product prices per year.
-
data/historicalExchange.json: Manually stored historical exchange rates.
Pull requests and contributions are welcome. Please open an issue first to discuss your ideas before making major changes.
MIT LICENSE Β© 2025 GΓΆrkem Karyol