@echo off
echo ==================================================
echo   Layerfive Calibration Certificate System
echo ==================================================

where node >nul 2>nul
if %errorlevel% neq 0 (
    echo ERROR: Node.js is not installed.
    echo Download from: https://nodejs.org
    pause
    exit /b 1
)

if not exist node_modules (
    echo Installing dependencies...
    npm install
)

if not exist .env (
    copy .env.example .env
    echo Created .env from .env.example
    echo Edit .env to configure SMTP email settings.
)

echo.
echo Starting server...
echo Access the app at: http://localhost:3000
echo Default admin: admin@layerfiveltd.com / Admin@123
echo.
npm start
pause
