feat: embed frontend into backend server with full-stack build pipeline (RCA-20)
The backend now serves the Vue admin UI as static files with SPA fallback, eliminating the need for a separate web server. Dockerfile builds both frontend and backend in a multi-stage pipeline. Added build:web and build:all scripts, updated CI to verify frontend builds, and fixed vitest config to exclude Playwright tests. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -22,6 +22,23 @@ npm test # Run test suite
|
||||
npm run typecheck # Type checking only
|
||||
```
|
||||
|
||||
**Admin panel (frontend):**
|
||||
|
||||
```bash
|
||||
cd web
|
||||
npm install
|
||||
npm run dev # Starts Vite dev server on :5173 (proxies API to backend)
|
||||
```
|
||||
|
||||
The frontend dev server proxies `/api`, `/admin`, `/ws`, and `/health` to `http://localhost:8100`. Start the backend first with `npm run dev` (or adjust the proxy target in `web/vite.config.ts`).
|
||||
|
||||
**Full production build:**
|
||||
|
||||
```bash
|
||||
npm run build:all # Builds backend (tsc) + frontend (vite) → copies to public/
|
||||
npm start # Serves everything on :8080
|
||||
```
|
||||
|
||||
**Extension:**
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user