- Python 3.10+
- Node.js 18+ (20.19+ recommended)
- Git
git clone https://github.com/jonathan-gut/FitForecast.git
cd FitForecastmacOS/Linux
python3 -m venv .venv
source .venv/bin/activateWindows (PowerShell)
py -m venv .venv
.\.venv\Scripts\Activate.ps1python -m pip install --upgrade pip
pip install -r requirements.txtStart Postgres and create the local database:
brew services start postgresql@16 # macOS (if not running already)
createdb fitforecast
net start postgresql-x64-16 # Windows
ensure psql is in your PATH (Apple Silicon):
echo 'export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH"' >> ~/.zshrc # macOS
source ~/.zshrc
echo 'export PATH="/usr/local/opt/postgresql@16/bin:$PATH"' >> ~/.zshrc # Windows
source ~/.zshrc
check with
psql fitforecast -c "\dt"
Copy the example file and edit as needed:
cp .env.dist .env.env keys used now
- Set
DATABASE_URL=postgresql+psycopg2://<your-username>@localhost:5432/fitforecast
PORT=5050
Replace with your macOS login name
(Other keys in .env.dist like DATABASE_URL, JWT_SECRET_KEY, WEATHER_API_KEY are placeholders for upcoming features.)
Run the backend flask app (as a module)
python -m backend.app Then open:
http://localhost:5050/health
You should see:
{"status":"Flask app working"}Also run/open
curl http://localhost:5050/api/items
You should see:
[]Note: Empty right now because we have nothing in our database
cd frontendnpm installYour React dev server (Vite) runs on http://localhost:5173, and proxies API calls (like /health and /api/...) to the Flask backend on http://localhost:5050.
This is configured in frontend/vite.config.js:
server: {
proxy: {
"/health": "http://localhost:5050",
"/api": "http://localhost:5050"
}
}npm run devThen open:
http://localhost:5173
You should see:
FitForecast
Backend health: ✅ Flask app working