🕵️ SicherheitslückenWhatsApp-Schwachstelle: Zugriff auf Fotos bei gesperrtem Android-Handy(03.09.2026 um 09:18 Uhr)
🎥 PodcastsAuslegungssache 167: Datenschutz mit System(04.09.2026 um 06:10 Uhr)
🕵️ SicherheitslückenJetzt patchen! Es laufen derzeit Schadcode-Attacken auf Chrome(04.09.2026 um 08:48 Uhr)
🔧 AI Nachrichten What went wrong with Apple’s design group?(01.09.2026 um 13:34 Uhr)
🔧 AI Nachrichten Anthropic makes changes to stop AI agents running amok again(02.09.2026 um 03:47 Uhr)
🕵️ SicherheitslückenSerious vulnerability threatens tens of thousands of Exchange servers(03.09.2026 um 19:20 Uhr)
🕵️ SicherheitslückenWhatsApp-Schwachstelle: Zugriff auf Fotos bei gesperrtem Android-Handy(03.09.2026 um 09:18 Uhr)
🎥 PodcastsAuslegungssache 167: Datenschutz mit System(04.09.2026 um 06:10 Uhr)
🕵️ SicherheitslückenJetzt patchen! Es laufen derzeit Schadcode-Attacken auf Chrome(04.09.2026 um 08:48 Uhr)
🔧 AI Nachrichten What went wrong with Apple’s design group?(01.09.2026 um 13:34 Uhr)
🔧 AI Nachrichten Anthropic makes changes to stop AI agents running amok again(02.09.2026 um 03:47 Uhr)
🕵️ SicherheitslückenSerious vulnerability threatens tens of thousands of Exchange servers(03.09.2026 um 19:20 Uhr)

🔧 Programmierung 🕛 kürzlich 4 Min Lesezeit
0

Project-as-code for a Directus v9 backend

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

In practice, turning Directus into the backbone of a production backend takes a fair amount of setup before a project becomes productive. is the projen template we built to automate that plumbing around directus. By default it targets is a GPL fork of Directus v9 we maintain on GitHub. It does what Directus 9 did: an open-source (GPL-3 license) CMS that, with the right discipline, can stand in for a full custom backend (API, admin UI, permissions, schema), with business logic added as extensions (hooks, endpoints, operations, custom UI panels).






Bootstrap a new project






CODE
npx projen new --from @wbce/projen-d9






This creates a .projenrc.js and synthesizes the project.






What you get



The user-facing surface of the template is .projenrc.js:




CODE
import { D9Project } from '@wbce/projen-d9';
import { D9ExtensionType } from '@wbce/projen-d9-extension';

const project = new D9Project({
name: 'my-backend',
defaultReleaseBranch: 'main',
});

project.addExtension('audit-log', [D9ExtensionType.HOOK]);

project.synth();






npx projen synthesizes everything else (Dockerfile, docker-compose, extension folder, build pipeline, GitHub workflows). (set
githubConfig: false to disable)





A standardized compose stack



With a single CLI command, you can spin up a fully working local Directus environment (database, cache, and API) ready for development. It mirrors a production setup, including caching and geospatial capabilities.



The compose file is built with projen's DockerCompose construct:





  • database: postgis/postgis:13-master in order to enable geospatial functionality


  • cache: redis:6


  • directus: built from the local Dockerfile. EXTENSIONS_AUTO_RELOAD=true is set, so re-running npx projen build-extensions is enough to pick up edits with no container restart.



Bind mounts:




  • ./uploads -> /app/uploads


  • ./extensions -> /app/extensions (the extension tree that build-extensions writes into)


  • ./.env.local -> /app/.env.local (so secrets stay out of the image and git versioning)






Extensions as a pnpm workspace



addExtension(name, types, options?)adds an ExtensionFolder to the parent project. Each addExtension creates a D9ExtensionProject with three quirks:




  1. Its package.json gets the directus:extension field correctly configured.

  2. Its build task is rewritten to compile and then deposit the output in the right subfolder of extensions/

  3. If any of the types are UI extensions (INTERFACE, DISPLAY, LAYOUT, MODULE, PANEL), vue is added as a devDep automatically.



Because every extension is its own package in a real pnpm workspace, we can share packages between extensions :




CODE
// A shared library, no extension types
project.addExtension('shared', []);

// Other extensions depend on it via workspace:
const myHook = project.addExtension('audit-log', [D9ExtensionType.HOOK]);
myHook.addDeps('shared@workspace:');






And






Links




  • npm package: (GPL-3.0)

  • d9: (GPL-3.0)

  • projen: projen.io



Issues and PRs welcome.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 51%
🟡 In Evaluierung 31%
🟢 Keine Auswirkung 14%
Spannende Innovation 5%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
2 Quellen
OpenAI Agents Collude on Public Wiki to Share Sandbox Bypass and Evasion Techniques
1 Quelle
ChatGPT showing blank screen [Fix]
1 Quelle
Simcha Kosman AMA: Owning ChatGPT's Secure Sandbox
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Project-as-code for a Directus v9 backend

Thematisch verwandte Begriffe: Projectascode, Directus, backend · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...