xithead 1.4.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +108 -72
  2. package/app/api/config/route.ts +22 -0
  3. package/app/api/export/route.ts +83 -0
  4. package/app/api/models/route.ts +12 -0
  5. package/app/api/stats/route.ts +46 -0
  6. package/app/dashboard/page.tsx +445 -0
  7. package/app/globals.css +35 -0
  8. package/app/installation/page.tsx +293 -0
  9. package/app/layout.tsx +35 -0
  10. package/app/master-design-system.css +2076 -0
  11. package/app/master-design-system.source.css +8 -0
  12. package/app/page.tsx +187 -0
  13. package/app/rechtliches/agb/page.tsx +165 -0
  14. package/app/rechtliches/datenschutz/page.tsx +128 -0
  15. package/app/rechtliches/impressum/page.tsx +122 -0
  16. package/app/rechtliches/widerruf/page.tsx +185 -0
  17. package/bin/xithead.js +264 -0
  18. package/components/layout/AppShell.tsx +25 -0
  19. package/components/layout/Footer.tsx +120 -0
  20. package/components/layout/Header.tsx +145 -0
  21. package/components/marketing/LegalHighlights.tsx +45 -0
  22. package/components/marketing/LegalPageShell.tsx +49 -0
  23. package/components/marketing/LegalPanel.tsx +41 -0
  24. package/components/marketing/index.ts +3 -0
  25. package/design-system/README.md +80 -0
  26. package/design-system/base.css +127 -0
  27. package/design-system/components.css +1943 -0
  28. package/design-system/fonts.css +17 -0
  29. package/design-system/tailwind-preset.js +95 -0
  30. package/design-system/tokens.css +48 -0
  31. package/design-system/utilities.css +53 -0
  32. package/lib/config/index.ts +12 -0
  33. package/lib/hooks/index.ts +4 -0
  34. package/lib/hooks/use-mounted.ts +13 -0
  35. package/lib/hooks/use-session.ts +34 -0
  36. package/lib/hooks/use-settings.ts +49 -0
  37. package/lib/utils/index.ts +1 -0
  38. package/lib/utils/settings.ts +162 -0
  39. package/lib/utils/utils.ts +6 -0
  40. package/middleware.ts +26 -0
  41. package/next-env.d.ts +7 -0
  42. package/next.config.ts +12 -0
  43. package/package.json +77 -36
  44. package/postcss.config.mjs +7 -0
  45. package/public/apple-touch-icon.png +0 -0
  46. package/public/logo-transparent.png +0 -0
  47. package/public/xithead.ps1 +937 -0
  48. package/scripts/README.md +77 -0
  49. package/scripts/audit_wheel_glibc_symbols.py +217 -0
  50. package/scripts/build-master-design-system.cjs +33 -0
  51. package/scripts/build_rust_extension.sh +58 -0
  52. package/scripts/changelog-gen.py +203 -0
  53. package/scripts/eval_output_shaper.py +235 -0
  54. package/scripts/export_kompress_v2_onnx.py +267 -0
  55. package/scripts/fixtures/anthropic_replay_body.json +133 -0
  56. package/scripts/fixtures/codex_response_create_frame.json +52 -0
  57. package/scripts/install-git-hooks.sh +104 -0
  58. package/scripts/install.ps1 +1809 -0
  59. package/scripts/install.sh +1673 -0
  60. package/scripts/pr-governance.py +297 -0
  61. package/scripts/record_fixtures.py +59 -0
  62. package/scripts/refresh_model_limits.sh +48 -0
  63. package/scripts/replay_codex_ws_load.py +445 -0
  64. package/scripts/repro_codex_replay.py +699 -0
  65. package/scripts/smoke_issue_327.py +233 -0
  66. package/scripts/sync-plugin-versions.py +116 -0
  67. package/scripts/tests/test_changelog_gen.py +302 -0
  68. package/scripts/tests/test_pr_governance.py +163 -0
  69. package/scripts/tests/test_pr_health_labels.py +94 -0
  70. package/scripts/tests/test_pr_health_workflow.py +14 -0
  71. package/scripts/tests/test_sync_plugin_versions.py +131 -0
  72. package/scripts/tests/test_version_sync.py +291 -0
  73. package/scripts/validate-workflows.sh +39 -0
  74. package/scripts/verify-versions.py +106 -0
  75. package/scripts/version-sync.py +207 -0
  76. package/tailwind.config.js +31 -0
  77. package/tailwind.master.config.cjs +47 -0
  78. package/tsconfig.json +84 -0
  79. package/types/api.ts +12 -0
  80. package/types/config.ts +9 -0
  81. package/types/index.ts +2 -0
  82. package/npm/bin/xithead.js +0 -366
  83. package/npm/index.d.ts +0 -57
  84. package/npm/index.js +0 -139
  85. package/npm/package.json +0 -54
  86. package/npm/postinstall.js +0 -43
