Manojdeep Dakavaram (manojdeep.dakavaram@colorado.edu)
Sumanth Sai Prasad (sumanth.saiprasad@colorado.edu)
MockMarket is a comprehensive virtual stock trading platform designed to provide users with a risk-free environment to practice stock trading. The platform simulates real-world trading conditions using real-time market data, allowing users to develop and test trading strategies without financial risk.
✅ Implemented real-time stock price tracking and updates using Alpha Vantage API
✅ Created a secure user authentication system with JWT tokens
✅ Developed a robust portfolio management system with performance tracking
✅ Built an interactive dashboard with real-time analytics and visualizations
✅ Implemented a watchlist system with customizable price alerts
✅ Created a responsive UI that works across desktop and mobile devices
✅ Integrated automated testing and continuous integration pipeline
- Frontend Application
React.js with TypeScript for type safety
Tailwind CSS for responsive design
Recharts for data visualization
React Router for navigation
Context API for state management
- Backend Server
Node.js with Express.js framework
MongoDB for data persistence
JWT for authentication
WebSocket for real-time updates
REST API endpoints
- External Services
Alpha Vantage API for stock market data
MongoDB Atlas for database hosting
- Frontend communicates with backend via RESTful APIs and WebSocket
- Backend fetches real-time stock data from Alpha Vantage
- MongoDB stores user data, portfolios, and trading history
- WebSocket enables real-time price updates and notifications
- JWT ensures secure authentication between frontend and backend
- Frontend Component Testing: Jest was used for unit testing React components to ensure proper rendering and functionality.
- Backend Unit Testing: Mocha and Chai were utilized for backend unit tests, covering core logic such as user authentication, stock trading operations, and portfolio calculations.
- Coverage Reports: Coverage reports were generated for both frontend and backend unit tests to track the extent of code coverage and identify untested parts of the codebase.
- API Endpoint Testing: Supertest was used to validate REST API endpoints, ensuring proper request handling and response formats.
- Component Integration: React Testing Library was employed to test the integration between React components, simulating user interactions and verifying state updates.
- Chrome DevTools for frontend debugging
- VS Code debugger for backend
- Updates stock prices every 5 seconds
- Average API response time < 200ms
- Alpha Vantage API rate limits (25 calls/day on free tier)
- Maximum 100 stocks in watchlist per user
- Historical data limited to 2 years
- No real-time WebSocket market data (polling-based updates)
- Node.js v14+
- MongoDB v4.4+
- npm
- Alpha Vantage API key
- Clone the repository:
git clone https://github.com/cu-csci-4253-datacenter-fall-2024/finalproject-final-project-team-21.git
cd mockmarket- Install dependencies:
cd backend
npm install
cd ../frontend
npm install- Configure environment variables: Backend .env:
PORT=5001
MONGODB_URI=mongodb_uri
JWT_SECRET=jwt_secret
ALPHA_VANTAGE_API_KEY=api_key
NODE_ENV=developmentFrontend .env:
VITE_API_URL=http://localhost:5001- Start the backend:
cd backend
npm run dev- Start the frontend:
cd frontend
npm run devAccess the application at https://mockmarketsimulation.netlify.app/
- Build frontend:
cd frontend
npm run build- Build backend:
cd backend
npm run build- Start production server:
cd backend
npm startcd __tests__
npm test- Alpha Vantage for market data API
- MongoDB Atlas for database hosting
- CU Boulder CSCI 3753 course staff for project guidance
