├── public ├── favicon.ico ├── qrcode.png └── logo.svg ├── .eslintrc.json ├── postcss.config.mjs ├── src ├── lib │ ├── utils.ts │ ├── supabase.ts │ ├── auth.ts │ ├── errors.ts │ └── AIStream.ts ├── app │ ├── layout.tsx │ ├── page.tsx │ ├── [locale] │ │ ├── [name] │ │ │ ├── IFrame.tsx │ │ │ └── page.tsx │ │ ├── layout.tsx │ │ ├── model-judge │ │ │ ├── InputApiKey.tsx │ │ │ └── page.tsx │ │ └── page.tsx │ ├── globals.css │ └── api │ │ └── all-model │ │ └── route.tsx ├── components │ ├── BuyMeACoffee.tsx │ ├── Layout.tsx │ ├── RenderCard.tsx │ ├── ui │ │ ├── label.tsx │ │ ├── textarea.tsx │ │ ├── input.tsx │ │ ├── toaster.tsx │ │ ├── button.tsx │ │ ├── card.tsx │ │ ├── dialog.tsx │ │ ├── form.tsx │ │ ├── toast.tsx │ │ └── select.tsx │ ├── LocaleProvider.tsx │ ├── GoogleOneTapLogin.tsx │ ├── LoginDialog.tsx │ ├── LanguageSwitcher.tsx │ ├── Header.tsx │ ├── Footer.tsx │ ├── MermaidDiagram.tsx │ └── ClientComponent.tsx ├── context │ ├── next-auth-context.tsx │ └── common-context.tsx ├── i18n.ts ├── middleware.ts ├── config │ └── index.ts └── hooks │ └── use-toast.ts ├── next.config.mjs ├── .env.example ├── components.json ├── .gitignore ├── tsconfig.json ├── LICENSE ├── package.json ├── tailwind.config.ts ├── README.md ├── README_EN.md └── messages ├── zh.json └── en.json /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashclub/ModelJudge/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashclub/ModelJudge/HEAD/public/qrcode.png -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next", "next/core-web-vitals", "next/typescript"] 3 | } 4 | -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import "./globals.css"; 2 | 3 | export default function RootLayout({ 4 | children, 5 | }: Readonly<{ 6 | children: React.ReactNode; 7 | }>) { 8 | return <>{children}; 9 | } 10 | -------------------------------------------------------------------------------- /src/app/page.tsx: -------------------------------------------------------------------------------- 1 | import { redirect } from "next/navigation"; 2 | 3 | // This page only renders when the app is built statically (output: 'export') 4 | export default function RootPage() { 5 | redirect("/zh"); 6 | } 7 | -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | import createNextIntlPlugin from 'next-intl/plugin'; 2 | 3 | const withNextIntl = createNextIntlPlugin('./src/i18n.ts'); 4 | 5 | const nextConfig = { 6 | reactStrictMode: false, 7 | swcMinify: true, 8 | }; 9 | 10 | export default withNextIntl(nextConfig); 11 | -------------------------------------------------------------------------------- /src/lib/supabase.ts: -------------------------------------------------------------------------------- 1 | // import { createServerClient } from "@supabase/ssr"; 2 | import { createClient } from "@supabase/supabase-js"; 3 | 4 | import config from "@/config"; 5 | 6 | export const createSupabaseClient = () => { 7 | return createClient( 8 | config.database.supabaseUrl!, 9 | config.database.supabaseServiceKey! 10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | 2 | # SiliconCloud API Key 3 | SILICONFLOW_KEY= 4 | 5 | # 数据库 6 | SUPABASE_URL= 7 | SUPABASE_SERVICE_KEY= 8 | 9 | # 登陆相关: 10 | # 在控制台执行 openssl rand -base64 32 生成 NEXTAUTH_SECRET 11 | NEXTAUTH_SECRET= 12 | 13 | NEXT_PUBLIC_GOOGLE_CLIENT_ID= 14 | GOOGLE_CLIENT_ID= 15 | GOOGLE_CLIENT_SECRET= 16 | 17 | GITHUB_ID= 18 | GITHUB_SECRET= 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/app/[locale]/[name]/IFrame.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | export default function IFrame({ promptInfo }: { promptInfo: string }) { 3 | return ( 4 |