tanstack-ai-demo  by rs-4

Modern AI chat application template

Created 1 month ago
279 stars

Top 93.2% on SourcePulse

GitHubView on GitHub
Project Summary

A modern, full-stack AI chat application template built with the TanStack ecosystem. It targets developers seeking a robust, feature-rich starting point for AI-powered chat interfaces, offering multi-provider AI support, real-time streaming, and persistent chat history, significantly accelerating development.

How It Works

The application leverages TanStack Start for a full-stack React framework, integrating TanStack Router for navigation and TanStack Query for data fetching. A backend built with TanStack AI and Drizzle ORM manages chat logic and persists data in PostgreSQL. Real-time streaming enhances user experience, while shadcn/ui and Tailwind CSS provide a clean, responsive interface. The architecture supports multiple AI providers (OpenAI, Anthropic, Google Gemini, Ollama) and local models via Ollama.

Quick Start & Requirements

  • Install: Clone the repository, install dependencies (bun install or npm install), configure .env.local with API keys and database URL, and run bun run db:push (or npm run db:push) followed by bun run dev (or npm run dev). Docker Compose is also available for deployment.
  • Prerequisites: Bun 1.0+ or Node.js 18+, PostgreSQL 14+ (or Docker), and at least one AI provider API key. Ollama can be installed for local model execution.
  • Links: GitHub, TanStack AI docs

Highlighted Details

  • Supports multiple AI providers including OpenAI, Anthropic, Google Gemini, and local Ollama models.
  • Features real-time response streaming with a natural typing animation.
  • Includes persistent chat history stored in PostgreSQL with full-text search capabilities.
  • Offers a mobile-first, responsive UI with dark mode support, built with Tailwind CSS and shadcn/ui.

Maintenance & Community

  • The project is part of the TanStack ecosystem, suggesting potential community support and alignment with TanStack's development practices.
  • Links to GitHub are provided for code and issue tracking.

Licensing & Compatibility

  • Licensed under the MIT License.
  • Compatible with commercial use and closed-source linking due to the permissive MIT license.

Limitations & Caveats

  • Requires setting up and managing API keys for cloud AI providers or running Ollama locally for offline use.
  • The project is presented as a "demo" or "template," implying it may require further development and customization for production-ready applications.
  • Relies on specific versions of Bun/Node.js and PostgreSQL.
Health Check
Last Commit

4 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
93 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.