High-performance AI chat infrastructure built for teams.
Website · Deploy on Railway · Self-hosting · Local Development
Rift is a Bun + TanStack platform designed to make AI chat feel instant.
The core product goal is simple: maximize responsiveness and quality-of-life while preserving native provider behavior and enterprise-grade workspace controls.
Rift is built around TanStack Start, Rocicorp Zero for sync-first state and realtime updates, and the AI SDK for multi-provider support.
-
Nested chat branches system with deterministic branch resolution and conflict handling
-
BYOK controls (Bring Your Own Key) with organization-level enforcement
-
Native provider tools routing and policy-aware tool gating
-
ZDR (Zero Data Retention) compliance at provider level
-
Team management via organizations, members, invitations, and role-based setting
-
Stream resumability with Redis-backed resume lifecycle for reconnecting clients
-
Sync-based architecture
-
Organization-level model, tool, and compliance policy controls
-
File uploads + markdown conversion pipeline supporting PDF, HTML/XML, Office, OpenDocument, CSV, and related document formats
-
Vector retrieval pipeline (Qdrant) for attachment-aware RAG
-
React Native mobile app currently in development (coming soon)
Rift is centered around this stack:
- Bun - runtime, package management, and scripts
- TanStack Start + TanStack Router - full-stack React architecture
- Rocicorp Zero - Sync-based data model and realtime cache layer
- Effect - For all the Backend Logic and Services
- Vercel AI SDK - multi-provider AI primitives and streaming
- Railway - default deployment target
Additional platform technologies:
- TypeScript, Vite, React 19, Tailwind CSS v4
- Better Auth for auth, organizations, invitations, and roles
- PostgreSQL + Redis for persistence and stream continuity
- Qdrant for vector search/RAG workflows
- Stripe + Resend for billing and email flows
Rift is deployable via a Railway template.
More self-hosting deployment options will be documented soon.
This repository is a Bun + Turborepo monorepo.
apps/start/- Primary Rift web app (TanStack Start + Vite)packages/ui/- Shared UI componentspackages/utils/- Shared utilitiespackages/chat-scroll/- Chat scrolling primitivespackages/tailwind-config/- Shared Tailwind configurationworkers/markdown-converter/- File-to-markdown Cloudflare Workerreference/- Upstream/reference snapshots (not active app code)
For detailed setup instructions, see DEVELOPMENT.md.
Rift uses a Cloudflare Worker to convert uploaded files (PDFs, documents, etc.) to markdown. To set it up:
bun setup:markdown-workerThis interactive script will:
- Check prerequisites (Node.js, wrangler CLI)
- Authenticate with your Cloudflare account
- Deploy the worker to Cloudflare
- Generate and save a secure API token
- Output the environment variables to add to your
.envfile
Note: You'll need a Cloudflare account. The worker runs on Cloudflare's free tier.
Contributions are welcome.
- Keep app-specific changes in
apps/*/src - Keep shared logic in
packages/*/src - Open an issue for bugs or feature proposals before large changes
Rift is an open-core repository. The core technology is fully open source
under the GNU Affero General Public License v3.0 (AGPL-3.0), and the
enterprise surface under apps/start/src/routes/(ee) and apps/start/src/ee
is covered by a separate commercial license.
See LICENSE for the AGPL terms and apps/start/src/ee/LICENSE.md for the enterprise license.
