A real-time stock market dashboard built with React, Node.js, and the Finnhub API. This application provides comprehensive stock market data, technical analysis, and portfolio management features.
- π Real-time stock price updates via WebSocket
- π Interactive stock price charts with multiple timeframes
- π± Responsive design for desktop and mobile devices
- π° Latest market news and sentiment analysis
- π Personal watchlist management
- π Technical indicators (RSI, MACD, SMA, EMA)
- πΉ Stock comparison tools
- π Company fundamentals and metrics
- π Stock symbol search functionality
- β‘ Real-time market data updates
- π Price alerts system
- π Historical price data analysis
- React with Vite
- TailwindCSS for styling
- Chart.js for data visualization
- Firebase Authentication
- Axios for API requests
- WebSocket for real-time updates
- Node.js & Express
- WebSocket Server
- Finnhub API integration
- Node-Cache for data caching
- Rate limiting
- CORS configuration
Before you begin, ensure you have the following:
- Node.js (v14 or higher)
- npm or yarn
- A Finnhub API key (get one at Finnhub.io)
- A Firebase project (for authentication)
-
Clone the repository:
git clone https://github.com/yourusername/stock-market-dashboard.git cd stock-market-dashboard or cd metrics
-
Install dependencies for both frontend and backend:
# Install backend dependencies cd metrics/backend npm install # Install frontend dependencies cd ../ npm install
-
Set up environment variables:
Backend (.env in metrics/backend):
FINNHUB_API_KEY=your_finnhub_api_key PORT=5001
Frontend (.env in metrics/):
VITE_API_URL=http://localhost:5001/api VITE_FINNHUB_API_KEY=your_finnhub_api_key VITE_FIREBASE_API_KEY=your_firebase_api_key VITE_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain VITE_FIREBASE_PROJECT_ID=your_firebase_project_id VITE_FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket VITE_FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id VITE_FIREBASE_APP_ID=your_firebase_app_id VITE_FIREBASE_MEASUREMENT_ID=your_firebase_measurement_id
-
Start the backend server:
cd metrics/backend npm run start or node server.js
-
Start the frontend development server:
cd metrics npm run dev
-
Access the application:
- Frontend: http://localhost:5173
- Backend API: http://localhost:5001
- Create a new project on Railway
- Connect your GitHub repository
- Set up the environment variables in Railway dashboard
- Deploy the backend service
- Create a new project on Vercel
- Import your GitHub repository
- Configure the build settings:
- Framework Preset: Vite
- Root Directory: metrics
- Build Command: npm run build
- Output Directory: dist
- Add environment variables in Vercel dashboard
- Deploy the frontend
- Firebase Authentication is used for user management
GET /api/quote/:symbol
- Get real-time stock quoteGET /api/historical/:symbol
- Get historical price dataGET /api/fundamentals/:symbol
- Get company fundamentalsGET /api/market-news
- Get latest market newsGET /api/technical-indicators/:symbol
- Get technical indicators
GET /api/watchlist
- Get user's watchlistPOST /api/watchlist
- Add stock to watchlistDELETE /api/watchlist/:symbol
- Remove stock from watchlist
GET /api/market-sentiment
- Get market sentiment analysisGET /api/market-movers
- Get top market moversPOST /api/compare
- Compare multiple stocks
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Finnhub.io for providing the stock market data API
- Firebase for authentication services
- Chart.js for charting capabilities
- TailwindCSS for styling
For support, email rialparmar007@gmail.com or open an issue in the repository.
- Portfolio tracking and management
- Advanced technical analysis tools
- Mobile app development
- Social features for sharing insights
- Integration with more data providers
- Cryptocurrency market data
- Options trading data
- AI-powered stock predictions