π Quick Start - Professional Crypto Dashboard
β¨ What You Got
A complete professional cryptocurrency intelligence dashboard with:
β
Beautiful UI - Modern design with SVG icons, charts, animations
β
Backend Integration - Full REST API + WebSocket real-time updates
β
User Queries - Natural language: "Bitcoin price", "Top 10 coins", etc.
β
Real-time Sync - Live data updates every 10 seconds
β
Comprehensive Data - Prices, market cap, news, sentiment, DeFi, NFTs
π― 3-Step Setup
Step 1: Install Dependencies
pip install fastapi uvicorn websockets
Step 2: Start Backend
python3 api_dashboard_backend.py
Step 3: Open Dashboard
Open browser: http://localhost:7860
Done! Your professional dashboard is now running! π
π¨ Dashboard Features
1. Query Interface
Users can ask questions:
π° "Bitcoin price" β Current BTC price
π "Top 10 coins" β List top cryptocurrencies
π "Ethereum trend" β ETH price trend chart
π "Market sentiment" β Bullish/bearish analysis
π "DeFi TVL" β Total Value Locked
πΌοΈ "NFT volume" β NFT market statistics
β½ "Gas prices" β Ethereum gas fees
2. Real-time Updates
- WebSocket connection status indicator
- Live price updates every 10 seconds
- Auto-refresh market statistics
- Instant query results
3. Interactive Charts
- Price Trend: Line chart with 1D/7D/30D/90D options
- Sentiment Analysis: Doughnut chart (Bullish/Neutral/Bearish)
- Smooth animations and responsive design
4. Market Statistics
- Total Market Cap
- 24h Trading Volume
- Bitcoin Dominance
- Fear & Greed Index
5. Latest News Feed
- Real-time crypto news
- Source attribution
- Clickable links
π Files Created
| File | Purpose |
|---|---|
crypto_dashboard_pro.html |
Professional frontend (41 KB) |
api_dashboard_backend.py |
Complete backend API (19 KB) |
PROFESSIONAL_DASHBOARD_GUIDE.md |
Full documentation (19 KB) |
QUICK_START_PROFESSIONAL.md |
This quick start guide |
π§ API Endpoints
Available Endpoints:
GET / β Dashboard UI
GET /api/health β Health check
GET /api/coins/top?limit=10 β Top cryptocurrencies
GET /api/coins/{symbol} β Coin details
GET /api/market/stats β Market statistics
GET /api/news/latest?limit=10 β Latest news
POST /api/query β Process user queries
GET /api/charts/price/{symbol} β Chart data
WS /ws β Real-time WebSocket
Example API Call:
# Get top 10 coins
curl http://localhost:7860/api/coins/top
# Process query
curl -X POST http://localhost:7860/api/query \
-H "Content-Type: application/json" \
-d '{"query": "Bitcoin price"}'
π» Example Queries
Try these queries in the dashboard:
Price Queries
- "Bitcoin price"
- "price of Ethereum"
- "how much is BTC"
Top Coins
- "top 10 coins"
- "best 20 cryptocurrencies"
- "show me top coins"
Market Analysis
- "market sentiment"
- "fear and greed index"
- "is market bullish"
DeFi & NFT
- "DeFi TVL"
- "total value locked"
- "NFT volume"
- "NFT sales today"
Network Info
- "Ethereum gas prices"
- "transaction fees"
- "gas price now"
π¨ Customization
Change Theme Colors
Edit crypto_dashboard_pro.html:
:root {
--primary: #6366f1; /* Change main color */
--success: #10b981; /* Change success color */
--danger: #ef4444; /* Change danger color */
}
Add Custom Queries
Edit api_dashboard_backend.py:
# Add new pattern
patterns = {
'your_type': [r'your pattern', r'alternative'],
}
# Handle the query
elif parsed['type'] == 'your_type':
return {
"success": True,
"message": "Your response"
}
π Deploy to Hugging Face
1. Create requirements.txt:
fastapi==0.104.1
uvicorn[standard]==0.24.0
websockets==12.0
2. Create app.py:
from api_dashboard_backend import app
3. Push to HF Space:
git add .
git commit -m "Deploy professional dashboard"
git push origin main
Your dashboard will be available at:
https://your-username-space-name.hf.space
π Architecture
βββββββββββββββββββββββββββββββββββββββββββ
β Frontend (HTML/JS) β
β β’ Query Interface β
β β’ Real-time Charts β
β β’ News Feed β
β β’ Market Statistics β
βββββββββββββββββββββββββββββββββββββββββββ
β HTTP/WebSocket
βββββββββββββββββββββββββββββββββββββββββββ
β Backend API (Python/FastAPI) β
β β’ REST API Endpoints β
β β’ WebSocket Real-time Updates β
β β’ Natural Language Query Parser β
β β’ Data Aggregation β
βββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββ
β Data Sources & Providers β
β β’ CoinGecko β’ Binance β’ DeFiLlama β
β β’ Etherscan β’ News APIs β’ Sentiment β
βββββββββββββββββββββββββββββββββββββββββββ
π₯ Features Comparison
| Feature | Included |
|---|---|
| Professional UI | β Modern design |
| Real-time Updates | β WebSocket |
| User Queries | β Natural language |
| Price Charts | β Interactive |
| Market Stats | β Live data |
| News Feed | β Real-time |
| Sentiment Analysis | β Bullish/Bearish |
| Mobile Responsive | β All devices |
| Data Export | β JSON format |
| Backend Integration | β Full REST API |
| WebSocket Support | β Real-time sync |
| Query Processing | β NLP engine |
π― Use Cases
For Users:
- π° Check cryptocurrency prices instantly
- π Analyze market trends with charts
- π° Stay updated with latest news
- π Monitor market sentiment
- π Query any crypto information
For Developers:
- π Full REST API for integrations
- π‘ WebSocket for real-time apps
- π¨ Customizable UI components
- π§ Extensible backend architecture
- π Complete documentation
For Businesses:
- πΌ Professional dashboard for clients
- π Market analysis tools
- π€ Automated data collection
- π Custom reporting features
- π Secure API endpoints
π Troubleshooting
Dashboard not loading?
# Check if server is running
curl http://localhost:7860/api/health
# Restart server
python3 api_dashboard_backend.py
WebSocket not connecting?
// Check browser console for errors
// Verify WebSocket URL: ws://localhost:7860/ws
Queries not working?
# Test API directly
curl -X POST http://localhost:7860/api/query \
-H "Content-Type: application/json" \
-d '{"query": "bitcoin price"}'
π Documentation
| Document | Description |
|---|---|
| QUICK_START_PROFESSIONAL.md | This quick guide |
| PROFESSIONAL_DASHBOARD_GUIDE.md | Complete documentation |
| crypto_dashboard_pro.html | Frontend source code |
| api_dashboard_backend.py | Backend source code |
β What's Included
Frontend Features:
- β Professional modern UI design
- β SVG icons (no emojis)
- β Gradient backgrounds
- β Smooth animations
- β Interactive charts (Chart.js)
- β Real-time WebSocket connection
- β Natural language query interface
- β Mobile responsive design
- β Toast notifications
- β Data export functionality
Backend Features:
- β FastAPI REST API server
- β WebSocket real-time updates
- β Natural language query parser
- β Multiple endpoint support
- β JSON response formatting
- β Error handling
- β CORS configuration
- β Connection management
- β Async operations
- β Logging system
Data Features:
- β Cryptocurrency prices
- β Market capitalization
- β 24h trading volume
- β Price changes (24h)
- β Market statistics
- β News aggregation
- β Sentiment analysis
- β DeFi TVL data
- β NFT volume tracking
- β Gas price monitoring
π Summary
You now have a production-ready professional cryptocurrency dashboard!
To Start:
python3 api_dashboard_backend.py
# Open http://localhost:7860
To Query:
Type in the search box:
"Bitcoin price" or "Top 10 coins" or "Market sentiment"
To Deploy:
# Deploy to Hugging Face, AWS, or Docker
# See PROFESSIONAL_DASHBOARD_GUIDE.md for details
π Next Steps
- Customize - Change colors, add features
- Integrate - Connect to real data providers
- Deploy - Push to Hugging Face or cloud
- Extend - Add portfolio tracking, alerts, etc.
Your professional crypto dashboard is ready! π
For detailed documentation, see: PROFESSIONAL_DASHBOARD_GUIDE.md