Kan
An open-source, self-hostable Kanban board built as a modern Trello alternative with team workspaces, board permissions, and Trello import.
Kan is an open-source project management tool designed as a direct, self-hostable alternative to Trello. Built on a modern TypeScript monorepo using Next.js 15, tRPC, Drizzle ORM, and PostgreSQL, it gives teams and solo developers full ownership of their task data without relying on a third-party SaaS subscription.
At its core, Kan offers visual Kanban boards with fine-grained visibility controls, workspace member management, and a comprehensive activity log. It supports card due dates, checklists with drag-and-drop reordering, file attachments via S3-compatible storage, and a rich TipTap-based markdown editor for card descriptions. Trello import lets teams migrate their existing boards in minutes using a Trello API key and secret.
Kan ships with a built-in MCP (Model Context Protocol) server — published as a standalone npm package — enabling AI assistants to control boards, lists, cards, labels, and workspace members programmatically. Combined with a fully generated OpenAPI specification derived from its tRPC routers, Kan exposes a machine-readable REST API without any manual documentation overhead.
Deployment is straightforward: a Docker Compose file provisions the PostgreSQL database, runs migrations automatically on startup, and serves the Next.js app on a configurable port. One-click Railway deployment is also available via an official partnered template. Authentication supports credentials, email magic links, and multiple OAuth providers including Google, GitHub, Discord, GitLab, and Microsoft, all managed through Better Auth.
What You Get
- Board Visibility Controls - Set each board to public, private, or workspace-only visibility to control exactly who can view and edit project content
- Trello Import - Migrate existing Trello boards by providing a Trello API key and secret; checklists, labels, and card descriptions are imported automatically
- Card Due Dates & Checklists - Assign due dates to cards and create checklists with drag-and-drop item reordering and completion tracking
- File Attachments - Upload and manage card attachments using any S3-compatible storage provider including Cloudflare R2 and AWS with optional IRSA support
- Rich Text Editor - Write card descriptions with a TipTap markdown editor supporting links, mentions, YouTube embeds, and formatting shortcuts
- Activity Log - View a detailed chronological history of every card change including who moved, commented, archived, or updated each item
- MCP Server - Control workspaces, boards, lists, cards, labels, checklists, and members through any AI assistant that supports the Model Context Protocol
- Multi-Provider OAuth - Authenticate via credentials, magic link email, Google, GitHub, Discord, GitLab, Microsoft, Zoom, or Dropbox without additional configuration overhead
- Workspace Role Permissions - Define and customise per-role permissions for workspace operations, scoped to admin and member tiers
Common Use Cases
- Migrating off Trello - A product team imports their entire Trello workspace into a self-hosted Kan instance, preserving checklists and card history while eliminating SaaS subscription costs
- Remote engineering sprints - A distributed software team uses Kan boards with custom templates and list filters to run two-week sprints, with GitHub OAuth for seamless login
- Solo creator project tracking - A freelance designer manages multiple client projects across unlimited boards, using due dates and labels to stay on top of deadlines without paying for per-seat pricing
- AI-assisted task management - A developer configures their Claude or Cursor AI assistant with the Kan MCP server to create cards, update checklists, and move tasks between lists through natural language
- Compliance-sensitive teams - A healthcare company self-hosts Kan on-premises with their own PostgreSQL instance, ensuring all project data stays within their infrastructure perimeter
Under The Hood
Architecture
Kan is structured as a Turborepo monorepo with clearly delineated workspace packages covering the web frontend, tRPC API layer, Drizzle ORM database access, Better Auth authentication, email templating, logging, Stripe billing, and a standalone MCP server. The Next.js application consumes the tRPC router directly via server-side calls, while also exposing a fully generated OpenAPI-compliant REST API at /api/v1 using the trpc-to-openapi adapter. This design means every API endpoint exists in a single type-safe definition that simultaneously serves the frontend, the public REST API, and the machine-readable spec — eliminating duplication between client, server, and documentation layers.
Tech Stack The frontend runs on Next.js 15 with React 18, Tailwind CSS, and TipTap for rich text editing. The API layer uses tRPC with Zod schemas for end-to-end type safety. Drizzle ORM manages a PostgreSQL database with a migration service container that runs automatically before the web container starts. Better Auth handles authentication across email credentials, magic links, and ten OAuth providers. File uploads go to any S3-compatible bucket via the AWS SDK with optional AWS IRSA support for IAM role-based access. Redis is optionally wired for API rate limiting. Internationalization is handled by LinguiJS with compiled message catalogs for multiple languages including Portuguese, Italian, and Polish.
Code Quality
The codebase uses Vitest for unit and integration testing, with tests covering auth hooks, utility helpers, webhook processing, and integration flows. Repository-layer functions are injected as dependencies in tRPC procedures, making them independently testable without live database connections. Error handling is explicit throughout the API layer using typed TRPCError with HTTP-mapped codes. TypeScript strict mode is enforced across all packages through shared tsconfig configurations, and ESLint with Prettier runs across the entire monorepo via Turborepo’s pipeline. The test coverage is targeted rather than comprehensive — webhook and auth logic is well-covered while view-level code relies on type safety rather than test assertions.
What Makes It Unique
The most distinctive feature is the published @kan/mcp package — a standalone Model Context Protocol server that exposes the full Kan API to AI assistants, letting tools like Claude or Cursor manage boards and cards through natural language without custom integrations. Combined with the automatic OpenAPI document generated from tRPC route metadata, Kan creates a fully machine-readable interface with zero manual documentation effort. The customisable workspace role permissions system lets self-hosters define what each member tier can do across every operation, which goes beyond the binary admin/member split typical of Trello alternatives. Rate limiting is embedded directly in API handlers via a shared withRateLimit utility backed by Redis, keeping infrastructure concerns co-located with the routes they protect.
Self-Hosting
Kan is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). This means the source code is freely available for inspection, modification, and self-hosting, including for commercial use within your own organization. The key AGPL obligation is that if you modify Kan and make it accessible to users over a network — for example, offering it as a hosted service to external customers — you must release your modified source code under the same license. For internal use within a company, this restriction does not apply: you can deploy and modify Kan for your team without any obligation to publish your changes.
Running Kan yourself requires PostgreSQL, a Node.js runtime (20.18.1 or higher), and optionally Redis for rate limiting and S3-compatible storage for file attachments. The Docker Compose file manages all of this: it provisions a PostgreSQL container with a health check, runs the kan-migrate container to apply database migrations before the web service starts, and then serves the Next.js app. SMTP configuration is needed for email-based authentication and notifications, and OAuth credentials must be set up per provider if social login is required. Your team is responsible for database backups, uptime monitoring, version upgrades, and scaling — none of this is managed for you.
Kan offers a hosted cloud version at kan.bn that adds managed infrastructure, automatic upgrades, Stripe-based subscription billing, and a free trial notification system. For teams that want to skip the operational overhead — database management, SMTP relay setup, S3 provisioning, SSL termination — the cloud tier provides these out of the box. The self-hosted version has full feature parity for core functionality, though some cloud-specific integrations such as the Novu notification client and subscription management are absent. Railway’s official one-click template offers a middle path: cloud-hosted infrastructure with the control of choosing your own provider.
Related Apps
AppFlowy
Productivity · Project Management · Collaboration
The open-source AI workspace that puts your data, your rules — with local LLMs, CRDT collaboration, and full self-hosting built in.
AppFlowy
AGPL 3.0AFFiNE
Productivity · Project Management · Note Taking
Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.
AFFiNE
OtherGitea
Devops · Developer Tools · Project Management
Self-hosted DevOps in a single Go binary — Git hosting, GitHub Actions-compatible CI/CD, and 30+ package registries without any SaaS dependency.