
Migrating this site to EmDash
This site has changed CMS more times than I can count since 2003. This time I moved to EmDash on Cloudflare, and the reason is that most of my building now happens alongside an AI agent.
Read more
The Directed Stack is a full-stack Remix stack that combines Directus as the backend and Remix for the app, easily customizable to build on
I use Directus for a lot of apps, from this blog, to several other projects.
The Directed Stack is based on the apps I built, you can see a demo where you can see the about page, blog posts and sign up and add markdown notes (based on the Indie Stack), all the backend work is stored in Directus.
To get started, you can fork the repo or run the following command:
npx create-remix --template freekrai/directed-stackThis repo contains two folders plus the root:
directus: our Directus headless CMSscripts: our Directus schema/: our Remix appOn first one, clone this repo and run:
yarn
yarn setupThen go into the directus folder and set up for local development by copying your .env.example into .env and filling out the fields.
Then run:
npx directus bootstrapYou can then import your schema into your local Directus by going into the scripts folder, save .env.example to .env, and save the required info then run:
cd scripts
node schema.mjsThis will create the collections locally in Directus, you can update the .env and run it again once your deploy (we'll talk about that further down).
If you want to test creating users locally, then you'll also need to create a users role inside the Directus Data Studio, which needs the following permissions (again, we'll talk about that further down with prod):
created By equals $CURRENT_USERcreated By equals $CURRENT_USERcreated By equals $CURRENT_USERID equals $CURRENT_USEROn the same page, there are checkboxes for app and admin, uncheck both of these if they are checked as this role will be through the api only.
Take note of this role's ID as you'll need it when you deploy the remix app
Also edit the public role:
Finally, let's load the remix app.
Copy .env.example into .env and fill out the info:
# run openssl rand -hex 32 to generate
SESSION_SECRET=session-secret
# DirectUs
DIRECTUS_URL=http://localhost:8055
DIRECTUS_STATIC_TOKEN=static-token
DIRECTUS_USER_ROLE=role-to-give-frontend-usersNow run yarn dev and go to http://localhost:3000.
This app uses a slugs extension that you want pre-installed, you can use my Directus Railway repo to get started on Railway, to deploy Directus to railway, click:
You can find more info on this repo here.
If you're prefer to install Directus on Fly.io, you can follow this repo repo instead.
Which will create the necessary collections on your deployed Directus site.
Earlier, we setup permissions for testing everything locally, we need to do the same thing to our deployed site, so create a users user role, which has permissions as follows:
created By equals $CURRENT_USERcreated By equals $CURRENT_USERcreated By equals $CURRENT_USERID equals $CURRENT_USERTake note of this role's ID as you'll need it when you deploy the remix app.
Also edit the public role:
The vercel button is already preloaded with the information you need to get deploying to Vercel
You can build on this pretty easily to create pretty much any type of app.
<callout-info>
Stay tuned for a more detailed post about how to build this site out step by step coming soon 🙏🏻
</callout-info>

This site has changed CMS more times than I can count since 2003. This time I moved to EmDash on Cloudflare, and the reason is that most of my building now happens alongside an AI agent.
Read more
I wanted a simple dashboard that showed me events as they happened, so I wrote a quick little Astro app. It grew into Get Butters: a real-time event feed with a REST API, a CLI, insight cards and push alerts.
Read more
Once four agents can edit the same repo, architecture stops being the hard problem and coordination starts. The five roles I run and what each one is forbidden to touch, why every handoff goes through a file, a worktree script so agents stop racing, and the failure modes worth naming.
Read more