Directus — Open Source Backend & Headless CMS for Any Database
Directus wraps any SQL database with instant REST & GraphQL APIs, an admin app, auth, file storage, and automation — no migration or proprietary schema needed.
What it is
Directus is an open-source data platform that wraps any SQL database with instant REST and GraphQL APIs, an intuitive admin application, authentication, file storage with transforms, and workflow automation. It works with your existing database schema -- no migration, no proprietary tables, no vendor lock-in. Supported databases include PostgreSQL, MySQL, MariaDB, SQLite, MS SQL, and OracleDB. Built with Vue.js. Released under a BSL license transitioning to GPL-3.0.
Directus targets development teams that want to add a backend and admin panel to an existing database without rewriting the data layer. It is database-first rather than CMS-first.
How it saves time or tokens
Directus generates APIs and admin interfaces from your existing database schema instantly. No backend code to write, no admin panel to build, no CRUD endpoints to maintain. The visual workflow builder (Flows) automates business logic without code. For AI applications, the REST and GraphQL APIs provide immediate structured data access for agents.
How to use
- Scaffold a project with
npx create-directus-project@latest my-project. - Run
npx directus startand access the admin app at localhost:8055. - Connect an existing database or design your schema through the admin UI; APIs are generated automatically.
Example
npx create-directus-project@latest my-project
cd my-project
npx directus start
# Admin app at http://localhost:8055
# Auto-generated REST API
curl http://localhost:8055/items/articles \
-H 'Authorization: Bearer YOUR_TOKEN'
Related on TokRepo
- AI Tools for API -- API generation and management tools
- AI Tools for Database -- Database management platforms
Common pitfalls
- Directus mirrors your database schema exactly; poorly designed schemas produce confusing admin interfaces. Clean up your schema before connecting Directus.
- The Flows automation system runs within Directus; long-running workflows block the Node.js event loop and degrade API performance.
- File storage defaults to local disk; production deployments should configure S3 or compatible object storage for reliability.
Frequently Asked Questions
Yes. This is Directus's core value proposition. Point it at any supported SQL database, and it introspects the schema to generate APIs and an admin interface. Your tables, columns, and relationships remain unchanged. Directus adds its own system tables prefixed with 'directus_' but never modifies your data tables.
Directus is database-first (connects to existing databases), while Strapi creates its own database schema. Directus provides instant APIs from any SQL database without migration. Strapi has a visual content-type builder and larger plugin marketplace. Directus is better for brownfield projects; Strapi is better for greenfield CMS projects.
Yes. Directus provides real-time data subscriptions via WebSockets and GraphQL Subscriptions. Clients can subscribe to changes on any collection and receive live updates when data is created, updated, or deleted.
Flows is a visual workflow builder within Directus. You create trigger-condition-action chains for automation. Triggers include data changes, schedules, and webhooks. Actions include sending emails, calling APIs, running scripts, and modifying data. It replaces simple backend logic without custom code.
Yes. Directus supports custom API endpoints, hooks, and modules through its extension system. Extensions are written in JavaScript/TypeScript and can add custom business logic, integrations, and admin UI panels.
Citations (3)
- Directus GitHub— Directus wraps any SQL database with instant REST and GraphQL APIs
- Directus Documentation— Database-first approach with no schema migration required
- GraphQL Official— GraphQL specification for flexible APIs
Related on TokRepo
Source & Thanks
- GitHub: directus/directus — 34.7K+ ⭐
- Website: directus.io
Discussion
Related Assets
HumHub — Open-Source Enterprise Social Network
A flexible, open-source social networking platform built on Yii2 for creating private communities, intranets, and collaboration spaces within organizations.
Dolibarr — Open-Source ERP & CRM for Business Management
A modular open-source ERP and CRM application written in PHP for managing contacts, invoices, orders, inventory, accounting, and more from a single web interface.
PrestaShop — Open-Source PHP E-Commerce Platform
A widely adopted open-source e-commerce platform written in PHP with a rich module marketplace, multi-language support, and a strong European user base.