Directus wraps any SQL database with instant REST and GraphQL APIs. No code generation, no ORM — just connect your database and get a full API.
What Is Directus?
Directus is an open-source data platform that sits on top of your SQL database. It auto-generates APIs and provides an admin dashboard for managing content.
Supports:
- PostgreSQL, MySQL, MariaDB, SQLite, MS SQL, OracleDB, CockroachDB
- REST API + GraphQL API
- Authentication and permissions
- File storage
- Webhooks and flows
Quick Start
npx create-directus-project my-project
cd my-project
npx directus start
Or Docker:
docker run -d -p 8055:8055 directus/directus
REST API
# Get items
curl http://localhost:8055/items/articles \
-H "Authorization: Bearer YOUR_TOKEN"
# Create item
curl -X POST http://localhost:8055/items/articles \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"Hello","body":"World"}'
# Filter and sort
curl "http://localhost:8055/items/articles?filter[status][_eq]=published&sort=-date_created&limit=10" \
-H "Authorization: Bearer YOUR_TOKEN"
GraphQL API
query {
articles(filter: { status: { _eq: "published" } }, limit: 10) {
id
title
body
date_created
}
}
Use Cases
- Headless CMS — content API for any frontend
- Internal tools — admin panel for your database
- Data management — visual DB editor
- API layer — instant API for legacy databases
- Digital asset management — file storage + metadata
Directus vs Alternatives
| Feature | Directus | Strapi | Hasura |
|---|---|---|---|
| Any SQL DB | Yes | No | PostgreSQL |
| REST + GraphQL | Both | REST | GraphQL |
| No code generation | Yes | Code-first | Yes |
| Self-hosted | Yes | Yes | Yes |
| Admin UI | Excellent | Good | Basic |
Need web data at scale? Check out my scraping tools on Apify or email spinov001@gmail.com for custom solutions.
Top comments (0)