AI-Powered Real-time Analytics for Everyone
A high-performance cryptocurrency monitoring dashboard that fetches live market data from Binance. This project demonstrates a powerful hybrid architecture combining the speed of Rust for high-frequency data ingestion and the real-time capabilities of Ruby on Rails 8 (Turbo Streams) for a reactive frontend.
- Core Backend (Worker): Rust 🦀 (Tokio, Reqwest, Sqlx) - Optimized for high-frequency data polling with low memory footprint.
- Web Interface: Ruby on Rails 8 💎 (Hotwire, Turbo Streams) - Handling real-time broadcasts via Action Cable.
- Database: PostgreSQL 🐘 - Acting as the central data hub and real-time event broker using
LISTEN/NOTIFY. - Frontend: Tailwind CSS (Modern Dark Mode UI) & TradingView Widget 📈
- Infrastructure: Docker & Render Cloud 🐳
- ⚡ Real-time Binance Data: Connects to Binance Public API to track BTC, ETH, SOL, BNB, DOGE, and more.
- 🧠 AI Sentiment Score: Algorithmic scoring system (0-100) based on Price Action, Volume Velocity, and Volatility.
- 📉 Interactive Charts: Professional-grade technical analysis via integrated TradingView widgets.
- 🔄 Reactive UI: Uses Rails Turbo Streams to push sub-second price updates and "Flash" animations without page reloads.
- 📱 Mobile-First Design: Responsive layout optimized for all devices.
The system consists of three main services orchestrated on Render:
crypto_db(PostgreSQL): Stores historical sentiment scores and serves as a message broker.crypto-worker(Rust):- Polls Binance API for 24hr ticker data.
- Calculates "AI Sentiment Score" logic.
- Inserts data into PostgreSQL and triggers
pg_notifyevents.
crypto-web(Rails):- Subscribes to DB events via Action Cable (PostgreSQL adapter).
- Broadcasts updates to the browser via Turbo Streams.
- Clone the repository:
git clone [https://github.com/Disorn1998/crypto_sentiment.git](https://github.com/Disorn1998/crypto_sentiment.git) cd crypto_sentiment - Build and Start with Docker:
docker-compose up --build
- Initialize Database:
docker-compose exec web rails db:migrate - Access: Open
http://localhost:3000
This project is production-ready and optimized for Render Free Tier:
- Memory Management: Rust compilation is tuned with
--jobs 1to fit within 512MB RAM limits. - Real-time Connectivity: Configured with Action Cable PostgreSQL adapter for cross-service communication.
Developed by Disorn Suppartum