An enterprise-grade, event-driven decentralized background worker utility designed to capture live Bitcoin blockchain price metrics and persist them into a local SQLite data ledger. Features an interactive financial dashboard with real-time stock-market charting, dynamic trend vectoring (bullish/bearish analysis), 30-day closing aggregation, and public tunnel exposure.
The application implements a decoupled, concurrent client-server design:
- Autonomous Background Ingestion: Operates a non-blocking daemon thread polling Blockchain.info's high-availability ticker endpoint on a 45-second cadence with automatic error resilience[cite: 2, 4].
- Relational Ledger Storage: Thread-safe SQLite3 persistence tracking asset type, USD valuation, and ISO date-time logs[cite: 1].
- RESTful API Surface: High-performance FastAPI endpoints delivering real-time block metrics and parameterized history intervals.
-
Interactive Financial Graphing: Chart.js integration featuring:
-
Dynamic Trend Vectoring: Evaluates price deltas (
$\Delta$ ) to dynamically recolor plot lines between Bullish Green (#2ecc71) and Bearish Red (#e74c3c). - Pan & Zoom Controls: Drag horizontally or scroll with mouse/trackpad (powered by Hammer.js) to inspect historical metrics.
- 30-Day Daily Closing Aggregation: Server-side SQL subqueries filter 30-day data down to the final recorded closing rate per calendar day.
-
Dynamic Trend Vectoring: Evaluates price deltas (
- Adaptive UI & Theme Engine: Fully decoupled HTML5/CSS3/JavaScript interface featuring persistent Dark/Light mode toggles, responsive grid layouts, and an authentication gateway.
-
Public Tunneling: One-click integration with
pyngrokto expose the local node securely across the web.
.
├── database.py # SQLite database initialization and connection factory[cite: 1]
├── worker.py # Autonomous thread worker fetching live ticker metrics[cite: 2, 4]
├── main.py # FastAPI server, REST routes, and static file mounting
├── tunnel.py # Secure reverse proxy gateway configuration via Ngrok[cite: 3]
├── app_monitor.log # System monitoring and transactional log history
└── static/
├── login.html # Node gateway authentication & registration UI
├── index.html # Primary dashboard layout and charting canvas
├── style.css # Design tokens, CSS variables, and light/dark theme rules
└── app.js # DOM manipulation, polling engine, and Chart.js runtime logic