site: add Astro frontend — login, register, reset-password, invites, home
Step 8 of the migration plan. Minimal Astro + Tailwind site (no Svelte). Pages: - / (home): post-login card grid, shows Activity/Wiki/Planner cards based on wiki_access / activity_access from /api/me; URLs via PUBLIC_* env vars - /login/: JWT cookie issued on success; ?next= redirect supported - /register/: invite-code flow, auto-fills code from ?code= param - /reset-password/: admin-issued code flow; disables form on success - /invites/: list + generate invites; activity-access toggle for eligible users Base layout: minimal nav with handle + sign-out, auth wall (/api/me check), race-calendar accent palette, dark/light theme tokens.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { defineConfig } from "astro/config";
|
||||
import tailwind from "@astrojs/tailwind";
|
||||
|
||||
const apiPort = process.env.VITE_API_PORT || '4040';
|
||||
|
||||
export default defineConfig({
|
||||
integrations: [tailwind()],
|
||||
devToolbar: { enabled: false },
|
||||
output: "static",
|
||||
vite: {
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: `http://localhost:${apiPort}`,
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user