A modern, real-time currency exchange tracker for Iraqi Dinar from Local Market rates. DinarLive now uses a server-side API to collect market prices from trusted public sources alongside the official Central Bank of Iraq rate.
This contains everything you need to run your app either locally or deploying it.
Prerequisites: Node.js
- Install dependencies:
npm install - Create
.env.localfrom.env.example. - Run the app:
npm run dev
The live exchange rates come from a backend /api/rates endpoint.
- Local market rates are fetched server-side from public Telegram market channels.
- The official USD rate is fetched server-side from the Central Bank of Iraq.
- Global FX rates for EUR, TRY, GBP, and IRR are fetched from ExchangeRate-API open access.
Vercel is the easiest deployment target for the current codebase.
- The frontend builds as a normal Vite app.
- The backend runs through
api/rates.tsas a Vercel Function. - No
VITE_API_BASE_URLis required when frontend and API are deployed together on the same Vercel project.
This repo is now ready for a two-service Render setup:
- A Node web service for the backend API
- A static site for the frontend
The included render.yaml creates both services. After the backend is deployed, set:
VITE_API_BASE_URL=https://your-backend-service.onrender.com
And set this on the backend:
FRONTEND_ORIGIN=https://your-frontend-site.onrender.com
The backend start command is:
npm run start:backend
You can test the backend health endpoint at:
/healthz
GEMINI_API_KEYOptional. Only needed for the chat assistant backend route.GEMINI_CHAT_MODELOptional. Defaults togemini-2.5-flashfor the backend chat route.VITE_API_BASE_URLOptional. Use this when your frontend and backend are hosted on different domains.FRONTEND_ORIGINOptional but recommended for the backend when frontend and backend are on different domains.TELEGRAM_MARKET_SOURCESOptional comma-separated override for the Telegram market channels used by the backend.
- Build command:
npm install && npm run build - Publish directory:
dist
- Build command:
npm install - Start command:
npm run start:backend - Health check:
/healthz