BrownChat
50 |51 | Your Gemini 2.0 Multimodal Live API powered realtime voice chatbot. 52 |
53 | 60 | 61 | GitHub 62 | 63 |├── public
└── og-image.png
├── src
├── app
│ ├── favicon.ico
│ ├── fonts
│ │ ├── GeistVF.woff
│ │ └── GeistMonoVF.woff
│ ├── settings
│ │ └── page.tsx
│ ├── globals.css
│ ├── layout.tsx
│ └── page.tsx
├── types
│ ├── chat.ts
│ ├── next-auth.d.ts
│ └── multimodal-live-types.ts
├── pages
│ └── api
│ │ └── auth
│ │ └── [...nextauth].ts
├── lib
│ ├── utils.ts
│ ├── prisma.ts
│ └── auth.ts
├── components
│ ├── AuthProvider.tsx
│ ├── Footer.tsx
│ ├── icons
│ │ ├── IconMicrophone.tsx
│ │ ├── IconSpinner.tsx
│ │ ├── IconStop.tsx
│ │ ├── GeminiLogo.tsx
│ │ └── BrownChatLogo.tsx
│ ├── ui
│ │ ├── label.tsx
│ │ ├── textarea.tsx
│ │ ├── input.tsx
│ │ ├── tooltip.tsx
│ │ ├── switch.tsx
│ │ ├── avatar.tsx
│ │ ├── button.tsx
│ │ ├── card.tsx
│ │ ├── select.tsx
│ │ └── dropdown-menu.tsx
│ ├── SignInButton.tsx
│ ├── Navbar.tsx
│ ├── Message.tsx
│ ├── SettingsForm.tsx
│ └── Gemini.tsx
├── utils
│ ├── supabase.ts
│ ├── multimodal-live.ts
│ ├── audio-worklets
│ │ └── audio-processing.ts
│ ├── auth.ts
│ ├── audio-recorder.ts
│ ├── audio-streamer.ts
│ └── MultimodalLiveClient.ts
└── styles
│ └── globals.css
├── .env.example
├── postcss.config.mjs
├── README.md
├── next.config.mjs
├── components.json
├── .gitignore
├── .eslintrc.json
├── .editorconfig
├── tsconfig.json
├── prisma
└── schema.prisma
├── package.json
├── tailwind.config.ts
└── LICENSE
/public/og-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sugarforever/brown-chat/main/public/og-image.png
--------------------------------------------------------------------------------
/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sugarforever/brown-chat/main/src/app/favicon.ico
--------------------------------------------------------------------------------
/src/app/fonts/GeistVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sugarforever/brown-chat/main/src/app/fonts/GeistVF.woff
--------------------------------------------------------------------------------
/src/app/fonts/GeistMonoVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sugarforever/brown-chat/main/src/app/fonts/GeistMonoVF.woff
--------------------------------------------------------------------------------
/src/types/chat.ts:
--------------------------------------------------------------------------------
1 | export interface ChatMessage {
2 | content: string;
3 | role: 'assistant' | 'system' | 'tool';
4 | }
5 |
--------------------------------------------------------------------------------
/src/pages/api/auth/[...nextauth].ts:
--------------------------------------------------------------------------------
1 | import NextAuth from "next-auth";
2 | import { authOptions } from "@/lib/auth";
3 |
4 | export default NextAuth(authOptions);
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | GOOGLE_CLIENT_ID=
2 | GOOGLE_CLIENT_SECRET=
3 | NEXTAUTH_URL=http://localhost:3000
4 | NEXTAUTH_SECRET=
5 | DATABASE_URL=postgresql://localhost:5432/example
--------------------------------------------------------------------------------
/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/components/AuthProvider.tsx:
--------------------------------------------------------------------------------
1 | 'use client'
2 |
3 | import { SessionProvider } from "next-auth/react"
4 |
5 | export default function AuthProvider({ children }: { children: React.ReactNode }) {
6 | return
{session.user.name}
22 |余额: {session.user.balance}
23 | 26 |
82 | {children}
83 |
84 | );
85 | },
86 | }}
87 | >
88 | {preprocessContent(message.content)}
89 | 51 | Your Gemini 2.0 Multimodal Live API powered realtime voice chatbot. 52 |
53 | 60 | 61 | GitHub 62 | 63 |