A real-time stock trading application built with a custom stock matching engine using priority queue.Redis is used to store and update the live order book for high-speed access and real-time performance.The system ensures instant reflection of trades and price changes across the platform.Designed for performance, reliability, and realistic trading experience.
-
Clone the repo:
git clone https://github.com/kd72004/stockstack.git cd stockstack -
Backend:
- Install dependencies:
cd backend && npm install - Set up
.envwith MongoDB and Redis connection strings - Seed the database (optional):
node seedData.js - Start server:
npm start
- Install dependencies:
-
Frontend:
- Install dependencies:
cd frontend && npm install - Start dev server:
npm run dev - Visit http://localhost:5173
- Install dependencies:
- Custom Matching Algorithm:
Designed and implemented my own heap-based matching engine for realistic order execution. - Real-Time Everything:
Order book, trades, and price updates are pushed instantly to all users. - Redis-Powered:
Order book is stored in Redis for speed and multi-server support. - Scalable & Robust:
Built with production-ready patterns for scaling and reliability.
- Kalyani
- This project is for educational/demo purposes and does not handle real money or connect to real exchanges.
- Contributions and feedback are welcome!





