You already have a database. Directus wraps it with instant REST and GraphQL APIs, an admin dashboard, auth, and file storage — without changing your schema.
What is Directus?
Directus is an open-source data platform that sits on top of any SQL database. It doesn't own your data — it mirrors your existing schema and gives you APIs, a visual admin panel, and access control.
Why Directus Is Different
1. Works With Your Existing Database
# Point Directus at any existing database
DB_CLIENT=pg
DB_HOST=localhost
DB_PORT=5432
DB_DATABASE=myapp
DB_USER=admin
DB_PASSWORD=secret
Directus introspects your schema and creates APIs automatically. Your existing tables, relationships, and data — instantly accessible.
2. Instant REST API
# List items
GET /items/products?filter[price][_gt]=50&sort=-created_at&limit=10
# Create
POST /items/products
{ "name": "Widget", "price": 29.99 }
# Update
PATCH /items/products/123
{ "price": 34.99 }
# Deep filtering with relationships
GET /items/orders?filter[customer][country][_eq]=US&fields=id,total,customer.name
3. Instant GraphQL API
query {
products(
filter: { price: { _gt: 50 } }
sort: ["-created_at"]
limit: 10
) {
id
name
price
category {
name
}
}
}
4. Visual Admin Dashboard
Directus auto-generates a full admin interface:
- CRUD for all collections
- Relationship management
- File manager with image editing
- User and role management
- Activity logging
- Custom dashboards with widgets
5. Flows (Visual Automation)
Build automations visually:
Trigger: On item create in "orders"
→ Run JavaScript: calculate shipping
→ Send email: order confirmation
→ Create item in "notifications"
→ Webhook: update inventory system
6. Granular Access Control
{
"role": "editor",
"permissions": {
"products": {
"read": { "_and": [{ "status": { "_eq": "published" } }] },
"update": { "fields": ["title", "content"], "filter": { "author": { "_eq": "$CURRENT_USER" } } },
"create": true,
"delete": false
}
}
}
Field-level, row-level, and role-based access — all configurable in the admin.
Supported Databases
- PostgreSQL
- MySQL / MariaDB
- SQLite
- MS SQL Server
- OracleDB
- CockroachDB
Directus vs Strapi vs Hasura
| Directus | Strapi | Hasura | |
|---|---|---|---|
| Database | Any SQL (mirrors existing) | Creates own schema | PostgreSQL |
| Schema ownership | Your DB owns schema | Strapi owns schema | Your DB owns schema |
| REST API | Auto-generated | Auto-generated | No (GraphQL only) |
| GraphQL | Auto-generated | Plugin | Auto-generated |
| Admin UI | Auto-generated | Auto-generated | Console |
| Flows/Automation | Visual builder | Webhooks only | Event triggers |
| License | GPL v3 | MIT | Apache 2.0 |
Getting Started
# Docker
docker run -p 8055:8055 directus/directus
# npm
npx create-directus-project my-project
# Admin: http://localhost:8055
The Bottom Line
Directus doesn't replace your database — it supercharges it. Point it at any SQL database and get instant APIs, a beautiful admin panel, and granular access control. No migration needed.
Need data extraction? I build scraping tools. Check my Apify actors or email spinov001@gmail.com.
Top comments (0)