forked from EduCraft/curriculum-project-hub
12628c9233
- scaffold hub/database-admin as SvelteKit 2 + Svelte 5 static SPA
with aurora/glass visual style (paths.base='/database')
- add lib/{api,session,org}.ts + Aurora.svelte component
- add routes: root redirect, /admin login page, /dashboard (OWNER/ADMIN only)
- backend: replace server-rendered HTML routes with /database/config JSON endpoint
- add hub/src/database/static.ts to serve SPA under /database/*
- wire registerDatabaseSpa into plugin.ts
- exempt /database/* from silo rate-limit (same treatment as /admin/*)
- add database:dev + database:build npm scripts; update deploy scripts
- update hub/src/database/README.md
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
18 lines
528 B
TypeScript
18 lines
528 B
TypeScript
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import { defineConfig } from 'vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [tailwindcss(), sveltekit()],
|
|
server: {
|
|
proxy: {
|
|
'/api': 'http://127.0.0.1:8788',
|
|
'/auth': 'http://127.0.0.1:8788',
|
|
// Backend owns the /database/* HTTP surface (login page, dashboard,
|
|
// data routes). Proxy it in dev so those paths hit the real server
|
|
// instead of the SPA fallback.
|
|
'/database': 'http://127.0.0.1:8788',
|
|
},
|
|
},
|
|
});
|