feat: initial Honcho UI scaffold

React 19 + Vite 8 + TanStack Router SPA for browsing and chatting with
a self-hosted Honcho instance. Configurable base URL stored in localStorage
only. Dark/light theme, framer-motion animations, lucide-react icons.
This commit is contained in:
Offending Commit
2026-04-24 21:30:48 -05:00
commit 8eff34b3c6
53 changed files with 15366 additions and 0 deletions

24
src/api/client.ts Normal file
View File

@@ -0,0 +1,24 @@
import createClient from "openapi-fetch";
import type { paths } from "./schema.d.ts";
import { loadConfig } from "@/lib/config";
export function createHonchoClient() {
const config = loadConfig();
const baseUrl = config?.baseUrl ?? "http://localhost:8000";
const token = config?.token ?? "";
const headers: Record<string, string> = {
"Content-Type": "application/json",
};
if (token) {
headers["Authorization"] = `Bearer ${token}`;
}
return createClient<paths>({ baseUrl, headers });
}
export const client = {
get current() {
return createHonchoClient();
},
};