@@ -0,0 +1,293 @@
1
+ "use client";
2
+ import { useState } from "react";
3
+ import Link from "next/link";
4
+ import { config } from "@/lib/config/index";
5
+
6
+ type OS = "windows" | "macos" | "linux";
7
+
8
+ function CodeBlock({ children, label }: { children: React.ReactNode; label?: string }) {
9
+ const [copied, setCopied] = useState(false);
10
+ const text = typeof children === "string" ? children : "";
11
+ const copy = () => {
12
+ if (text) { navigator.clipboard.writeText(text); setCopied(true); setTimeout(() => setCopied(false), 2000); }
13
+ };
14
+ return (
15
+ <div style={{ marginBottom: "1rem" }}>
16
+ {label && <div className="tab-label">{label}</div>}
17
+ <div style={{ position: "relative" }}>
18
+ <div className="code-block" style={{ paddingRight: "3.5rem" }}>{children}</div>
19
+ {text && (
20
+ <button onClick={copy} style={{ position: "absolute", top: "0.65rem", right: "0.75rem", background: "var(--surface2)", border: "1px solid var(--border2)", borderRadius: 6, padding: "0.3rem 0.65rem", fontSize: "0.72rem", color: copied ? "hsl(var(--accent))" : "var(--muted)", cursor: "pointer", transition: "all 0.15s" }}>
21
+ {copied ? "✓" : "Copy"}
22
+ </button>
23
+ )}
24
+ </div>
25
+ </div>
26
+ );
27
+ }
28
+
29
+ function Step({ n, title, children }: { n: number; title: string; children: React.ReactNode }) {
30
+ return (
31
+ <div style={{ display: "flex", gap: "1.5rem", marginBottom: "2.5rem" }}>
32
+ <div style={{ flexShrink: 0, width: 36, height: 36, borderRadius: "50%", background: "hsl(var(--primary) / 0.1)", border: "1px solid hsl(var(--primary) / 0.25)", display: "flex", alignItems: "center", justifyContent: "center", color: "hsl(var(--primary))", fontWeight: 800, fontSize: "0.9rem" }}>{n}</div>
33
+ <div style={{ flex: 1 }}>
34
+ <h3 style={{ fontWeight: 700, marginBottom: "0.85rem", fontSize: "1.05rem" }}>{title}</h3>
35
+ {children}
36
+ </div>
37
+ </div>
38
+ );
39
+ }
40
+
41
+ function Alert({ type, children }: { type: "info" | "warn" | "success"; children: React.ReactNode }) {
42
+ const cfg = {
43
+ info: { bg: "hsl(var(--primary) / 0.06)", border: "hsl(var(--primary) / 0.2)", icon: "ℹ️" },
44
+ warn: { bg: "rgba(255,214,0,0.06)", border: "rgba(255,214,0,0.2)", icon: "⚠️" },
45
+ success: { bg: "hsl(var(--accent) / 0.06)", border: "hsl(var(--accent) / 0.2)", icon: "✅" },
46
+ }[type];
47
+ return (
48
+ <div style={{ background: cfg.bg, border: `1px solid ${cfg.border}`, borderRadius: 9, padding: "0.9rem 1.2rem", marginBottom: "1rem", fontSize: "0.88rem", color: "var(--text2)", lineHeight: 1.65, display: "flex", gap: "0.65rem" }}>
49
+ <span>{cfg.icon}</span>
50
+ <span>{children}</span>
51
+ </div>
52
+ );
53
+ }
54
+
55
+ const OS_TABS: { id: OS; label: string; icon: string }[] = [
56
+ { id: "windows", label: "Windows", icon: "🪟" },
57
+ { id: "macos", label: "macOS", icon: "🍎" },
58
+ { id: "linux", label: "Linux", icon: "🐧" },
59
+ ];
60
+
61
+ export default function Installation() {
62
+ const [os, setOs] = useState<OS>("windows");
63
+
64
+ return (
65
+ <>
66
+ {/* Page header */}
67
+ <section style={{ background: "var(--bg2)", borderBottom: "1px solid var(--border)", padding: "3rem 0" }}>
68
+ <div className="box">
69
+ <div style={{ fontSize: "0.75rem", color: "hsl(var(--primary))", fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.1em", marginBottom: "0.75rem" }}>Einrichtung</div>
70
+ <h1 style={{ fontSize: "clamp(1.85rem,4vw,3rem)", fontWeight: 900, letterSpacing: "-0.02em", marginBottom: "0.75rem" }}>Installationsanleitung</h1>
71
+ <p style={{ color: "var(--text2)", fontSize: "1rem", maxWidth: 560 }}>
72
+ xtream-head läuft <strong style={{ color: "var(--text)" }}>lokal auf deinem PC</strong> — kein externer Server, keine geteilten Daten. Wähle dein Betriebssystem und folge den Schritten.
73
+ </p>
74
+ </div>
75
+ </section>
76
+
77
+ <section className="section">
78
+ <div className="box" style={{ display: "grid", gridTemplateColumns: "220px 1fr", gap: "3rem", alignItems: "start" }}>
79
+ {/* Sidebar nav */}
80
+ <aside style={{ position: "sticky", top: 80 }}>
81
+ <div style={{ fontSize: "0.72rem", color: "var(--muted)", textTransform: "uppercase", letterSpacing: "0.07em", marginBottom: "0.75rem", fontWeight: 700 }}>Betriebssystem</div>
82
+ {OS_TABS.map(t => (
83
+ <button key={t.id} onClick={() => setOs(t.id)} style={{ display: "flex", alignItems: "center", gap: "0.6rem", width: "100%", padding: "0.6rem 0.9rem", borderRadius: 8, border: "none", cursor: "pointer", background: os === t.id ? "hsl(var(--primary) / 0.1)" : "transparent", color: os === t.id ? "hsl(var(--primary))" : "var(--text2)", fontWeight: os === t.id ? 700 : 400, fontSize: "0.9rem", marginBottom: "0.25rem", textAlign: "left", borderLeft: os === t.id ? "2px solid hsl(var(--primary))" : "2px solid transparent" }}>
84
+ <span>{t.icon}</span> {t.label}
85
+ </button>
86
+ ))}
87
+ <div style={{ marginTop: "2rem", padding: "1rem", background: "var(--surface)", border: "1px solid var(--border)", borderRadius: 10 }}>
88
+ <div style={{ fontSize: "0.72rem", color: "var(--muted)", fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.07em", marginBottom: "0.65rem" }}>Schnellzugriff</div>
89
+ {[
90
+ { href: "#voraussetzungen", label: "Voraussetzungen" },
91
+ { href: "#einrichten", label: "Einrichten" },
92
+ { href: "#befehle", label: "Befehle" },
93
+ { href: "#dashboard", label: "Dashboard" },
94
+ { href: "#fehlerbehebung", label: "Fehlerbehebung" },
95
+ ].map(({ href, label }) => (
96
+ <a key={href} href={href} style={{ display: "block", fontSize: "0.82rem", color: "var(--text2)", padding: "0.3rem 0", lineHeight: 1.5 }}>{label}</a>
97
+ ))}
98
+ </div>
99
+ </aside>
100
+
101
+ {/* Content */}
102
+ <div>
103
+ {/* Windows */}
104
+ {os === "windows" && (
105
+ <div>
106
+ <h2 style={{ fontSize: "1.5rem", fontWeight: 800, marginBottom: "0.5rem" }}>🪟 Windows — PowerShell</h2>
107
+ <p style={{ color: "var(--text2)", marginBottom: "2.5rem", fontSize: "0.9rem" }}>Getestet mit Windows 10/11 und PowerShell 5.1+</p>
108
+
109
+ <div id="voraussetzungen" style={{ marginBottom: "2rem" }}>
110
+ <h3 style={{ fontWeight: 700, marginBottom: "1rem", fontSize: "1.1rem", color: "var(--text2)" }}>Voraussetzungen</h3>
111
+ <div style={{ background: "var(--surface)", border: "1px solid var(--border)", borderRadius: 10, padding: "1rem 1.5rem", fontSize: "0.88rem" }}>
112
+ {[
113
+ { item: "Windows 10 / 11", hint: "PowerShell 5.1+" },
114
+ { item: "Anthropic API Key", hint: "console.anthropic.com" },
115
+ { item: "Internetverbindung", hint: "für Installer & API" },
116
+ ].map(({ item, hint }) => (
117
+ <div key={item} style={{ display: "flex", justifyContent: "space-between", padding: "0.45rem 0", borderBottom: "1px solid var(--border)", alignItems: "center" }}>
118
+ <span style={{ display: "flex", gap: "0.5rem", alignItems: "center" }}>
119
+ <span style={{ color: "hsl(var(--accent))" }}>✓</span> {item}
120
+ </span>
121
+ <code style={{ color: "var(--muted)", fontSize: "0.78rem" }}>{hint}</code>
122
+ </div>
123
+ ))}
124
+ </div>
125
+ <Alert type="info">
126
+ Der Installer richtet automatisch ein: Python, Node.js, Claude Code und den xtream-head Proxy. Du musst nichts manuell installieren.
127
+ </Alert>
128
+ </div>
129
+
130
+ <div id="einrichten">
131
+ <Step n={1} title="PowerShell als Administrator öffnen & Installer ausführen">
132
+ <CodeBlock label="PowerShell">{`iex (irm https://xtream-head.com/xithead.ps1)`}</CodeBlock>
133
+ <p style={{ color: "var(--text2)", fontSize: "0.88rem", marginTop: "0.5rem" }}>Der Installer läuft vollautomatisch und richtet alle Abhängigkeiten ein.</p>
134
+ </Step>
135
+ <Step n={2} title="Anthropic API Key eingeben">
136
+ <p style={{ color: "var(--text2)", fontSize: "0.88rem", marginBottom: "0.75rem" }}>
137
+ Du wirst nach deinem Anthropic API Key gefragt. Den Key findest du unter{" "}
138
+ <a href="https://console.anthropic.com" target="_blank" rel="noopener" style={{ color: "hsl(var(--primary))" }}>console.anthropic.com</a>.
139
+ </p>
140
+ <Alert type="warn">Schließe das Terminal nach der Installation nicht — es erscheint eine Erfolgsmeldung wenn alles bereit ist.</Alert>
141
+ </Step>
142
+ <Step n={3} title="xtream-head starten">
143
+ <p style={{ color: "var(--text2)", fontSize: "0.88rem", marginBottom: "0.75rem" }}>Nach der Installation steht der Befehl <code style={{ color: "hsl(var(--primary))" }}>xtream-head</code> in jedem neuen Terminal zur Verfügung:</p>
144
+ <CodeBlock label="PowerShell">{`xtream-head`}</CodeBlock>
145
+ <Alert type="success">Proxy läuft auf localhost:8787 — Claude Code ist automatisch verbunden.</Alert>
146
+ </Step>
147
+ </div>
148
+ </div>
149
+ )}
150
+
151
+ {/* macOS */}
152
+ {os === "macos" && (
153
+ <div>
154
+ <h2 style={{ fontSize: "1.5rem", fontWeight: 800, marginBottom: "0.5rem" }}>🍎 macOS — Terminal</h2>
155
+ <p style={{ color: "var(--text2)", marginBottom: "2.5rem", fontSize: "0.9rem" }}>Getestet mit macOS 13 Ventura+ (Intel & Apple Silicon)</p>
156
+
157
+ <div id="voraussetzungen" style={{ marginBottom: "2rem" }}>
158
+ <h3 style={{ fontWeight: 700, marginBottom: "1rem", fontSize: "1.1rem", color: "var(--text2)" }}>Voraussetzungen</h3>
159
+ <CodeBlock label="Terminal — Homebrew installieren (falls fehlt)">{`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`}</CodeBlock>
160
+ <CodeBlock label="Terminal — Node.js & Python installieren">{`brew install node python`}</CodeBlock>
161
+ </div>
162
+
163
+ <div id="einrichten">
164
+ <Step n={1} title="xithead npm-Paket global installieren">
165
+ <CodeBlock label="Terminal">{`npm install -g xtream-head`}</CodeBlock>
166
+ </Step>
167
+ <Step n={2} title="xithead Python-Proxy installieren">
168
+ <CodeBlock label="Terminal">{`pip install "xithead[proxy]"`}</CodeBlock>
169
+ </Step>
170
+ <Step n={3} title="Claude Code installieren (falls noch nicht vorhanden)">
171
+ <CodeBlock label="Terminal">{`npm install -g @anthropic-ai/claude-code`}</CodeBlock>
172
+ </Step>
173
+ <Step n={4} title="xtream-head starten">
174
+ <CodeBlock label="Terminal">{`xithead`}</CodeBlock>
175
+ <Alert type="success">Proxy läuft auf localhost:8787 — Claude Code ist automatisch verbunden.</Alert>
176
+ </Step>
177
+ </div>
178
+ </div>
179
+ )}
180
+
181
+ {/* Linux */}
182
+ {os === "linux" && (
183
+ <div>
184
+ <h2 style={{ fontSize: "1.5rem", fontWeight: 800, marginBottom: "0.5rem" }}>🐧 Linux — Bash</h2>
185
+ <p style={{ color: "var(--text2)", marginBottom: "2.5rem", fontSize: "0.9rem" }}>Ubuntu 22.04+, Debian 12+, Fedora 38+</p>
186
+
187
+ <div id="voraussetzungen" style={{ marginBottom: "2rem" }}>
188
+ <h3 style={{ fontWeight: 700, marginBottom: "1rem", fontSize: "1.1rem", color: "var(--text2)" }}>Voraussetzungen</h3>
189
+ <CodeBlock label="Bash — Node.js via nvm">{`curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
190
+ source ~/.bashrc
191
+ nvm install --lts`}</CodeBlock>
192
+ <CodeBlock label="Bash — Python (falls fehlt)">{`sudo apt install python3 python3-pip # Ubuntu/Debian
193
+ # oder: sudo dnf install python3 python3-pip # Fedora`}</CodeBlock>
194
+ </div>
195
+
196
+ <div id="einrichten">
197
+ <Step n={1} title="xithead npm-Paket global installieren">
198
+ <CodeBlock label="Bash">{`npm install -g xtream-head`}</CodeBlock>
199
+ </Step>
200
+ <Step n={2} title="xithead Python-Proxy installieren">
201
+ <CodeBlock label="Bash">{`pip install "xithead[proxy]"`}</CodeBlock>
202
+ </Step>
203
+ <Step n={3} title="Claude Code installieren (falls noch nicht vorhanden)">
204
+ <CodeBlock label="Bash">{`npm install -g @anthropic-ai/claude-code`}</CodeBlock>
205
+ </Step>
206
+ <Step n={4} title="xtream-head starten">
207
+ <CodeBlock label="Bash">{`xithead`}</CodeBlock>
208
+ <Alert type="success">Proxy läuft auf localhost:8787 — Claude Code ist automatisch verbunden.</Alert>
209
+ </Step>
210
+ </div>
211
+ </div>
212
+ )}
213
+
214
+ {/* Befehle — alle OS */}
215
+ <div id="befehle" style={{ marginBottom: "2.5rem" }}>
216
+ <h3 style={{ fontWeight: 700, marginBottom: "1.25rem", fontSize: "1.1rem" }}>⌨️ Verfügbare Befehle</h3>
217
+ <div style={{ background: "var(--surface)", border: "1px solid var(--border)", borderRadius: 13, overflow: "hidden" }}>
218
+ {[
219
+ { cmd: os === "windows" ? "xtream-head" : "xithead", desc: "Proxy starten + Claude Code öffnen" },
220
+ { cmd: os === "windows" ? "xtream-head-dashboard" : "xithead dashboard", desc: "Dashboard im Browser öffnen (localhost:8787/dashboard)" },
221
+ { cmd: os === "windows" ? "xtream-head-stats" : "xithead stats", desc: "Aktuelle Stats in der Konsole anzeigen" },
222
+ { cmd: os === "windows" ? "xtream-head-stop" : "xithead stop", desc: "Proxy stoppen" },
223
+ ].map(({ cmd, desc }, i, arr) => (
224
+ <div key={cmd} style={{ display: "flex", alignItems: "center", gap: "1.5rem", padding: "0.85rem 1.25rem", borderBottom: i < arr.length - 1 ? "1px solid var(--border)" : "none" }}>
225
+ <code style={{ color: "hsl(var(--primary))", fontSize: "0.88rem", minWidth: 240, flexShrink: 0 }}>{cmd}</code>
226
+ <span style={{ color: "var(--text2)", fontSize: "0.85rem" }}>{desc}</span>
227
+ </div>
228
+ ))}
229
+ </div>
230
+ </div>
231
+
232
+ {/* Dashboard — alle OS */}
233
+ <div id="dashboard" style={{ background: "var(--surface)", border: "1px solid var(--border)", borderRadius: 13, padding: "1.75rem", marginBottom: "2.5rem" }}>
234
+ <h3 style={{ fontWeight: 700, marginBottom: "0.75rem", fontSize: "1.1rem" }}>📊 Dashboard öffnen</h3>
235
+ <p style={{ color: "var(--text2)", fontSize: "0.88rem", marginBottom: "1rem", lineHeight: 1.65 }}>
236
+ Das Live-Dashboard läuft <strong style={{ color: "var(--text)" }}>lokal auf deinem PC</strong> und zeigt Cache-Hit-Rate, Token-Einsparungen, USD gespart und die letzten Anfragen — nur für dich sichtbar.
237
+ </p>
238
+ <div style={{ background: "var(--bg)", border: "1px solid var(--border)", borderRadius: 8, padding: "0.75rem 1.25rem", marginBottom: "1.25rem", display: "flex", alignItems: "center", gap: "0.75rem" }}>
239
+ <span style={{ width: 8, height: 8, borderRadius: "50%", background: "hsl(var(--accent))", display: "inline-block", flexShrink: 0 }} />
240
+ <code style={{ color: "hsl(var(--primary))", fontSize: "0.9rem" }}>localhost:8787/dashboard</code>
241
+ </div>
242
+ <div style={{ display: "flex", gap: "0.75rem", flexWrap: "wrap" }}>
243
+ <a href="http://localhost:8787/dashboard" target="_blank" rel="noopener"
244
+ style={{ background: "hsl(var(--primary))", color: "#000", fontWeight: 700, padding: "0.65rem 1.25rem", borderRadius: 8, fontSize: "0.88rem" }}>
245
+ Dashboard öffnen →
246
+ </a>
247
+ </div>
248
+ </div>
249
+
250
+ {/* Fehlerbehebung */}
251
+ <div id="fehlerbehebung">
252
+ <h3 style={{ fontWeight: 700, marginBottom: "1.5rem", fontSize: "1.1rem" }}>🔧 Fehlerbehebung</h3>
253
+ {[
254
+ {
255
+ q: os === "windows" ? "xtream-head: command not found" : "xithead: command not found",
256
+ a: "Das Paket ist nicht korrekt installiert oder nicht im PATH. Öffne ein neues Terminal und versuche es erneut. Bei Windows: PowerShell-Profil wurde möglicherweise noch nicht geladen.",
257
+ },
258
+ {
259
+ q: "Proxy startet nicht / Port 8787 belegt",
260
+ a: "Ein anderer Prozess nutzt Port 8787. Beende ihn mit: netstat -ano | findstr 8787 (Windows) oder lsof -i :8787 (macOS/Linux), dann kill <PID>.",
261
+ },
262
+ {
263
+ q: "HTTP 401 Unauthorized",
264
+ a: "Dein Anthropic API Key ist ungültig oder abgelaufen. Setze ihn neu: ANTHROPIC_API_KEY=sk-... und starte den Proxy neu.",
265
+ },
266
+ {
267
+ q: "Claude Code verbindet sich nicht mit dem Proxy",
268
+ a: "Der Proxy setzt ANTHROPIC_BASE_URL automatisch. Falls nicht: export ANTHROPIC_BASE_URL=http://localhost:8787 (macOS/Linux) oder $env:ANTHROPIC_BASE_URL='http://localhost:8787' (Windows).",
269
+ },
270
+ {
271
+ q: "Dashboard zeigt 0 Anfragen",
272
+ a: "Der Counter startet bei 0 wenn der Proxy neu gestartet wird. Nach dem ersten claude-Aufruf steigen die Zahlen. Stats werden im RAM gehalten (kein Datenbankzugriff).",
273
+ },
274
+ ].map(({ q, a }) => (
275
+ <div key={q} style={{ marginBottom: "1.25rem", background: "var(--surface)", border: "1px solid var(--border)", borderRadius: 10, padding: "1.1rem 1.4rem" }}>
276
+ <div style={{ fontWeight: 700, fontSize: "0.9rem", marginBottom: "0.45rem", color: "var(--yellow)" }}>Q: {q}</div>
277
+ <div style={{ fontSize: "0.85rem", color: "var(--text2)", lineHeight: 1.65 }}>A: {a}</div>
278
+ </div>
279
+ ))}
280
+
281
+ <Alert type="info">
282
+ Problem nicht aufgeführt?{" "}
283
+ <a href={config.discordUrl} target="_blank" rel="noopener" style={{ color: "hsl(var(--primary))" }}>Discord beitreten</a>{" "}
284
+ oder auf{" "}
285
+ <a href={config.githubUrl + "/issues"} target="_blank" rel="noopener" style={{ color: "hsl(var(--primary))" }}>GitHub ein Issue erstellen</a>.
286
+ </Alert>
287
+ </div>
288
+ </div>
289
+ </div>
290
+ </section>
291
+ </>
292
+ );
293
+ }
package/app/layout.tsx ADDED
@@ -0,0 +1,35 @@
1
+ import type { Metadata } from "next";
2
+ import { Manrope, Space_Grotesk } from "next/font/google";
3
+ import "./globals.css";
4
+ import { AppShell } from "@/components/layout/AppShell";
5
+ import { config } from "@/lib/config/index";
6
+
7
+ const bodyFont = Manrope({ subsets: ["latin"], variable: "--font-body", display: "swap" });
8
+ const displayFont = Space_Grotesk({ subsets: ["latin"], variable: "--font-display", display: "swap" });
9
+
10
+ export const metadata: Metadata = {
11
+ title: { default: `${config.appName} — Claude Code Proxy`, template: `%s · ${config.appName}` },
12
+ description: `Anthropic Prompt Cache maximieren. Token-Kosten bis zu 88% reduzieren. Claude Code Proxy von ${config.companyName}.`,
13
+ metadataBase: new URL(config.appUrl),
14
+ icons: {
15
+ icon: [{ url: config.logoSourceUrl, type: "image/png" }],
16
+ apple: [{ url: "/apple-touch-icon.png", type: "image/png" }],
17
+ },
18
+ openGraph: {
19
+ siteName: config.appName,
20
+ type: "website",
21
+ locale: "de_DE",
22
+ url: config.appUrl,
23
+ images: [{ url: config.logoUrl, width: 1000, height: 1000, alt: config.appName }],
24
+ },
25
+ };
26
+
27
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
28
+ return (
29
+ <html lang="de" className="dark" suppressHydrationWarning>
30
+ <body className={`${bodyFont.variable} ${displayFont.variable} font-body app-safe-area flex flex-col min-h-screen relative`}>
31
+ <AppShell>{children}</AppShell>
32
+ </body>
33
+ </html>
34
+ );
35
+ }