Skip to content

Compound-inc/rift

Repository files navigation

Rift

High-performance AI chat infrastructure built for teams.

Website · Deploy on Railway · Self-hosting · Local Development

Introduction

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.

Rift chat app screenshot

Features

  • 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)

Tech Stack

Rift is centered around this stack:

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

Self-Hosting

Rift is deployable via a Railway template.

Deploy on Railway

More self-hosting deployment options will be documented soon.

Repository Overview

This repository is a Bun + Turborepo monorepo.

  • apps/start/ - Primary Rift web app (TanStack Start + Vite)
  • packages/ui/ - Shared UI components
  • packages/utils/ - Shared utilities
  • packages/chat-scroll/ - Chat scrolling primitives
  • packages/tailwind-config/ - Shared Tailwind configuration
  • workers/markdown-converter/ - File-to-markdown Cloudflare Worker
  • reference/ - Upstream/reference snapshots (not active app code)

Local Development

For detailed setup instructions, see DEVELOPMENT.md.

Setting up the Markdown Converter Worker (Required for file attachments)

Rift uses a Cloudflare Worker to convert uploaded files (PDFs, documents, etc.) to markdown. To set it up:

bun setup:markdown-worker

This interactive script will:

  1. Check prerequisites (Node.js, wrangler CLI)
  2. Authenticate with your Cloudflare account
  3. Deploy the worker to Cloudflare
  4. Generate and save a secure API token
  5. Output the environment variables to add to your .env file

Note: You'll need a Cloudflare account. The worker runs on Cloudflare's free tier.

Contributing

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

License

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.

About

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages