@@ -13,30 +13,24 @@ This project consists of three main components:
1313## Quick Start
1414
1515### Prerequisites
16- - Python 3.8+
17- - Node.js 16+
18- - CPython source repository (for benchmarking)
16+ - Docker Engine 20.10+ and Docker Compose 2.0+
17+ - CPython source repository (for benchmarking with the worker)
1918
2019### Setup & Installation
2120``` bash
22- # Install all dependencies and set up database
23- make setup
21+ # Copy environment config
22+ cp .env.example .env
2423
25- # Or install components separately
26- make install # Install frontend + backend dependencies
27- make init-db # Initialize SQLite database
28- make populate-db # Add mock data for development
24+ # Build and start all services
25+ docker compose -f docker-compose.dev.yml up --build
2926```
3027
3128### Development
32- ``` bash
33- # Start both frontend and backend servers
34- make dev
3529
36- # Or start them individually
37- make dev-frontend # Frontend on http://localhost:9002
38- make dev-backend # Backend API on http://localhost:8000
39- ```
30+ Services start automatically with hot reload:
31+ - Frontend: http://localhost:9002
32+ - Backend API: http://localhost:8000
33+ - API Documentation: http://localhost:8000/api/docs
4034
4135## Development Commands
4236
@@ -46,16 +40,23 @@ npm run lint # Frontend linting (in frontend directory)
4640npm run typecheck # TypeScript type checking
4741```
4842
49- ### Database Management
43+ ### Populating Mock Data
5044``` bash
51- make reset-db # Drop and recreate database with fresh data
52- make populate-db # Add mock benchmark data
45+ docker compose -f docker-compose.dev.yml exec backend python scripts/populate_db.py
5346```
5447
55- ### Production
48+ ### Updating Backend Dependencies
5649``` bash
57- make build # Build frontend for production
58- make clean # Clean up generated files and caches
50+ # Edit backend/requirements.in, then regenerate both lockfiles:
51+ docker run --rm -v " $( pwd) /backend:/app" -w /app python:3.13-slim-bookworm \
52+ sh -c " pip install --quiet pip-tools && \
53+ pip-compile --strip-extras --generate-hashes \
54+ --output-file requirements.txt requirements.in && \
55+ pip-compile --strip-extras --generate-hashes \
56+ --output-file requirements-dev.txt requirements-dev.in"
57+
58+ # Rebuild the backend container:
59+ docker compose -f docker-compose.dev.yml up --build -d backend
5960```
6061
6162## Worker Setup
@@ -91,10 +92,30 @@ memory-tracker benchmark /path/to/cpython HEAD~5..HEAD \
9192
9293``` bash
9394# Development with hot reload
94- docker- compose -f docker-compose.dev.yml up
95+ docker compose -f docker-compose.dev.yml up
9596
9697# Production deployment
97- docker-compose up
98+ docker compose up
99+ ```
100+
101+ ## Local Development (not recommended)
102+
103+ Running services directly on the host is possible but not recommended.
104+ Docker Compose ensures consistent Python/Node versions, database setup,
105+ and dependency isolation across all platforms.
106+
107+ ### Prerequisites
108+ - Python 3.13+
109+ - Node.js 20+
110+
111+ ``` bash
112+ make setup # Install deps, init DB, populate mock data
113+ make dev # Start frontend + backend with hot reload
114+ make test # Run backend tests
115+ make reset-db # Drop and recreate database with fresh data
116+ make populate-db # Populate the DB with mock data
117+ make build # Build frontend for production
118+ make clean # Clean up generated files and caches
98119```
99120
100121## Usage Examples
@@ -130,7 +151,7 @@ memory-tracker benchmark ~/cpython HEAD~10..HEAD \
130151## Contributing
131152
1321531 . Follow the existing code style and conventions
133- 2 . Run tests before committing: ` make test `
154+ 2 . Run tests before committing
1341553 . Use TypeScript for all frontend code
1351564 . Follow the repository patterns for new features
1361575 . Never commit secrets or authentication tokens
0 commit comments