Skip to content

crafter-station/cs.chat

Repository files navigation

hero

C3.chat

One chat, every AI model

Website · Issues

Next.js React Vercel AI SDK TypeScript

Built by
Crafter Station Crafter Station

About

C3.chat is an open-source AI chat interface that lets you talk to multiple AI models from a single place. Switch between GPT-4o, Claude, Gemini, DeepSeek, Grok, and more — all through one clean, fast UI.

Features

Multi-Model Support: Chat with 13+ models from OpenAI, Anthropic, Google, Meta, DeepSeek, xAI, Perplexity, and Mistral — switch mid-conversation.
Reasoning Display: See the model's chain-of-thought when using reasoning models like DeepSeek R1.
Citations & Sources: Inline citations with source links for grounded responses.
Streaming Responses: Real-time token streaming with smooth scroll-to-bottom behavior.
Thread Management: Persistent conversation threads with auto-generated titles.
Keyboard Shortcuts: Cmd+Shift+O to start a new conversation instantly.
Rate Limiting: Built-in per-user rate limiting with Upstash Redis.
Authentication: Clerk-powered auth with anonymous guest access and usage tiers.

Get Started

Prerequisites

  • Bun 1.1+
  • A Neon Postgres database
  • Upstash Redis instance
  • Clerk application
  • AI Gateway API key

Installation

# Clone the repository
git clone https://github.com/crafter-station/cs.chat.git
cd cs.chat

# Install dependencies
bun install

# Set up environment variables
cp .env.example .env.local

# Push the database schema
bun run db:push

# Start the development server
bun run dev

Tech Stack

Core

  • Next.js 16
  • React 19
  • TypeScript
  • Tailwind CSS 4

AI & Backend

  • Vercel AI SDK (ai + @ai-sdk/react)
  • AI Gateway for multi-provider routing
  • Drizzle ORM + Neon Postgres
  • Upstash Redis (rate limiting)

Auth & Analytics

  • Clerk (authentication)
  • Vercel Analytics

UI

  • shadcn/ui
  • AI Elements (composable chat components)
  • Radix UI primitives
  • Motion (animations)

Project Structure

cs.chat/
├── app/
│   ├── api/chat/        # Streaming chat API route
│   ├── layout.tsx       # Root layout with sidebar
│   ├── page.tsx         # Main chat interface
│   └── globals.css      # Theme & custom CSS variables
├── components/
│   ├── ai-elements/     # Chat UI components (conversation, message, prompt-input, model-selector)
│   ├── ui/              # shadcn/ui base components
│   └── logos/           # Brand logos
├── hooks/               # Custom React hooks (threads, usage, title generation)
├── lib/                 # Utilities (rate limiting, caching, user service)
└── public/              # Static assets & OG images

Contributing

We welcome contributions! Open an issue or submit a pull request.


Built with love by crafterstation.com

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages