Updated frontend

This commit is contained in:
sriram
2026-08-12 16:33:39 +05:30
parent d2ac832960
commit dae0b3e0fb
14 changed files with 297 additions and 164 deletions

View File

@@ -9,11 +9,16 @@ is a fast local reference.
## Quick start
### One-click (Windows)
### One command (from the project root)
Double-click **`start_frontend.bat`**. It checks whether the backend is
reachable on port 8000 (just a warning, not a blocker) and starts the
Vite dev server.
```bash
python run_project.py
```
Starts the FastAPI backend, waits until `/api/health` answers, then starts
this Vite dev server - so the API is always up before the UI first calls it.
Use `--frontend-only` to start just Vite against a backend you're already
running yourself.
### Manual
@@ -25,8 +30,11 @@ npm run dev
Open http://localhost:5173 - the Vite dev server proxies `/api/*` to
`http://localhost:8000` automatically (see `vite.config.js`), so make
sure the backend is running there first (`../backend/README.md`,
`../backend/start_backend.bat`).
sure the backend is running there first (see `../backend/README.md`).
Note that Vite binds `localhost` as IPv6 (`[::1]`), which browsers handle
fine. Only relevant if you probe it with a tool pinned to IPv4 - use
`http://[::1]:5173` there, or pass `--host 127.0.0.1`.
If your backend runs somewhere else, set `VITE_API_BASE_URL` in a local
`.env` file (copy `.env.example`) instead of relying on the proxy.