Initial commit: CarrotAssistant admin console (React + Vite + TS)

This commit is contained in:
2026-07-06 16:10:53 +08:00
commit 08355d3a98
31 changed files with 3439 additions and 0 deletions

20
vite.config.ts Normal file
View File

@@ -0,0 +1,20 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// The admin SPA talks to two backend route groups:
// /admin/* — operator console APIs (login, apps, skills, ...)
// /api/* — end-user Chat API (used by the skill test panel)
// During local dev both are proxied to the Go server on :8080. In the
// docker-compose deployment nginx serves the built assets and proxies the
// same prefixes to the backend container.
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
proxy: {
'/admin': { target: 'http://localhost:8080', changeOrigin: true },
'/api': { target: 'http://localhost:8080', changeOrigin: true },
'/healthz': { target: 'http://localhost:8080', changeOrigin: true },
},
},
})