mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-10-12 04:54:45 +00:00
Vue 3 + TypeScript + Pinia + Tailwind v4 + shadcn-vue + Chart.js admin panel source under webui/, built with Vite. Views: Overview (providers, redis/cache/retry status, model aliases), Usage (per-user/per-group/total tables with tokensIn/tokensOut/cost + limits), Charts (scope selector, req/tokens(stacked in-out)/cost metric tabs, 24h/30d/12mo window switcher, fed by GET /admin/api/usage/history). Pinia stores: auth (sessionStorage key gate, x-api-key header, 401/403 re-prompt), dashboard (5s poll), history (fetch-on-selection + 30s refresh). Design: deliberate neutral warm-neutral palette with a signature teal accent (no default Inter/purple-gradient/glassmorphism), real typographic hierarchy via the platform UI/mono font stacks (zero external assets - no Google Fonts), dark+light via prefers-color-scheme (no class toggle, no theme switcher). Charts: zero-based bars, honest axes, Okabe-Ito colorblind-safe series, tokens-in/out as a distinguishable stacked pair. vite.config.ts: base '/admin/' (matches admin.go's route layout) and build.modulePreload.polyfill:false (no inline bootstrap script, so the tightened admin CSP needs no 'unsafe-inline'). Code-split: Chart.js (ChartsView) loads lazily, not in the initial bundle. generate.mjs reads dist/ after `vite build` and writes ../admin_assets_gen.go (not committed by this change) - base64-encodes every asset, decoded once at package-var init; documented rationale in the script's own header comment. Hygiene: webui/go.mod walls webui/ off from the repo root's `go build`/ `vet`/`test ./...` (npm's node_modules bundles a stray .go file that would otherwise be swept in); tools/yaegi-check/main.go excludes webui/ from its GOPATH copy for the same reason. webui/ export-ignored (.gitattributes) from release source tarballs; webui/node_modules/ gitignored. tsconfig.app.json/tsconfig.node.json's JSONC comments dropped (TS itself is fine with either; the global pre-commit JSON validator is not) - no config values changed.
33 lines
1.7 KiB
Plaintext
33 lines
1.7 KiB
Plaintext
# export-ignore controls what `git archive` leaves out of the tree it
|
|
# packs. GoReleaser's `source:` block runs `git archive` under the hood
|
|
# (.goreleaser.yaml), so these entries are the actual filter for the
|
|
# release source tarball — not the archive block's own file globs, which
|
|
# have no negation syntax and cannot exclude anything.
|
|
# WARNING (v0.2 final review wave, 2026-08-20): vendor/ is safe to
|
|
# export-ignore ONLY because every current go.mod dependency
|
|
# (github.com/stretchr/testify, its go.yaml.in/yaml/v3 indirect) is a
|
|
# TEST-only dependency, imported solely by *_test.go files — which are
|
|
# themselves export-ignored below, so the released tarball never contains
|
|
# code that imports them and never needs vendor/ to build. go.mod itself
|
|
# is NOT export-ignored and ships in every release tarball as-is. The
|
|
# moment any non-test .go file (production code, not *_test.go) imports a
|
|
# third-party package, this line MUST be removed: otherwise the tarball
|
|
# ships a go.mod requiring a module its own vendor/ was stripped out of,
|
|
# and the extracted source cannot build standalone.
|
|
vendor/ export-ignore
|
|
integration/ export-ignore
|
|
tools/ export-ignore
|
|
docs/ export-ignore
|
|
examples/ export-ignore
|
|
testdata/ export-ignore
|
|
.superpowers/ export-ignore
|
|
.github/ export-ignore
|
|
*_test.go export-ignore
|
|
.gitattributes export-ignore
|
|
# webui/ is the Vue admin panel's SOURCE (Vite/npm project) — CI and a
|
|
# release build never need node: admin_assets_gen.go (repo root, `make
|
|
# admin-ui`'s committed output) is the only artifact the plugin build
|
|
# actually depends on, exactly like vendor/ above is safe to drop because
|
|
# nothing at the repo root imports it directly.
|
|
webui/ export-ignore
|