A modern, real-time trading dashboard built with React, TypeScript, and Tailwind CSS. Features live market data, technical indicators, customizable watchlists, and AI-powered news summarization.
-
Real-Time Market Data
- Custom watchlists (My Watchlist, High Volatility)
- Add/remove symbols dynamically
-
Charts & Technical Indicators
- TradingView Advanced chart
- TradingView News
- TradingView Calendar
- TradingView Heatmap
- Frontend: React 18 + TypeScript
- Backend: Node.js with PostgreSQL
- Database: PostgreSQL 15 with connection pooling
- Build Tool: Vite
- Styling: Tailwind CSS with custom trading theme
- Charts: Recharts for financial visualization
- State Management: Zustand with subscriptions
- Real-time Data: WebSocket with reconnection logic
- Icons: Lucide React
- Layout: React Resizable Panels
- Containerization: Docker & Docker Compose
- Dark Theme: Optimized for trading environments
- Professional Colors:
- Background: Deep blue (#0b1426)
- Surface: Muted blue (#1a2332)
- Accent: Trading blue (#3b82f6)
- Success: Green (#10b981)
- Danger: Red (#ef4444)
- Typography: Monospace fonts for price data
- Responsive Layout: Resizable panels for custom workflows
Quick Start with Deployment Script:
# Clone repository
git clone https://github.com/cgeorges/tradingboard.git
cd tradingboard
# For Linux/macOS
chmod +x deploy.sh
./deploy.sh dev
# For Windows PowerShell
.\deploy.ps1 devManual Docker Setup:
# Create environment file
cp .env.sample .env
# Edit .env with your database credentials and API keys
# Start all services (app + PostgreSQL)
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down# Install dependencies
npm install
# Set up PostgreSQL database
# - Install PostgreSQL locally or use cloud provider
# - Create database and run init.sql script
# - Configure .env with your database credentials
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewIf running locally without Docker:
# Create database
createdb tradingboard
# Run initialization script
psql -d tradingboard -f init.sql
# Or connect and run manually
psql -d tradingboard
\i init.sqlThe application is containerized with PostgreSQL for easy production deployment:
- Create Environment File: Copy
.env.exampleto.envand configure your database credentials:
cp .env.example .env
# Edit .env with your preferred database credentials- Install Dependencies (for local development):
npm install# Build and run with Docker Compose (includes PostgreSQL)
docker-compose up -d
# Or build and run manually (requires external PostgreSQL)
docker build -t tradingboard .
docker run -p 8080:80 \
-e DB_HOST=your_postgres_host \
-e DB_USER=your_db_user \
-e DB_PASSWORD=your_db_password \
tradingboardThe application will be available at http://localhost:8080
- tradingboard: Main React application (port 8080)
- postgres: PostgreSQL database (port 5432)
- postgres_data: Persistent volume for database storage
Development (build locally):
# Stop services
docker-compose down
# Stop and remove volumes (⚠️ deletes database data)
docker-compose down -v
# View logs
docker-compose logs -f
# View specific service logs
docker-compose logs -f frontend
docker-compose logs -f backend
docker-compose logs -f postgres
# Rebuild and restart
docker-compose up --build -d
# Check health status
docker-compose ps
# Access PostgreSQL directly
docker-compose exec postgres psql -U ${DB_USER} -d ${DB_NAME}Production (use published images):
# Deploy with published images
docker-compose -f docker-compose.prod.yml up -d
# Update to latest images
docker-compose -f docker-compose.prod.yml pull
docker-compose -f docker-compose.prod.yml up -d
# View production logs
docker-compose -f docker-compose.prod.yml logs -f
# Scale services (if needed)
docker-compose -f docker-compose.prod.yml up -d --scale backend=2# Backup database
docker-compose exec postgres pg_dump -U tradingboard_user tradingboard > backup.sql
# Restore database
docker-compose exec -T postgres psql -U tradingboard_user tradingboard < backup.sql
# Reset database (⚠️ deletes all data)
docker-compose down -v
docker-compose up -d- Login to Docker Hub:
docker login- Build and tag the image:
# Replace 'yourusername' with your Docker Hub username
docker build -t yourusername/tradingboard:latest .
docker build -t yourusername/tradingboard:v1.0.0 .- Push to Docker Hub:
docker push yourusername/tradingboard:latest
docker push yourusername/tradingboard:v1.0.0- Use the published image:
docker run -p 8080:80 yourusername/tradingboard:latest-
Create a Personal Access Token:
- Go to GitHub Settings → Developer settings → Personal access tokens
- Create token with
write:packagesscope
-
Login to GHCR:
echo $GITHUB_TOKEN | docker login ghcr.io -u yourusername --password-stdin- Build and tag for GHCR:
# Replace 'yourusername' with your GitHub username
docker build -t ghcr.io/yourusername/tradingboard:latest .
docker build -t ghcr.io/yourusername/tradingboard:v1.0.0 .- Push to GHCR:
docker push ghcr.io/yourusername/tradingboard:latest
docker push ghcr.io/yourusername/tradingboard:v1.0.0Automated builds are already configured! Every merge to the main branch automatically builds and pushes both frontend and backend images to Docker Hub.
Published Images:
- 🖥️ Frontend:
cgeorges/tradingboard-frontend:latest - 🔧 Backend:
cgeorges/tradingboard-backend:latest
Setup Requirements:
-
Create Docker Hub Access Token:
- Go to Docker Hub → Account Settings → Security
- Click "New Access Token"
- Copy the generated token
-
Add GitHub Secrets:
- Go to your GitHub repo → Settings → Secrets and variables → Actions
- Add these repository secrets:
DOCKERHUB_USERNAME:cgeorgesDOCKERHUB_TOKEN: (your Docker Hub access token)
-
Trigger Build:
- Push/merge to main branch
- Or manually trigger via Actions tab
What happens automatically:
- ✅ Builds multi-platform images (amd64, arm64) for both frontend and backend
- ✅ Pushes to Docker Hub with latest and SHA tags
- ✅ Updates Docker Hub descriptions from README
- ✅ Uses build cache for faster builds
- ✅ Separate caching for frontend and backend
Production Deployment:
Use the production compose file with published images:
# Quick production deployment with script
./deploy.sh prod # Linux/macOS
.\deploy.ps1 prod # Windows PowerShell
# Manual production deployment
cp .env.example .env.prod
# Edit .env.prod with your production configuration
docker-compose -f docker-compose.prod.yml --env-file .env.prod up -d
# Or pull latest images manually
docker pull cgeorges/tradingboard-frontend:latest
docker pull cgeorges/tradingboard-backend:latestDeployment Script Features:
- ✅ Environment validation (dev/prod)
- ✅ Automatic .env file creation
- ✅ Health checks after deployment
- ✅ Cross-platform support (Linux/macOS/Windows)
- ✅ Image pulling for production
- ✅ Service status reporting
Manual Publishing (if needed):
TradingBoard now uses PostgreSQL for persistent data storage, replacing the previous IndexedDB implementation.
- watchlists: Stores user watchlists with symbols and settings
- alerts: Market alerts and notifications (future feature)
If you're upgrading from a previous version that used IndexedDB:
- Your old watchlist data was stored locally in the browser
- The new PostgreSQL setup will start with default watchlists
- You can manually recreate your watchlists in the new system
- Future versions may include an import tool for migration
- Watchlists: Stored in PostgreSQL with automatic timestamps
- User Preferences: Stored in PostgreSQL (extensible schema)
- Market Data: Cached in memory, not persisted (real-time)
- Alerts: Future feature, will use PostgreSQL
Create a .env file in the root directory:
# Database Configuration (Required)
DB_HOST=localhost
DB_PORT=5432
DB_NAME=tradingboard
DB_USER=tradingboard_user
DB_PASSWORD=tradingboard_password
# Polygon.io API Key for real-time stock data and news
# Get your free API key at: https://polygon.io/
VITE_POLYGON_API_KEY=your_polygon_api_key_here
# OpenAI API Key for agent-forge AI summarization (optional)
# Get your API key at: https://platform.openai.com/api-keys
VITE_OPENAI_API_KEY=your_openai_api_key_here
# WebSocket URL for real-time data (optional - for premium providers)
# Examples: wss://socket.polygon.io/stocks, wss://ws.finnhub.io
VITE_WS_URL=wss://your-websocket-url.com
# Generic API key for other data providers (optional)
VITE_API_KEY=your_other_api_key_hereThe application now uses real market data APIs:
- Polygon.io - Real-time quotes, historical data, and news (primary)
- IEX Cloud - Financial data and news
- Fallback Mode - Enhanced demo data when APIs are unavailable
Real data is now enabled by default! Set your VITE_ALPHA_VANTAGE_API_KEY to get live market data.
- Get Polygon.io API Key (free): https://polygon.io/
- Create
.envfile with your API key - Run the application - it will automatically fetch real market data
- Rate Limits: Free tier allows 5 API calls per minute, 500 per day
-
Watchlist Management
- Switch between preset watchlists (My Watchlist, High Volatility)
- Add new symbols using the input field
- Remove symbols by clicking the minus icon
- Search existing symbols
-
Chart Analysis
- Click any symbol in watchlist to view charts
- Switch timeframes using the buttons (1M, 5M, 15M, etc.)
- Toggle technical indicators (VWAP, EMA20, EMA50)
- View volume data in the lower chart
-
News Monitoring
- Filter news by category or sentiment
- Click the sparkle icon for AI summarization
- Expand articles for full content
- Open original articles in new tabs
The dashboard now includes agent-forge framework integration for enhanced news analysis:
- Enhanced News Analysis Service: Advanced sentiment analysis and key point extraction
- Trading Signal Detection: Identifies bullish/bearish catalysts and market impact
- Smart Summarization: Context-aware summaries for trading decisions
- Agent-Forge Ready: Framework integrated and ready for LLM-powered agents
// News analysis is automatically triggered
const analysis = await newsAnalysisService.analyzeNews(newsItem);
// Returns: {
// summary: "AI-generated trading-focused summary",
// sentiment: "positive" | "negative" | "neutral",
// keyPoints: ["Key insight 1", "Key insight 2"],
// marketImpact: "high" | "medium" | "low",
// tradingSignals: ["Bullish earnings beat", "Analyst upgrade"]
// }The newsAnalysisService can be easily replaced with full agent-forge AI agents:
// TODO: Replace with agent-forge implementation
// const newsAgent = new TradingNewsAgent();
// await newsAgent.summarizeNews(newsItem);src/
├── components/ # React components
│ ├── Header.tsx # Status and title bar
│ ├── Watchlist.tsx # Stock list and management
│ ├── ChartPanel.tsx # Charts and indicators
│ └── NewsPanel.tsx # News feed and filtering
├── services/ # Business logic
│ └── marketDataService.ts # WebSocket and API calls
├── store/ # State management
│ └── marketStore.ts # Zustand store
├── types/ # TypeScript definitions
│ └── market.ts # Data interfaces
└── index.css # Global styles and theme
- Real-time Updates: 1-second price refresh rate
- Chart Rendering: Optimized with virtualization
- Memory Management: Automatic cleanup and limits
- WebSocket: Auto-reconnection with exponential backoff
- Environment variable protection
- CORS handling for API requests
- Secure WebSocket connections (WSS)
- Input validation and sanitization
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Real-time options chain data
- Advanced technical analysis tools
- Portfolio optimization algorithms
- Machine learning price predictions
- Mobile companion app
- Multi-asset support (crypto, forex, commodities)
TradingBoard - Your command center for professional trading decisions.