Self-hosted knowledge management for SMEs: a split-screen Markdown editor whose sections an LLM refines while you write, and RAG question answering over the documents that result. FastAPI + Postgres/pgvector on the back, SvelteKit on the front, everything OpenAI-compatible and self-hostable. Squashed into a single commit; the development history stays local. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CA43ZJda8Rbp2hKXNy8f6b
44 lines
1.5 KiB
TypeScript
44 lines
1.5 KiB
TypeScript
import { paraglideVitePlugin } from '@inlang/paraglide-js';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import adapter from '@sveltejs/adapter-node';
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { defineConfig } from 'vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
tailwindcss(),
|
|
paraglideVitePlugin({
|
|
project: './project.inlang',
|
|
outdir: './src/lib/paraglide',
|
|
// Order is the precedence. The account setting wins, because a
|
|
// language a person chose should follow them to every device; the
|
|
// cookie keeps that decision available before /me has answered;
|
|
// the browser's Accept-Language is the first-contact guess; the
|
|
// base locale is the floor. No `url` strategy: Pablan is one
|
|
// installation for one company, so /de/ path prefixes would buy
|
|
// nothing and break every existing link.
|
|
strategy: ['custom-userPreference', 'cookie', 'preferredLanguage', 'baseLocale'],
|
|
// A missing translation must fail the build, never fall back
|
|
// silently to another language (see scripts/check-messages.py).
|
|
experimentalMiddlewareLocaleSplitting: false
|
|
}),
|
|
sveltekit({
|
|
compilerOptions: {
|
|
// Force runes mode for the project, except for libraries. Can be removed in svelte 6.
|
|
runes: ({ filename }) =>
|
|
filename.split(/[/\\]/).includes('node_modules') ? undefined : true
|
|
},
|
|
|
|
adapter: adapter()
|
|
})
|
|
],
|
|
|
|
server: {
|
|
// Dev-only same-origin setup: /api goes to the native FastAPI process.
|
|
// In production the reverse proxy does this (see deploy/).
|
|
proxy: {
|
|
'/api': 'http://localhost:8000'
|
|
}
|
|
}
|
|
});
|