Self-hosting installation
Toots is open source and can be self-hosted on your own infrastructure. This guide covers both Docker-based deployment and local development setup.Prerequisites
Before you begin, ensure you have:- Node.js ≥ 20
- pnpm (package manager)
- PostgreSQL 16 or later (local or Docker)
- Google Gemini API key (for AI ticket generation)
Toots uses a monorepo structure with pnpm workspaces and Turborepo for efficient builds and development.
Quick start with Docker
The fastest way to run Toots is using Docker Compose for the database.Install dependencies
apps/web— The Next.js applicationpackages/ui— Shared shadcn/ui componentspackages/typescript-config— Shared TypeScript configs
Start PostgreSQL with Docker
compose.yaml:Configure environment variables
Create a
.env file in apps/web with the following variables:Get a free Gemini API key from Google AI Studio
Start the development server
Local development setup
For active development, you may prefer running PostgreSQL locally without Docker.Update DATABASE_URL
In Replace
apps/web/.env, set:your-user with your PostgreSQL username (often your system username).Useful development commands
Toots uses Turborepo and pnpm workspaces for efficient task execution.Adding UI components
Toots uses shadcn/ui components stored in a sharedpackages/ui package.
Add a new component
From the repository root:This installs the component into
packages/ui/src/components.Tailwind CSS and
globals.css are configured to use the shared ui package, so all styling works automatically.Architecture overview
Toots is built as a monorepo with the following structure:Key technologies
- Next.js 16 — App Router with React 19 and Server Components
- oRPC — Type-safe RPC layer replacing REST/GraphQL
- Prisma ORM — Type-safe database client with migrations
- better-auth — Modern authentication with email/password
- Vercel AI SDK — Streaming AI responses from Google Gemini
- dnd-kit — Accessible drag-and-drop for Kanban board
Production deployment
For production, you can deploy Toots to any platform that supports Next.js.- Vercel
- Docker
- Other platforms
Configure environment variables
Add all variables from
apps/web/.env in the Vercel project settings:DATABASE_URLBETTER_AUTH_SECRETBETTER_AUTH_URL(set to your production domain)GOOGLE_GENERATIVE_AI_API_KEY
Database migrations
Toots uses Prisma for database management. When the schema changes:Create a migration
prisma/migrations/ and applies it to the database.Troubleshooting
Database connection failed
Database connection failed
Check that:
- PostgreSQL is running (
docker psorpg_isready) DATABASE_URLis correctly formatted:postgresql://user:password@host:port/database- Firewall allows connections on port 5432
- Database exists (
createdb tootsif needed)
Prisma client errors
Prisma client errors
Regenerate the Prisma client:If schema changes aren’t reflected, run migrations:
AI ticket generation not working
AI ticket generation not working
Verify your
GOOGLE_GENERATIVE_AI_API_KEY is valid:- Get a key from Google AI Studio
- Check API quota limits
- Ensure the key is correctly set in
.env
pnpm workspace issues
pnpm workspace issues
Clear the workspace and reinstall:
Build errors in production
Build errors in production
Ensure:
- Environment variables are set in your hosting platform
prisma generateruns before build (it’s in the build script)- All dependencies are installed with
pnpm install --frozen-lockfile
Next steps
Quickstart guide
Learn how to use Toots to create projects and generate tickets
Setup & Configuration
Configure environment variables, database, and integrations
Contributing
Pick up issues and contribute to the project
API reference
Explore the oRPC API endpoints and types