#!/usr/bin/env bash set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" echo "[dev] starting backend..." ( cd "$ROOT_DIR/backend" if [ ! -f ".env" ]; then cp .env.example .env; fi python -m venv .venv >/dev/null 2>&1 || true source .venv/bin/activate pip install -q -r requirements.txt python -m uvicorn app.main:app --reload --host 0.0.0.0 --port 8000 ) & BACK_PID=$! cleanup() { echo echo "[dev] stopping..." kill $BACK_PID >/dev/null 2>&1 || true } trap cleanup EXIT echo "[dev] starting frontend..." ( cd "$ROOT_DIR/frontend" if [ ! -f ".env.local" ]; then cp .env.example .env.local; fi npm install >/dev/null npm run dev )