Skip to content
Back to projects

Full-Stack App

Finance Dashboard

Node.jsExpressSQLitenode-cronWeb ScrapingPWAService WorkerVanilla JS

A real time dashboard for the Egyptian financial market. It aggregates 12 feeds from 6 scrapers: local gold prices, international gold, currency (official + black market), forex, crypto, BTC, craftsmanship, silver, history, charts, and inflation. Sources are scraped from edahab, egcurrency, isagha, ta3weem, and direct APIs where available.

The interesting part is the two tier cache. Every feed has a 5 minute fresh TTL for normal reads, and a 12 hour stale fallback for when all live sources fail simultaneously. When the live source fails, the dashboard returns the last known good response flagged with stale: true and stale_since, so the client can show an age warning instead of incorrect data. This means the dashboard effectively never goes down because its uptime equals the union of its sources over the last 12 hours, not the intersection over the current request. A /api/health endpoint exposes per source cache status for operator visibility.

The /api/all endpoint fires sources in two waves. Wave 1 hits the independent sources (gold, forex, crypto, currency). Wave 2 hits the derived sources (black market, silver, crypto fallbacks) that depend on wave 1 results being cached. This ordering matters because on a cold start after cache eviction, derived sources need their upstream to be fresh first.

Stack: Express + node cron on the backend with SQLite for historical snapshots and the two tier cache implemented in a single cache.js module. Frontend is vanilla HTML + CSS + JS with a real service worker and manifest, so it installs to home screen on mobile as a PWA. No frameworks on either side. Deployed on a small VPS with a total footprint under 500 MB RAM.