Files
directus/docs/getting-started/introduction.md
Bevis Halsey-Perry 0c54f5a9ef Introduce SnippetToggler and New SDK Reference (#19110)
* items semi complete

* updated items page to use snippet toggler and migrated endpoint docs to use it

* updated files page to use snippet toggler and migrated REST and GraphQL endpoint docs to it

* updated activity page to use snippet toggler and migrated REST and GraphQL endpoint doc to it

* updated collections page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* updated dashboards page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated extensions page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated fields page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated flows page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated folders page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated notifications page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated operations page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated panels page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated permissions page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated presets page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated relations page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated revisions page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated roles page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Made headlines consistant with the rest of the doc pages

* Updated server page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated settings page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated shares page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated translations page to use snippet togglers and migrated REST endpoint docs to them

* Updated users page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated utilities page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated webhooks page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated authentication page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* Updated Global Parameters page to use snippet togglers where there are adjacent REST and GraphQL Examples

* Added SDK code snippets to items page and made generic variables consistant

* Added SDK code snippets to files  page and made generic variables consistant

* Few lang changes for files page

* Added SDK code snippets to activity page and made generic variables consistant

* Added SDK code snippets to collections page and made generic variables consistant

* Added SDK code snippets to dashboards page and made generic variables consistant

* removed query word from query parameter objects

* Added SDK code snippets to fields page and made generic variables consistant

* SnippetToggler border

* Used dynamic border color for snippettoggler heading

* Spacing top and bottom of snippet toggler in docs

* Removed extra HRs

* Remove manual TOC in query reference

* Small code styling change in items page

* Updated users page to use snippet togglers and migrated REST and GraphQL endpoint docs to them

* dashboards fixed up property names

* Small copy update on extensions page

* Updated keys in delete mult notifications REST

* Updated keys in operations

* Update keys in panel delete many

* Update keys in permissions

* Added quotes around generic example ID strings

* Added code formatting to final example in share public info

* Format files

* Refined sidebar

* Insert newline before ending template tags

* Fixed extra closing tags, causing an error, un users ref

* Text Formatting Users

* Put GQL related notes inside toggler

* Added SDK code snippets to flows page and made generic variables consistant

* Added SDK code snippets to folder page and made generic variables consistant

* fixing whitepsace for flows and folders page

* Consistent newlines in SnippetToggler usages

* Run prettier

* Fix 'alwaysDark' definition

* Home page snippet toggler style fixes

* Fix snippet toggler lang hover color in light mode

* Introduce different code theme for light mode

* Added SDK code snippets to notifications page and made generic variables consistant

* Switch to 'material-theme-lighter'

* Format file

* Fix tip

* Fix tip in sdk ref

* Consistent spacing for custom containers

* Added SDK code snippets to operations page and made generic variables consistant

* Lint & format code blocks

* Lint & format operations

* Added SDK code snippets to panels page and made generic variables consistant

* Added SDK code snippets to permissions page and made generic variables consistant

* Added SDK code snippets to presets page and made generic variables consistant

* Added SDK code snippets to relations page and made generic variables consistant

* Added SDK code snippets to revisions page and made generic variables consistant

* Added SDK code snippets to roles page and made generic variables consistant

* Added SDK code snippets to server page and made generic variables consistant

* Added SDK code snippets to settings page and made generic variables consistant

* app_url -> directus_project_url

* Omitted auth details in delete multiple files

* Added quotes to values in roles

* Upload a file snippets

* Pluralization for upload/import files

* More files functions typos

* Added SDK code snippets to shares page (still missing createShare(s) as endpoint not functioning currently) and made generic variables consistant

* Added SDK code snippets to translations page (missing delete endponts because not working) and made generic variables consistant

* Added SDK code snippets to users page and made generic variables consistant

* Added SDK code snippets to webhooks page and made generic variables consistant

* Added SDK code snippets to utilites page (except cleaning cache, will be tested and added in later commit) and made generic variables consistant

* Added SDK code snippets to auth page (not login, refresh, and logout though due to errors)

* Added SDK code snippets for utilsExport and clearCache

* added github username be7DOTis to contributors

* Omit auth commands in updateComment

* utilsImport

* rename app_url generic value

* changed instances of updated*operation* to update*Operation*

* missed some 'updated' changse

* Added SDK Snippets to Query Parameters page

* Add section on file security

* added create(s)Shares SDK snippet to shares page

* added console.log to create snippets

* Added delete(s)Webhook SDK snippet to webhooks page

* Added SDK snippets to extensions page

* Added create/updateSingleton section to items page

* Links in files security

* Added SDK Snippets to Schema page

* Added GQL Generic examples to snippet togglers and removed snippet toggler from Login Using SSO Providers

* Added create(s)Presets SDK Snippets to presets page

* replaced fields query in generics snippets for a more generic

* replaced fields query in generics snippets for a more generic

* Use storage value only if valid choice

* Sync snippet togglers across page

* Update docs/reference/system/activity.md

* Update docs/reference/system/activity.md

* Update docs/reference/system/extensions.md

* Update docs/reference/system/revisions.md

* Update docs/reference/system/settings.md

* Update docs/reference/system/revisions.md

* Update docs/reference/system/settings.md

* Update docs/reference/system/activity.md

* Update docs/reference/system/roles.md

* Update docs/reference/system/roles.md

* Update docs/reference/system/roles.md

* Update docs/reference/system/roles.md

* Update docs/reference/system/schema.md

* Update docs/reference/system/server.md

* Update docs/reference/system/shares.md

* Replace all directus_project_url placeholders

* Revert "Sync snippet togglers across page"

This reverts commit 8b36f0d778.

* Update docs/reference/system/shares.md

* Update docs/reference/system/webhooks.md

* Clarify singleton section

* Consistent newlines between SnippetToggler templates

* Format files

* Remove console.log(result) statements from snippet

* Add examples for shares & users

Co-authored-by: Brainslug <tim@brainslug.nl>

* Fix hash GraphQL example

* Clarify update singleton section

* Add auth examples

Co-authored-by: Brainslug <tim@brainslug.nl>

* Final run on consistent newlines between SnippetToggler

* Switch to github themes

* The "Last One"

Co-authored-by: Brainslug <tim@brainslug.nl>

* The "Big One"

* Fix dead links

---------

Co-authored-by: Bevis Halsey-Perry <hi@be7.is>
Co-authored-by: Kevin Lewis <kvn@lws.io>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
2023-07-25 17:30:37 -04:00

11 KiB

description, readTime
description readTime
An introduction to what Directus is, how it works, who it is for, and when to use it. 8 min read

Introduction

These Docs will help you get Directus up-and-running quickly, guide you through advanced features, and explain the core concepts that make Directus so unique.

What is Directus?

::: tip Directus

Directus (duh REKT iss) is Latin for: laid straight, arranged in lines.
The broadest goal of our platform is to present data in a simple, orderly, and intuitive way.

:::

Directus is an Open Data Platform built to democratize the database.
This platform provides everyone on your team, regardless of technical skill, equal access to data and digital file asset management, for any data model or project. First, link Directus to your desired SQL database and file storage adapter. After that, Directus enables you to perform CRUD operations, create users, assign roles with fully configurable permissions, build complex and granular queries, configure event-driven webhooks and task automation... the list goes on!

Database Introspection & Abstraction
SQL flavors all come with slightly different data types and idiosyncrasies. Directus uses Database Introspection to read your database structure and create an abstraction layer to handle all the nitty-gritty details behind the scenes. This technique works seamlessly with any major SQL database. It also lets you link Directus to your new or pre-existing database or remove it anytime, with no impact on your existing data model. That means you'll never encounter vendor lock-in.

The App and APIs
Once your database is introspected and abstracted, Directus dynamically generates REST and GraphQL API endpoints to manage your data with granular control. You also get CLI tools for file management and a complete JavaScript SDK.

The API and CLI power the no-code App. In other words, the App is just a GUI that provides no-code access to the API. This architecture is how Directus democratizes the database and provides control to the whole team.

Open-Source, Modular, Extensible, Scalable
At the highest level, Directus organizes its features and functionality into Modules. Each Module allows you to interact with data in some specific way, such as data and content management, digital file asset management, drag and drop analytics dashboard creation, or whatever. If you find Directus is missing something that your project needs, no problem!

Built entirely in Typescript, primarily on Node.js and Vue.js, Directus is 100% open-source, modular and extensible, ensuring your project never hits a hard feature ceiling. The platform scales without issue, and some Projects have hundreds of millions of users.

You can use it with any (or many) stacks or frontend frameworks.

Custom Configuration Options
Extensive configuration options are also available as global variables in the codebase. Developers can custom configure SSO authentication method, caching details, default file storage location (local, S3, google, etc.) for digital assets, emails, and much more.

What Do Teams Use Directus For?

::: tip Ready to dive in?

Get a project running in minutes. Learn Directus hands-on in the Quickstart Guide.

:::

How It Works

Directus is installed as a layer on top of your new or existing SQL database.

The App and API dynamically "mirror" your actual schema and content in real-time. This is similar to how technical database clients (like phpMyAdmin) work. However, Database Introspection has many unique advantages:

  • Absolute control over your pure SQL database schema.
  • Complete transparency, portability, and security for your data.
  • Allows importing existing databases, unaltered and without migrations.
  • Direct database access and the full power of raw, complex SQL queries.
  • Significant performance improvements through optimizations and indexing.

In contrast, other platforms typically use a predefined or proprietary one-size-fits-all data model to store content . That is not the case with Directus. Directus gives you direct access to your pure and unaltered data. That means you have the option to bypass the Directus middleware (API, SDK, App) and connect to your data with proper SQL queries. This effectively removes all bottlenecks, latency overhead, and proprietary access limitations.

Who's It For?

Directus lets the whole team work together and access data in one place.

Developers
Developers get a complete data connection toolkit with REST and GraphQL APIs, a JavaScript SDK, access to global variables to customize configuration options, and direct command-line access to digital assets.

Power Users
Data analysts and data scientists have in-app tools to query data, build out in-app analytics dashboards, and extract or upload data in file format. Additionally, these users are still free to link other services and run raw SQL queries directly on the database.

Business Users
The no-code app is safe and intuitive enough to make data accessible to everyone, even the most non-technical users. Administrators can create fully granular permissions for roles as well as individual users.

::: tip Directus Vocabulary

To keep things simpler, especially for the no-code users, Directus uses friendlier names for many database terms and technical concepts, including Project (database), Collection (table), Field (column), Item (record), and Type (datatype).

:::

When to Use It

Directus can power any data-driven project and can be linked or removed at any time.

Build, monitor or manage any data model or app you desire: IoT fleets, e-commerce, SaaS, business data analytics, multi-channel content, or anything else! If it involves SQL and digital files, you can link up Directus. With this in mind, four broad use cases do emerge:

Backend as a Service
An end-to-end data solution. Efficiently connects data, auto-generates exhaustive APIs for projects that scale, and provides webhooks and task automation. Completely detached from the database, you're free to link and remove Directus anytime or use any other service in tandem.

Headless CMS
Remember, content is just data from a database! Manage any omnichannel digital experience. Deliver file assets and data across websites, apps, kiosks, digital signage... the sky's the limit!

Internal Tool Builder
The whole team can build custom apps! Ditch the spreadsheet and quickly build back-office apps and admin panels for customers, inventory, projects, marketing, or anything else.

Data Management and Analytics
Establish a single source of truth for all data. Build no-code analytics dashboards to gain insights into company KPIs and other metrics. Coalesce previously siloed department data.

Why Use It?

Directus is a simple, data-first solution to complex problems with no downsides.

Directus was created in 2004 and has been slowly, iteratively improved on for a long time. The core team has carefully thought through the app, beginning to end, and strives to make this platform an all-benefit and no downside experience. It is also plug-and-play, so you're free to link or remove it anytime, with zero impact on your data. You have no vendor lock-in whatsoever, your data is yours. There are no artificial data limits (e.g. limits on users or roles).

Consider competing platforms in the four general use cases mentioned above. Due diligence to select a viable solution from one of these categories can easily take six months to ensure the feature list, pricing, scalability, migration options, etc.. all match the project in question. However, with Directus, that's not the case! You can test it immediately on an existing database or build a new data model from scratch, with no impact on your data and no long-term commitments.

The following core principles guide this platform:

  • Pure — No predefined or proprietary schema. All system metadata is stored separately.
  • Open — Directus Core is open source, with no obfuscated or cloud-only code.
  • Portable — No vendor lock-in. Your database can be exported or migrated anytime.
  • Limitless — No arbitrary limits or paywalls on users, roles, translations, and data.
  • Extensible — Every aspect of this platform is modular to avoid any hard feature ceiling.
  • Unopinionated — Choose the stack, database, and architecture as you wish.

Directus Cloud

Directus Cloud is the fastest and easiest way to get your Directus Projects going.

Cloud architecture can be complicated and resource-intensive. Directus Cloud provides scalable, optimized storage and infrastructure, and automatic updates so developers can focus on the app's core business logic.

With your free Directus Cloud account, you can set up Teams to organize Projects, Project billing, and other Team Members however you need. You'll be able to get a Project running in about 90 seconds. Then as Project growth changes over time, scale service up or down as needed at the click of a button. The cloud dashboard also provides simple, straightforward analytics to help understand traffic and inform scaling decisions.

::: tip Ready to try Directus Cloud?

Set up your free Cloud account and learn Directus hands-on in the Quickstart Guide.

:::

::: tip Enterprise Cloud

Need advanced configuration, unlimited scalability, and dedicated support? Contact us

:::