API Codebase Overview

The Directus API core codebase is written in PHP. It is organized with a "flat" directory structure so that developers can quickly find what they're looking for, making contributions easier.

  • /bin — Directus-specific script files used on the command line (eg: running tests or installing)
  • /config — Project configuration files for each database
  • /docker — Server specific files for Docker containers
  • /extensions
  • /logs — Error and access logs
  • /migrations — Database migrations and seeders are used during installation and version upgrades
    • [/db] — Installation Migrations and Seeders
    • ['/upgrades] — Upgrade Migrations and Seeders
  • /public — The entry point of the API (index.php) and public files (assets, uploads, and extensions)
    • /extensions — API Core and Custom Extensions (such as interfaces, pages, hooks, etc)
    • /thumbnail — Thumbnail generator
    • /uploads — API uploaded files
      • /_ — Default Project uploaded files
  • /src — The main Directus API codebase
  • /tests — HTTP response tests with actual requests, and PHPUnit code tests
    • /api — Code tests
    • /assets — Assets used for testings purposes
    • /io — Request and Response Tests (HTTP Response Tests)
    • /utils — Tests Utils functions
    • db.sql — Tests database dump
  • .editorconfig — Defines the Directus code styling
  • .gitignore — Defines which files/directories should not be committed to git
  • .scrutinizer.yml — Scrutinizer configuration to analyze the php code
  • .travis.yml — Travis CI configuration to run tests
  • LICENSE.md — This is the GPLv3 license
  • composer.json — Defines all PHP dependencies
  • docker-compose.yml — Docker configuration to compose a container
  • package.json
  • phpunit.php — PHPUnit bootstrap file
  • phpunit.xml.dist — PHPunit configuration