Skip to content

Repository files navigation

chatOS

A best-in-class AI chatbot monorepo template with streaming, multi-model support, and multi-platform bots.

Built with Turborepo, Next.js 16, Vercel AI SDK, Better Auth, Drizzle ORM, and Chat SDK.

Features

  • Multi-model AI chat — Claude, GPT, Gemini, Grok via Vercel AI Gateway
  • Streaming — Real-time responses with resumable streams (Redis-backed)
  • Tool calling — Extensible tool system (weather, documents, web search)
  • Multi-platform bots — Slack, Teams, Discord via Chat SDK
  • Type-safe — End-to-end with tRPC, Drizzle, Zod
  • Agent-native — Control metalayer, harness engineering, skills for AI-assisted development
  • Monorepo — Turborepo with caching, shared packages, parallel builds

Quick Start

# Clone
git clone https://github.com/broomva/chatOS.git
cd chatOS
# Install
bun install
# Configure
cp env.example .env.local
# Fill in DATABASE_URL, AUTH_SECRET, AI_GATEWAY_API_KEY# Develop
turbo dev

Apps start on:

Architecture

chatOS/
├── apps/
│ ├── web/ Next.js AI chatbot
│ ├── bot/ Chat SDK multi-platform bot
│ └── docs/ Fumadocs documentation
├── packages/
│ ├── ai/ AI SDK models, tools, streaming
│ ├── auth/ Better Auth configuration
│ ├── config/ Shared tsconfig, tailwind presets
│ ├── db/ Drizzle schema, queries, migrations
│ ├── types/ Shared TypeScript types
│ └── ui/ shadcn/ui shared components
├── .control/ Agent governance (policy, commands, topology)
├── docs/control/ Architecture, observability, control loop
├── scripts/control/ Deterministic command wrappers
├── skills/ Project-local agent skills
└── evals/ Control metrics

Commands

CommandDescription
bun installInstall all dependencies
turbo devStart all apps in development
turbo buildBuild all packages and apps
make smokeEnvironment + build sanity check
make checkLint (Biome) + typecheck
make testFull test suite
make control-auditValidate agent governance artifacts

Tech Stack

LayerTechnology
MonorepoTurborepo + Bun
FrameworkNext.js 16 (App Router)
AIVercel AI SDK + AI Gateway
AuthBetter Auth
DatabasePostgreSQL + Drizzle ORM
CacheRedis (Upstash)
UIshadcn/ui + Radix + Tailwind v4
BotChat SDK (Slack, Teams, Discord)
LintBiome
TestVitest + Playwright
DocsFumadocs
CI/CDGitHub Actions

Agent-Native Development

This repo is designed for AI-assisted development with:

  • AGENTS.md — Command surface and rules for AI agents
  • PLANS.md — Durable planning for multi-step tasks
  • METALAYER.md — Control-loop setpoints and feedback
  • CLAUDE.md — Project context for Claude Code
  • .control/ — Policy, commands, topology YAML
  • skills/ — Project-local skills for development guidance
  • Makefile.control — Deterministic gate commands (smokechecktest)

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT

About

AI chat platform — Turborepo monorepo with Next.js 16, AI SDK v6, Better Auth, Neon Postgres. Full-stack conversational AI.

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages