Directory Overview
Key Files
| File | Purpose |
|---|---|
chat.config.ts | Central configuration (features, models, branding) |
lib/config.ts | Parsed config export with defaults |
lib/env.ts | Environment variable validation (t3-env) |
lib/auth.ts | Better Auth server configuration |
lib/auth-client.ts | Better Auth client configuration |
lib/db/schema.ts | Drizzle ORM database schema |
proxy.ts | Route protection middleware |
App Router Structure
Route Groups
(auth)- Authentication pages, shared layout without chat UI(chat)- Main application, chat interface layout
API Routes
Components Architecture
UI Layer
Part Components
Tool results are rendered by part components incomponents/part/. Each tool has a corresponding component: