# Install pnpm if you don't have it
npm install -g pnpm
# Install all dependencies
pnpm install# Start backend, frontend, and device simulator
pnpm devTerminal 1 - Backend:
cd apps/backend
pnpm dev
# Backend runs on http://localhost:3001Terminal 2 - Frontend:
cd apps/frontend
pnpm dev
# Frontend runs on http://localhost:3000Terminal 3 - Device Simulator (Optional):
cd apps/device-simulator
pnpm dev
# Use keyboard: B=Buy, S=Sell, P=Panic, Q=Quit- Start the backend - The backend will start the price simulator automatically when you start a session
- Open the frontend - Navigate to http://localhost:3000
- Start a session - The frontend will automatically start a session when it loads
- Start trading - Click BUY/SELL buttons or use the device simulator
# Run all tests
pnpm test
# Test specific packages
cd packages/price-simulator && pnpm test
cd packages/trading-engine && pnpm testIf port 3000 or 3001 is already in use:
- Backend: Set
PORT=3002inapps/backend/.env - Frontend: Set port in
apps/frontend/package.jsondev script:next dev -p 3001
Make sure you've run pnpm install in the root directory. The workspace dependencies need to be installed first.
- Ensure the backend is running before starting the frontend
- Check that the WebSocket URL matches your backend port