
Building a link-in-bio and short-link site with EmDash and Astro
How I built rser.me: a link-in-bio page and short-link service on EmDash, Astro and Cloudflare Workers, with link cards that double as short links and 302 redirects.
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>

How I built rser.me: a link-in-bio page and short-link service on EmDash, Astro and Cloudflare Workers, with link cards that double as short links and 302 redirects.
Read more
How I set up my Xteink X4 Pro e-reader: CrossPoint Reader firmware flashed from the browser, custom sleep-screen wallpapers, and books and PDFs over Wi-Fi.
Read more
How Talk To My Sites sends signups, logins and funnel events to a Get Butters feed, and how I alert on the errors that actually matter.
Read more