#!/bin/bash set -e echo "Installing wgBill" echo "==================" # Backend echo "" echo "Setting up backend..." cd backend # python3 -> 3.14 on this machine has no prebuilt Pillow wheel yet and # fails building from source (missing jpeg headers); 3.12 has wheels. PYBIN=python3.12 command -v "$PYBIN" >/dev/null 2>&1 || PYBIN=python3 "$PYBIN" -m venv .venv source .venv/bin/activate python -m pip install -r requirements.txt if [ ! -f .env ]; then echo "Creating backend .env from example..." cp .env.example .env fi cd .. # Frontend echo "" echo "Setting up frontend..." cd frontend npm install if [ ! -f .env ]; then echo "Creating frontend .env from example..." cp .env.example .env fi cd .. echo "" echo "==================================" echo "Installation complete!" echo "" echo "Fill in backend/.env (Nextcloud app password, LLM API key) before" echo "first run - see backend/.env.example for what's needed." echo "" echo "To start the application:" echo " ./run.sh" echo "or manually:" echo " Backend: cd backend && source .venv/bin/activate && python run.py" echo " Frontend: cd frontend && npm run dev" echo ""