Skip to main content

🚧 Installation

Clone the Repository

git clone

Install Dependencies

npm install -g pnpm
pnpm install

Generate Supabase Tables

Run the Generation Script in the Supabase SQL editor.

This will do the following:

  • Create the tables required by unSAGED.
  • Create the authentication schema and tables required by Auth.js.
  • Enable Row Level Security for the tables required by unSAGED.
  • Apply the Row Level Security policies required by unSAGED.

Expose the next_auth schema

Expose the next_auth schema in the API settings by adding next_auth to the "Exposed schemas" list.

More information here.

Then copy the output and save it for the next step.

Switch to the apps/web directory

The apps/web directory contains the unSAGED app. All following commands should be run from this directory.

cd apps/web

Set Environment Variables

The .env.local file is the main configuration file for unSAGED. It should be located in the apps/web directory of the project. Create the apps/web/.env.local file to set your environment variables.

Set Auth Secret

Create your secret with the following command:

openssl rand -base64 32

Set the NEXTAUTH_SECRET environment variable to the secret you just created.


See Auth.js Documentation for more information.

Set Supabase Variables


Run App

Run Locally

pnpm run dev

Run in Docker

When running in docker set the following environment variable:

docker build -t unsaged -f apps/web/Dockerfile . --rm
docker run --env-file=.env.local -p --name unsaged unsaged

Running in Production

To run in production, you will need to set the following environment variable.

See Auth.js Documentation for more information.