Twenty: The Database-First Rebellion Against CRM Bloat

How a metadata-driven architecture is turning PostgreSQL into a high-performance alternative to the Salesforce monolith.

• View on GitHub • More from twentyhq

A large set of rusted iron gears labeled 'OLD CRM' being bypassed by a sleek, glowing fiber-optic cable labeled 'POSTGRES', illustrating the shift from legacy CRM monoliths to modern, database-first architectures.
Twenty treats customer data as a first-class engineering primitive, bypassing the locked-in schemas of legacy CRMs.

I didn't like the idea of being hostage of a closed-source project, so we built our own software instead.

Key Takeaways

The End of the Data Silo

Most enterprise Customer Relationship Management (CRM) systems are proprietary black boxes. They trap your data in obscure, rigid schemas and force you to use specialized, slow APIs to extract it. Twenty flips this model on its head. Instead of building a closed ecosystem, Twenty is designed as a sophisticated UI engine that sits directly on top of standard PostgreSQL.

The story of Twenty isn't just about offering an open-source alternative to Salesforce. It is about treating 'Customer Data' as a transparent, accessible engineering primitive. By making the database the unequivocal source of truth, Twenty allows engineering teams to interact with CRM data using the same SQL and infrastructure they already trust.

Portrait of Félix Malfait, CEO and co-founder of Twenty.

Architecture of a Metadata Engine

The core technical achievement of Twenty is its Metadata Engine. In a traditional application, changing a database schema requires writing migration scripts, coordinating deployments, and managing downtime. In a CRM, end-users expect to add custom fields and objects on the fly.

Twenty solves the 'Dynamic Schema' problem using a TypeScript-native transpilation process. When a user defines a new custom field in the UI, Twenty creates a 'Universal Entity.' The engine's transpiler then converts this abstract definition into a 'Flat Entity', dynamically generating the necessary PostgreSQL schema changes and updating the GraphQL API in real-time without recompiling the backend.

How a user action in the UI becomes a safe, dynamic database schema change without a server restart.

The Linear Effect: Speed as a Feature

Legacy CRMs are notorious for their sluggish, heavy-DOM interfaces. Every click results in a full page reload or a massive, blocking API call. Twenty abandons this paradigm, drawing deep UX inspiration from 'New School' productivity tools like Linear and Notion.

To achieve this sub-100ms fluidity, Twenty's React frontend relies on Jotai for atomic state management. Instead of a monolithic Redux store where every change triggers widespread re-renders, Jotai uses granular 'atoms'. When a single field like a deal stage is updated, only that specific UI component and its immediate dependencies re-render. Combined with Linaria for zero-runtime CSS-in-JS, the result is a keyboard-first, lightning-fast application.

Open Source vs. The Enterprise Tax

For developers and founders, choosing a CRM often feels like choosing a compromise. You either pay exorbitant per-seat licenses for bloated proprietary software, or you spend months building internal tools from scratch. Twenty occupies the 'Goldilocks' zone: an open-source platform that provides enterprise-grade CRM features out of the box, but runs locally or in a private cloud to ensure complete data ownership and HIPAA/GDPR compliance.

FeatureTwentyLegacy MonolithsSpreadsheet Hybrids
Data OwnershipLocal or Private Cloud (Postgres)Proprietary Cloud Lock-inSaaS Native
CustomizationTypeScript & GraphQLProprietary Code (e.g., Apex)Formulas & Scripts
UX ParadigmKeyboard-centric, Atomic StateClick-heavy, Multi-page reloadsGrid-focused
ExtensibilityOpen-Source MonorepoClosed App MarketplacesLimited API Webhooks

Toward Self-Improving Software

Twenty's architecture is explicitly designed for the AI era. By exposing its entire metadata layer and API via the Model Context Protocol (MCP), Twenty ensures that internal AI agents can seamlessly read, understand, and act upon the CRM's structure. It is not just a passive repository of customer interactions; it is built to be a dynamic engine that learns.

We believe the future lies in evolving software that integrates feedback loops and can self-improve, becoming more refined and personalized with each use while maintaining a specialized core.

Twenty Blog, Corporate Blog · Self-Improving Software | Twenty.dev

By rebuilding the CRM from the database up, Twenty is proving that enterprise software doesn't have to be slow, opaque, or hostile to developers. It is a modern, TypeScript-driven rebellion against the bloat of the past decade.