Skip to content

Local Development Guide

Terminal window
./start_local.sh

This will:

Press Ctrl+C to stop both services


Terminal window
cd backend
source .venv/bin/activate
python3 -m uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
Terminal window
cd frontend
npm run dev


  • / - Home/Landing page
  • /login - Login page
  • /dashboard - Interactive Analytics Dashboard
  • /ml-analytics - ML Predictions Dashboard
  • /sace-dashboard - SACE Points Compliance Dashboard

Terminal window
cd backend
source .venv/bin/activate
pip install -r requirements.txt
Terminal window
cd frontend
rm -rf node_modules package-lock.json
npm install

Check .env file in backend directory:

DATABASE_URL=postgresql+asyncpg://user:password@localhost/dbname
Terminal window
# Kill process on port 8000 (backend)
lsof -ti:8000 | xargs kill -9
# Kill process on port 3000 (frontend)
lsof -ti:3000 | xargs kill -9

Terminal window
# Backend logs
tail -f /tmp/mgslg-backend.log
# Frontend logs
tail -f /tmp/mgslg-frontend.log

  • If using start_local.sh: Press Ctrl+C
  • If running manually: Press Ctrl+C in each terminal window

The local database should already be configured. If you need to seed data:

Terminal window
cd backend
source .venv/bin/activate
python3 seed_database.py

Local Environment:

Production (Railway):


Ready to develop! 🚀