Directus: Turn Any SQL Database Into a Headless CMS in Minutes
You know that moment when your backend is solid but the client wants a dashboard, an API, and maybe an admin panel—all yesterday? You could build it from scratch, or you could just wrap a database with something that handles the plumbing for you.
Directus does exactly that. It takes your existing SQL database (MySQL, PostgreSQL, SQLite, etc.) and instantly gives you a REST or GraphQL API, a clean admin UI, and built-in authentication. No boilerplate, no custom endpoints for every CRUD operation—just point it at your database and go.
What It Does
At its core, Directus is a headless CMS that acts like a database manager with superpowers. You point it at your SQL database, and it reads your schema automatically. From there:
- REST & GraphQL APIs – Instant, auto-generated endpoints for every table. Need a
/items/articlesendpoint? It’s there, with filtering, sorting, and pagination. - Admin UI – A polished web interface to manage data, relationships, and users. Think of it like phpMyAdmin, but designed for humans who don’t want to cry.
- Auth – Built-in user roles, permissions, and session/API token management. You don’t have to roll your own auth for basic CMS access.
- No vendor lock-in – Your database stays yours. Directus just sits on top and maps your tables to API endpoints.
You can start with a blank database, or connect it to an existing schema you already have running in production. It’s not opinionated about your data model.
Why It’s Cool
A few things set Directus apart from other headless CMS options:
It’s SQL-native. Unlike some CMSs that require you to export/import data or use their custom storage format, Directus works directly with your relational database. You can even keep using MySQL Workbench, DBeaver, or whatever tools you already use.
Extensible without being a framework. You can add custom endpoints, hooks, and even write your own modules in JavaScript. But you don’t have to—out of the box it’s already useful for 90% of projects.
The admin UI is surprisingly good. It’s not an afterthought. You can build dashboards, filter records visually, and set up content workflows. Non-technical team members can actually use it.
Works for APIs too. Yes, it’s a CMS, but you can absolutely use it as a lightweight backend for mobile apps, static sites, or internal tools. Hook up a Sveltekit or Next.js frontend and you’re done.
How to Try It
Getting started is straightforward, especially if you’ve used Docker before.
# Clone the repo
git clone https://github.com/directus/directus.git
cd directus
# Or just use the Docker image
docker run -p 8055:8055 directus/directus
The official docs at directus.io have a quick start guide and detailed setup for production. If you want to skip local setup, they host a demo on their site—you can play with a fully working instance in your browser.
Final Thoughts
Directus sits in a sweet spot. It’s not trying to be the next WordPress or a full-blown backend framework. It’s a tool that solves a specific problem: getting data in and out of a database without the busywork. If you’re building prototypes, internal tools, or even production apps that need a quick admin panel, it’s worth a look.
The biggest win? You keep control of your database. No migrating to some proprietary data layer when you outgrow it. Just a clean API, a nice UI, and a little less code to write.
Found this on @githubprojects
Repository: https://github.com/directus/directus