A full-stack trading platform for virtual stock trading, analytics, and financial news sentiment analysis. Built with MongoDB, Express, React (Vite), Node.js (TypeScript), and FastAPI (Python).
- Production: https://trading.anishsarum.dev
- User authentication (JWT, bcrypt password hashing)
- Responsive Material UI dashboard (watchlist, portfolio, price, info, charts)
- Add/remove stocks to watchlist
- View historical price charts
- Virtual trading (buy/sell)
- Semantic analysis of financial news using distilroberta-finetuned-financial-news-sentiment-analysis
- Modular code for strategy builder, analytics, and real-time updates
- Frontend: React (Vite, TypeScript, Material UI)
- Backend: Node.js (Express, TypeScript)
- Python API: FastAPI (semantic analysis, strategies)
- Database: MongoDB
- Caching: Redis
- Containerization: Docker Compose
- All services run in Docker (dev & prod)
- Hot-reloading in development via mounted code
- API routes:
/api/v1/*(Node),/pyapi/api/v1/*(Python) - Production deployment: Google Cloud Compute Engine, nginx reverse proxy, Let's Encrypt SSL
- Passwords hashed with bcrypt
- JWT authentication
- Secrets managed via environment variables
- Node backend:
/api/v1/auth,/api/v1/portfolio,/api/v1/watchlist, etc. - Python backend:
/pyapi/api/v1/stock,/pyapi/api/v1/portfolio/value, etc.
- News fetched from Finnhub
- Sentiment classified using distilroberta-finetuned-financial-news-sentiment-analysis
- Extensible API for news count and sentiment window
Run with hot-reloading, local code volumes, and dev environment variables:
docker compose up --buildThis uses both docker-compose.yml and docker-compose.override.yml for development settings.
If you are running Docker Compose without the override file, you should build the frontend and backend locally first:
./build-all.shThis script will build both the frontend and backend before starting Docker Compose. Make sure to run it from the project root.
For the Python backend, add your Finnhub API key to backend/python/.env (which is gitignored):
FINNHUB_API_KEY=your_finnhub_api_key_hereRun with production settings only:
docker compose -f docker-compose.yml up --build -d- Frontend: http://localhost:3000
- Backend: http://localhost:5001/api/v1
- Python API: http://localhost:8000/pyapi/api/v1
- Production Website: https://trading.anishsarum.dev
Use .env.production and .env.development files in each service directory for environment-specific configuration. Docker Compose and the override file will set the correct variables for each environment.