OtterDisaster is a water-quality monitoring demo with:
- a Flask backend in
backend/that serves anomaly inference endpoints - a React + Vite frontend in
frontend/that queries those endpoints
- Frontend calls
GET /api/healthandPOST /api/predict - During local dev, Vite proxies
/api/*tohttp://127.0.0.1:5000 - Backend also keeps legacy routes (
/health,/predict) for compatibility
cd /home/ermal/Files/Coding/Programming_Files/OtterDisaster
python -m venv .venv
source .venv/bin/activate
pip install -r backend/requirements.txt
python backend/api.pyBackend starts on http://127.0.0.1:5000.
cd /home/ermal/Files/Coding/Programming_Files/OtterDisaster/frontend
npm install
npm run devFrontend starts on Vite's local URL (usually http://127.0.0.1:5173).
curl -s http://127.0.0.1:5000/api/healthcurl -s -X POST http://127.0.0.1:5000/api/predict \
-H 'Content-Type: application/json' \
-d '{"tds":420,"ph":7.2}'- Open the frontend URL in your browser.
- Confirm top status changes from "Connecting to API" to live status.
- Submit TDS/pH values in the dashboard form.
- Verify the "Backend verdict" cards update from the Flask response.