Getting started

From a clone to the running kit: the local stack, the demo organization, signing in, becoming a super-admin and the administrative commands of the API binary.

This guide takes a clone of the kit to a running stack with a demo organization you can sign in to. Every command was run against the Compose stack of infra/compose/README.md.

Prerequisites

Docker with Compose v2; the .NET 10 SDK and Node.js 22 with pnpm only to work on the code (see the README).

Start the stack

cp infra/compose/.env.example infra/compose/.env      # then fill every variable marked "secret"
docker compose -f infra/compose/compose.yaml --env-file infra/compose/.env up -d --build --wait

The web answers at http://localhost:3000, the API at http://localhost:5080 and Mailpit, which catches every email, at http://localhost:8025.

The demo organization

docker compose -f infra/compose/compose.yaml --env-file infra/compose/.env run --rm --no-deps api seed-demo

It creates the organization demo ("Demo Company (sample data)") with:

  • its owner, [email protected], created in the identity server with a verified address and no password;
  • four sample members (an admin and three members) and two pending invitations, all on example.com and labeled as sample data; the members cannot sign in and nobody holds the invitations' links;
  • the audit log of their creation.

Sign in at http://localhost:3000/sign-in with [email protected] and "Send sign-in code"; the code arrives in Mailpit. The plans are the catalog's; with a Stripe test key in .env, start a trial from the billing page.

Running the command again adds only what is missing, so the counts stay the same. seed-demo --email [email protected] seeds the same organization with another owner address.

Become a super-admin

Sign in once with your own address, then:

docker compose -f infra/compose/compose.yaml --env-file infra/compose/.env run --rm --no-deps api make-superadmin [email protected]

A super-admin enters the super-admin area with a second factor. The command fails, with exit code 1, for an address nobody has signed in with yet.

Administrative commands

The API binary runs these commands instead of the server when the first argument names one. They read the same configuration as the server and stop on invalid configuration with the same message.

CommandDoesExit code
migrateApplies the kit's pending migrations to ConnectionStrings:Postgres (the identity server migrates its own database).0
seed-demo [--email <address>]The demo organization above; needs the identity server's admin API (Ory:AdminUrl).0, or 1 when the identity server cannot be reached
make-superadmin <email>Makes the person with that address a super-admin.0, or 1 for an unknown address

A wrong argument prints the usage and exits with 2. From a source checkout, dotnet run --project apps/api/Colden.Api -- <command> runs the same commands with the Development settings and the user secrets of the API.