@echo off chcp 65001 >nul setlocal REM =================================================================== REM One-click launcher for the student management system REM REM Since the backend now serves the frontend too, ONE process is enough: REM http://127.0.0.1:8004/ -> admin UI REM http://127.0.0.1:8004/docs -> Swagger REM http://127.0.0.1:8004/api/v1/... -> REST API REM REM Prerequisites: REM 1. MySQL is running and .env points at it REM 2. Tables created: python init_db.py --seed REM =================================================================== set "ROOT=%~dp0" if not exist "%ROOT%student_management_system\.env" ( echo. echo [!] .env not found. echo cd student_management_system echo copy .env.example .env echo then edit DB_USER / DB_PASSWORD inside it. echo. pause exit /b 1 ) echo. echo Starting backend. The admin UI is served by the backend itself, echo so no second process is needed. echo. start "SMS-backend" "%ROOT%student_management_system\run_backend.bat" REM give uvicorn a moment to bind the port before opening the page timeout /t 6 /nobreak >nul echo Opening browser ... start "" "http://127.0.0.1:8004/" echo. echo admin UI : http://127.0.0.1:8004/ echo swagger : http://127.0.0.1:8004/docs echo health : http://127.0.0.1:8004/health echo. echo Close the SMS-backend window to stop the service. echo. pause