Engineered in just one week, Free3 Chat is a feature-rich, multi-provider chat platform with deep user customization and a pixel-perfect interface based on T3 Chat.
Free3 Chat seamlessly integrates multiple leading AI models, offers robust user management, and delivers a deeply personalized experienceโall wrapped in a fluid, animated UI.
- Token-by-token rendering for a natural, live chat feel.
- Switch on the fly between providers like Google Gemini, Groq (LLaMA, Qwen, etc.), and more.
- Themes: Light & Dark modes, crafted with care.
- Visual Filters: Adjust Hue, Contrast, Saturation in real-time.
- Custom Fonts: Proxima Nova, Inter, Comic Sans, and more.
- Full user auth plus anonymous chat with local-storage history.
- Edit & retry prompts and AI responses instantly.
- Syntax highlighting, copy toggles, and word-wrap options.
- Supabase-backed for logged-in users; localStorage for anonymous users.
- Slick experience on desktop and mobile.
- Server & Client Components
- Hybrid rendering: SSR for static UI, โuse clientโ for interactivity.
- Clean API Routes under
/app/api/for auth, streaming, DB ops, etc.
- ReadableStream pipes tokens directly to the client.
- Provider-Agnostic Abstraction with a
modelMappinglayer. - Atomic DB Writes: Only save once the full stream completes.
// /app/api/chats/[chatId]/messages/[messageId]/stream/route.ts
const stream = new ReadableStream({
async start(controller) {
let fullResponse = '';
for await (const chunk of apiStream) {
const text = provider === 'google'
? chunk.text()
: chunk.choices[0]?.delta?.content ?? '';
if (text) {
fullResponse += text;
controller.enqueue(new TextEncoder().encode(text));
}
}
await supabase
.from('messages')
.update({ content: fullResponse })
.eq('id', messageId);
controller.close();
},
});- PostgreSQL via Supabase for database, auth, and API.
- Schema: UUIDs, foreign keys, indexed for performance.
- Row Level Security: Scaffolded for production-grade isolation.
- Dual User Mode: Authenticated
user_idvs. anonymousanonymous_id.
- Reusable React Components:
ModelPickerModal,CodeBlock,HoldTooltip, etc. - Global State via React Context for theming and fonts.
- Custom Hooks:
useFont,useCopyToClipboard, etc. - Animations with Framer Motion for fluidity.
- CSS Variables in
globals.cssdrive the entire palette. - Live Style Manipulation via sliders on the Settings page.
- Font-Swapping with FontProvider, persisted to
localStorage.
- Node.js v18+
- npm, yarn, or pnpm
- Supabase account (free tier)
- Google Gemini & Groq API keys
- NextAuth secret for sessions
git clone https://github.com/your-username/your-repo-name.git
cd your-repo-name
npm install- Create a new project at Supabase.
- In SQL Editor, run the contents of
db/schema.sql. - Copy your Project URL & anon key.
Create a .env.local in your project root:
NEXT_PUBLIC_SUPABASE_URL=YOUR_SUPABASE_PROJECT_URL
NEXT_PUBLIC_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_PUBLIC_KEY
SUPABASE_SERVICE_ROLE_KEY=YOUR_SUPABASE_SERVICE_ROLE_KEY
GEMINI_API_KEY=YOUR_GOOGLE_GEMINI_API_KEY
GROQ_API_KEY=YOUR_GROQ_API_KEY
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=YOUR_RANDOM_SECRETnpm run dev- Full RLS enforcement so users only access their own data
- Image & File Uploads via vision models
- Web Search Integration for up-to-date info
- Shareable Conversations
- Team/Workspace collaboration
- Unit & Integration Tests (Jest, React Testing Library)