Twenty is an open-source customer relationship management (CRM) platform designed to replace expensive, proprietary systems like Salesforce with a flexible, community-powered alternative. It empowers teams to manage customer data with full control over their infrastructure, avoiding vendor lock-in while offering enterprise-grade features. Built for developers, sales teams, and growing companies, Twenty combines the modularity of Notion and Airtable with the robustness of traditional CRMs.
The platform is built as a monorepo using TypeScript, React, NestJS, PostgreSQL, and Redis, with a modular architecture powered by Nx. It supports self-hosting via Docker Compose and offers a rich API layer with GraphQL endpoints, enabling deep customization and integration with external tools. The ecosystem is community-driven, with active contributions and integrations via Discord and Crowdin.
What You Get
- Customizable Data Models - Define and modify custom objects and fields to match your business structure, with full control over schema design and relationships.
- Multiple View Types - Visualize data using Kanban, table, filterable, and grouped views with drag-and-drop personalization for sales pipelines and customer tracking.
- Role-Based Permissions - Create custom user roles with granular access controls to manage who can view, edit, or delete records across objects.
- Workflow Automation - Build triggers and actions to automate repetitive tasks like updating records, sending notifications, or syncing data between modules.
- Email Synchronization - Automatically sync emails from your inbox to customer records, preserving subject, body, and attachments for team visibility.
- Rich Notes with Markdown - Attach detailed, formatted notes to contacts and companies using text blocks and markdown for context-rich customer interactions.
Common Use Cases
- Running a B2B sales team - A SaaS company uses Twenty to track leads, sync emails from Gmail, and visualize deals in Kanban views with custom fields for contract value and renewal dates.
- Managing enterprise customer data - A mid-sized tech firm replaces Salesforce with Twenty to avoid licensing fees, customizes objects for product tiers, and uses role-based permissions for regional teams.
- Building a customer success platform - A customer success manager automates follow-ups using workflows triggered by email opens and syncs notes from Slack and Cal.com into customer profiles.
- Developing a CRM plugin ecosystem - A developer extends Twenty by creating a custom integration with Mailchimp using its GraphQL API and contributes it back to the open-source community.
Under The Hood
Architecture
- Monorepo structure using Nx with unified apps and libraries under packages/, enabling shared code reuse and consistent build pipelines across React applications
- Clear separation of UI components and state logic using Jotai for atom-based state management, avoiding prop drilling
- GraphQL API layer powered by Apollo Client and GraphQL Codegen, enforcing contract-first development with type-safe hooks and queries
- Styling system combining Linaria for compile-time CSS-in-JS with Radix UI primitives to ensure accessibility and component composability
- Implicit dependency injection through modular exports and Nx project graphs, with strong boundaries enforced by TypeScript
Tech Stack
- React 18 with Next.js and Vite for frontend rendering, paired with Linaria and Jotai for styling and state
- TypeScript 5.9.2 with Nx for scalable workspace management, shared libraries, and unified build orchestration
- GraphQL stack using Apollo Client and Codegen for type-safe client-server communication
- Testing ecosystem built on Jest, Playwright, and Storybook to support component-driven development and end-to-end validation
- Infrastructure tooling including Nx target defaults, Oxlint, Prettier, and MCP servers for PostgreSQL and Playwright integration
- Dependency management via Yarn 4 with hardened mode and node-modules linker for reproducible builds
Code Quality
- Extensive test coverage spanning unit, integration, and end-to-end scenarios with comprehensive mocking of APIs and dependencies
- Modular service layers with well-defined repository patterns and consistent error handling using domain-specific exception classes
- Strong type safety enforced through precise TypeScript interfaces and entity definitions, reducing runtime failures
- Consistent naming, test structure, and utility patterns across modules, enhancing readability and reducing duplication
- Robust linting, formatting, and automated test workflows that ensure predictable behavior and maintainability
What Makes It Unique
- Native GraphQL resolver builder that auto-generates type-safe resolvers from metadata, eliminating manual boilerplate
- Unified impersonation system with server-level permissions and 2FA enforcement that bridges user contexts across workspaces
- Intelligent Gmail folder synchronization with dynamic hierarchy detection using label metadata
- Pluggable email provider drivers with OAuth2-based authentication for seamless multi-provider integration
- Configurable workspace impersonation with audit trails and environment-aware security policies
- Real-time API client with automatic token refresh, connectivity validation, and unified authentication flows between CLI and server