StockSim is a full-stack time-travel trading simulator. It allows users to simulate trading strategies on historical data (Stocks, ETFs, Crypto) with a realistic portfolio management system.
- Frontend: https://stocksim-dev.onrender.com
- Backend API: https://stocksim-log.onrender.com (or similar, check deployment)
- Frontend: Next.js 15 (React, TypeScript, Tailwind CSS)
- Backend: Python FastAPI (Uvicorn, Pydantic)
- Database: PostgreSQL (Neon Serverless)
- Hosting: Render (Web Services)
frontend/: Next.js application (UI, Charts, Dashboard).backend/: FastAPI application (Game Engine, DB Logic, Market Data).data/: CSV files containing historical market data.scripts/: Utilities for data fetching and database maintenance.
- Python 3.9+
- Node.js 18+
- PostgreSQL (Local or Cloud)
See envex.md for details. Create .env in the root and .env.local in frontend/.
# Create virtual env
python -m venv env
source env/bin/activate
# Install dependencies
pip install -r backend/requirements.txt
# Run Server
uvicorn backend.main:app --reloadcd frontend
npm install
npm run devThe app will be available at http://localhost:3000.
We use Neon for the database and Render for hosting. See deploy.md for step-by-step instructions.