Grundgerüst für Certain Finance: - Backend: FastAPI + SQLAlchemy + SQLite, Alembic-Migrationen (Batch-Mode), argon2-Passwort-Hashing, server-seitige Sitzungen im Cookie, Erst-Admin, Benutzerverwaltung mit Temporär-Passwort, Einstellungen je Benutzer. - Ein Prozess, ein Port: uvicorn liefert API (/api) und gebautes SPA aus, inkl. SPA-Deeplink-Fallback. - Frontend: React 18 + Vite + JSX, Design-Tokens (Light/Dark), i18n DE/EN, Inline-SVG-Icons (keine Emojis), Login, Passwort-ändern, Dashboard-Platzhalter, Benutzer- und Einstellungsseiten. - Deploy: nativer LXC-Installer + Update-Skript (systemd), env-Vorlage, Doku. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
20 lines
603 B
JavaScript
20 lines
603 B
JavaScript
import { defineConfig } from "vite";
|
||
import react from "@vitejs/plugin-react";
|
||
|
||
// Im Dev-Modus wird /api an das lokale Backend weitergeleitet. Anders als in der
|
||
// Vorlage wird der /api-Präfix NICHT entfernt – das Backend bedient die Routen
|
||
// bewusst unter /api/... (ein Prozess liefert API und SPA gemeinsam aus).
|
||
// In Produktion liefert derselbe FastAPI-Prozess das gebaute Frontend mit aus.
|
||
export default defineConfig({
|
||
plugins: [react()],
|
||
server: {
|
||
port: 5173,
|
||
proxy: {
|
||
"/api": {
|
||
target: "http://localhost:8000",
|
||
changeOrigin: true,
|
||
},
|
||
},
|
||
},
|
||
});
|