Skip to content

Restructure as a starter with a Directus template - #150

Merged
bryantgillespie merged 11 commits into
mainfrom
bry/add-directus-template
Nov 7, 2026
Merged

bryantgillespie merged 11 commits into
mainfrom
bry/add-directus-template

Conversation

@bryantgillespie

@bryantgillespie bryantgillespie commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Lets directus-template-cli init set up AgencyOS from this repo, staying on Directus 11.

  • Moves the Nuxt frontend into nuxt/ (all git mv, history kept)
  • Renames .directus/ to directus/, with Docker setup matching the starters, pinned to Directus 11.17.4 (last v11)
  • Keeps the Directus template at directus/template (replaces .directus/template from Move the Directus template into this repo #152)
  • Adds a root package.json with directus:template so init finds the template and the Nuxt frontend
  • nuxt/.env.example points at http://localhost:8055, so a fresh init talks to the local instance
  • README covers init, manual setup, and apply from the new template path

Staying on 11 because AgencyOS has 71 collections and the Directus 12 core tier allows 25, so on 12 it needs a license.

CI fixes

  • Lint: moved to an ESLint 9 flat config (nuxt/eslint.config.mjs, same rules, typescript-eslint v8). Lint never ran before because ESLint 9 ignored .eslintrc.js.
  • Typecheck: useDirectus typed commands against a schema that didn't exist, so every query lost its types. Fixing that surfaced ~200 real mismatches in nuxt/types and the pages, now fixed without changing what's requested.
  • Real bugs fixed along the way: project contacts in the portal showed "Unknown User" (contact names weren't requested), and invoices showed "Issued on Jan 1st, 1970" when the date is empty.
  • directus/.env.example leaves cookie domains empty. Browsers reject cookies for localhost, which broke portal sign-in locally.
  • CI reads the pnpm version from nuxt/package.json and runs on Node 22.
  • Vercel needs Root Directory set to nuxt (done).

Quick Start

npx directus-template-cli@latest init --template=https://github.com/directus-labs/agency-os

Then create a static token for the admin user and set DIRECTUS_SERVER_TOKEN in nuxt/.env.

Test plan

  • Start Directus 11.17.4 from directus/, apply directus/template with the same args init uses: applies cleanly (71 collections, 20 flows, 3 dashboards, no errors)
  • Nuxt dev server against it: home, /posts, a post, /projects, /help, /manifesto, /team, /services, /contact-us, /portal, /auth/signin all render
  • Full init run on a machine with port 8055 free (ran its steps by hand on another port)
  • Portal sign-in as a client user: dashboard, projects, project detail (contacts show names), invoices, invoice detail
  • pnpm build and lint/typecheck pass locally and in CI

- Move Nuxt frontend into nuxt/ subdirectory
- Move .directus/ to directus/ and update to Directus 11.15.4
- Add extracted Directus template data in directus/template/
- Add root package.json with directus:template config for CLI compatibility
- Update README with new project structure and quick start
@vercel

vercel Bot commented Mar 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agency-os Ready Ready Preview Nov 7, 2026 1:42pm UTC

Request Review

- Rewrite README for directus/ + nuxt/ monorepo layout
- Update repo references to directus-labs/agency-os
- Update deploy buttons with root-directory=nuxt
- Fix CI workflows to run in nuxt/ working directory
- Bump GH actions to v4
- Fill in directus/ and template READMEs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bryantgillespie bryantgillespie changed the title feat: restructure as monorepo with Directus template Restructure as a starter with a Directus template Nov 7, 2026
@bryantgillespie
bryantgillespie merged commit d60ebb7 into main Nov 7, 2026
4 checks passed
@bryantgillespie
bryantgillespie deleted the bry/add-directus-template branch November 7, 2026 13:42

This branch was successfully deployed

1 active deployment
Preview — c4f520a6 Deployed Nov 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant