StockHub is a full-stack MERN (MongoDB, Express.js, React.js, Node.js) application for real-time stock trading and portfolio tracking. It features a dynamic dashboard and live API integration, designed for seamless monitoring and management of stock investments.
The project is divided into three main folders:
- client – React frontend for the main application interface.
- dashboard – React frontend for the trading dashboard with interactive charts and widgets.
- server – Node.js + Express backend, handling APIs, authentication, and real-time stock data.
- Real-time stock data via live APIs.
- Interactive trading dashboard with portfolio tracking, charts, and watchlists.
- User authentication and secure session management.
- Responsive UI for both desktop and mobile devices.
- Customizable widgets for tracking favorite stocks.
Inspired by popular trading platforms like Zerodha Kite in terms of layout and functionality.
- Frontend: React, CSS, Bootstrap
- Backend: Node.js, Express.js
- Database: MongoDB
- APIs: Live stock market APIs (finnhub.com APIs for prices and niftySensex)
- Others: Axios, JWT for authentication
# Install dependencies
cd server
npm install
cd ../client
npm install
cd ../dashboard
npm install
# Set up environment variables (create a .env file in the server folder)
# MONGO_URI=your_mongodb_uri
# FINNHUB_API_KEY=your_stock_api_key
# JWT_SECRET=your_jwt_secret
# Start server
cd server
npm run dev
# Start client
cd ../client
npm start
# Start dashboard
cd ../dashboard
npm start