feat: API analytics dashboard with i18n and theme support

Next.js full-stack analytics dashboard for new-api.
- Direct PostgreSQL readonly queries on logs table
- 5 pages: Dashboard, Rankings, Aggregation, Logs, Detail
- Dark/Light/System theme with CSS variables
- Chinese/English i18n (default Chinese)
- Recharts with dual Y-axis for input/output tokens
- Lucide icons + Motion animations
- Docker + docker-compose with external sinobridge network, port 8019
This commit is contained in:
2026-04-02 12:47:50 +08:00
commit b719b358f8
41 changed files with 3430 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
"use client";
import { type ReactNode } from "react";
import { I18nProvider } from "@/lib/i18n";
import { ThemeProvider } from "@/lib/theme";
import { Sidebar } from "@/components/Sidebar";
export function ClientProviders({ children }: { children: ReactNode }) {
return (
<ThemeProvider>
<I18nProvider>
<Sidebar />
<main className="ml-[220px] min-h-screen p-6 lg:p-8">{children}</main>
</I18nProvider>
</ThemeProvider>
);
}