Skip to content

osadavc/tanchat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

607 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TanStack Start and AI SDK Chatbot

Chat SDK (TanStack Edition)

Chat SDK is a free, open-source template built with TanStack Start and the AI SDK that helps you quickly build powerful chatbot applications.

This project is a fork of vercel/ai-chatbot, adapted for the TanStack ecosystem.

Features · Planned Features · Model Providers · Deploy Your Own · Running locally


Features

  • TanStack Start
    • Full-stack React framework with server-side rendering and streaming
  • TanStack Router
    • 100% type-safe routing for React
  • TanStack Query
    • Powerful asynchronous state management
  • TanStack Form
    • Headless, type-safe form management
  • AI SDK
    • Unified API for generating text, structured objects, and tool calls with LLMs
    • Hooks for building dynamic chat and generative user interfaces
    • Supports xAI (default), OpenAI, Fireworks, and other model providers
  • shadcn/ui
  • Data Persistence
  • Better Auth
    • Comprehensive and secure authentication

Planned Features

  • Migrate to TanStack AI: When the TanStack AI package becomes stable enough, we plan to migrate from the Vercel AI SDK to maintain consistency with the TanStack ecosystem.

Model Providers

This template uses the Vercel AI Gateway to access multiple AI models through a unified interface. The default configuration includes xAI models (grok-2-vision-1212, grok-3-mini) routed through the gateway.

AI Gateway Authentication

For Vercel deployments: Authentication is handled automatically via OIDC tokens.

For non-Vercel deployments: You need to provide an AI Gateway API key by setting the AI_GATEWAY_API_KEY environment variable in your .env file.

With the AI SDK, you can also switch to direct LLM providers like OpenAI, Anthropic, Cohere, and many more with just a few lines of code.

Deploy Your Own

You can deploy your own version of this Chatbot to Vercel.

Deploy with Vercel

Running locally

You will need to use the environment variables defined in .env.example to run the chatbot.

Note: You should not commit your .env file or it will expose secrets that will allow others to control access to your various AI and authentication provider accounts.

  1. Install dependencies:
pnpm install
  1. Setup the database:
pnpm run db:migrate
  1. Start the development server:
pnpm run dev

Your app template should now be running on localhost:3000.

About

A full-featured, TanStack AI Chatbot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published