Repository navigation
Expand file tree
/
Copy pathstart_presentation.bat
More file actions
69 lines (60 loc) · 2.76 KB
/
Copy pathstart_presentation.bat
File metadata and controls
69 lines (60 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@echo off
TITLE TradeVision AI - College Viva & Demo Launcher
COLOR 0B
echo ==============================================================================
echo TRADEVISION AI - ONE-CLICK DEMO LAUNCHER
echo Multi-Modal Equity Intelligence ^& Paper Trading Platform
echo ==============================================================================
echo.
cd /d "%~dp0"
:: 1. Check for Python virtual environment
set PYTHON_EXE=
if exist "%~dp0.venv\Scripts\python.exe" (
set PYTHON_EXE=%~dp0.venv\Scripts\python.exe
) else if exist "%~dp0backend\venv\Scripts\python.exe" (
set PYTHON_EXE=%~dp0backend\venv\Scripts\python.exe
) else (
set PYTHON_EXE=python
)
echo [*] Detected Python environment: %PYTHON_EXE%
:: 2. Launch FastAPI Backend in a separate window
echo [*] Launching FastAPI Backend on http://127.0.0.1:8000 ...
start "TradeVision AI - Backend API" cmd /k "cd /d "%~dp0backend" && "%PYTHON_EXE%" -m uvicorn app.main:app --host 127.0.0.1 --port 8000 --reload"
:: 3. Give backend 2 seconds to initialize
timeout /t 2 /nobreak >nul
:: 4. Prompt for Launch Mode
echo.
echo ==============================================================================
echo Select Frontend Launch Mode:
echo [1] Instant Web (Opens in Chrome IMMEDIATELY in 1 sec) - RECOMMENDED FOR VIVA
echo [2] Flutter Live Dev Server (Web-Server with Hot Reload)
echo [3] Open Swagger API Documentation (127.0.0.1:8000/docs)
echo ==============================================================================
set /p TARGET_CHOICE="Enter selection [1, 2, or 3] (default is 1): "
if "%TARGET_CHOICE%"=="2" (
echo.
echo [*] Launching Flutter Web Server on port 3000...
echo [*] Compiling web bundle in background; opening Chrome automatically...
start "TradeVision AI - Flutter Web Server" cmd /k "cd /d "%~dp0frontend" && call flutter run -d web-server --web-port=3000"
echo [*] Waiting 8 seconds for web server to initialize...
timeout /t 8 /nobreak >nul
start http://localhost:3000
) else if "%TARGET_CHOICE%"=="3" (
echo.
echo [*] Opening API Interactive Documentation...
start http://127.0.0.1:8000/docs
) else (
echo.
echo [*] Starting Instant High-Performance Web Server on port 3000...
start "TradeVision AI - Web Host" cmd /k "cd /d "%~dp0frontend\build\web" && "%PYTHON_EXE%" -m http.server 3000"
timeout /t 1 /nobreak >nul
echo [*] Launching TradeVision AI in Google Chrome...
start http://localhost:3000
)
echo.
echo ==============================================================================
echo [*] TradeVision AI services launched successfully!
echo [*] Backend: http://127.0.0.1:8000
echo [*] Frontend: http://localhost:3000
echo ==============================================================================
pause