Quick start
Prerequisites
| Tool | Version | Why |
|---|---|---|
| Go | 1.26.11 or newer | builds and runs the API |
| PostgreSQL | 16 or newer | the only database (local install, Docker, or a managed one) |
| Node.js | 20.19+ (22.23+ for the docs site) | builds the app and the developer dashboard |
| make | any GNU make | shortcuts; every target is also a plain go command |
Run it
-
Make it your repository. On GitHub, press Use this template → Create a new repository. You get your own repository with a clean history, not a fork that points back here. (Just trying it out? Clone this repository directly.)
-
Clone and configure. Copy the example environment; every value has a working local default.
Terminal window git clone <your-repository-url> ims-go-saas-kit && cd ims-go-saas-kitcp .env.example .envmake key-generate # writes APP_KEY to .envAPP_KEYencrypts what the app must read back (two-factor secrets, codes in queued jobs). Locally an empty key falls back to a public development key with a warning; staging and production refuse to start without a real one. -
Give it your names. One command rewrites the kit’s names everywhere: the Go module path, the binary and CLI (
ims→shop), the deploy names and paths, the display title and theIMS_deploy variables. It also renames the systemd units and regenerates the code and docs. It refuses to run with uncommitted changes, so the rename is one reviewable commit. The full story, including what it leaves alone, is in Make it yours.Terminal window make rename MODULE=github.com/acme/shop-api DRY=1 # previewmake rename MODULE=github.com/acme/shop-api BINARY=shop TITLE="Acme Shop" # NAME, BINARY, TITLE are optionalgit add -A && git commit -m "chore: rename the kit to shop-api"NAMEdefaults to the last part of the module (shop-api),BINARYto the name, andTITLEto the name in title case (Shop API). Left as they are: the seeded@ims.comaccounts and the credit links. Run it once; it refuses a project that has already been renamed. The commands below use the kit’s names: substitute yours. -
Install the tools once.
air(hot reload) andgolangci-lint, then the packages of the two web apps: the developer dashboard and the app.Terminal window make toolsnpm --prefix web/dev cinpm --prefix web/app ci -
Start Postgres — skip this if you already have one running.
Terminal window make db-up # docker compose: creates ims_go_api and ims_go_api_test -
Create the schema and seed data. Migrations first, then permissions, the default tenant, roles and two accounts.
Terminal window make migrate seed -
Run everything with hot reload. One command starts three processes: the developer dashboard (:8080), the app (:8082), both with Vite hot reload, and the API (:8081), rebuilt by
airwhen you save a Go file. Both dev servers forward API calls to :8081.Terminal window make dev
$ make migrate seedgoose: successfully migrated database to version: 34River schema: v8 (0 pending)seeded permissions, tenant "Main Tenant", roles Admin + Developeraccounts: superadmin@ims.com, developer@ims.com$ make devdashboard → http://localhost:8080/dev/app → http://localhost:8082air → building ./cmd/app … running on :8081http server listening addr=:8081 env=localLook around
Three addresses, one running kit:
| Open | What it is | Sign in as |
|---|---|---|
| localhost:8082 | the app: the organization workspace and the staff console | superadmin@ims.com for the console, or press Create an organization to sign up as a new customer |
| localhost:8080/dev/ | the developer dashboard: requests, queue, logs, commands | developer@ims.com or superadmin@ims.com |
| localhost:8080/docs | the API reference (Scalar, from api/openapi.yaml) |
no sign-in to read; paste a token to try calls |
The seeded password is 123456 (AUTH_DEFAULT_PASSWORD).
| Account | Can | |
|---|---|---|
| Super Admin | superadmin@ims.com |
everything: the staff console, every organization, the dashboard |
| Developer | developer@ims.com |
the developer dashboard |
Try the app first. Sign in as the super admin: you land in the staff console. Open Organizations, pick the seeded “Main Tenant” organization and press Impersonate to see its workspace the way its members do. Then sign out and press Create an organization on the sign-in page: you go through sign-up and the setup wizard like a new customer. The tour of every screen is in The app.


Call the API
Everything the app does is an API call you can make yourself. Sign in and use the system side with just the token, the way the staff console does:
TOKEN=$(curl -s localhost:8080/api/v1/login -H 'Content-Type: application/json' \ -d '{"email":"superadmin@ims.com","password":"123456","device":"cli"}' | jq -r .data.token)AUTH=(-H "Authorization: Bearer $TOKEN")
curl -s localhost:8080/api/v1/tenant "${AUTH[@]}" | jq # system panel: every tenantcurl -s localhost:8080/api/v1/branch "${AUTH[@]}" | jq # a tenant resource, read across all tenants$login = Invoke-RestMethod http://localhost:8080/api/v1/login -Method Post ` -ContentType 'application/json' -Body '{"email":"superadmin@ims.com","password":"123456","device":"cli"}'$auth = @{ Authorization = "Bearer $($login.data.token)" }
Invoke-RestMethod http://localhost:8080/api/v1/tenant -Headers $auth # system panel: every tenantInvoke-RestMethod http://localhost:8080/api/v1/branch -Headers $auth # a tenant resource, read across all tenantsTo work inside one tenant, add the acting headers. Reads narrow to that tenant, and writes to tenant resources need them (without them the super admin gets 403):
ACT=(-H "X-Acting-Tenant: 1" -H "X-Acting-Branch: 1")
curl -s localhost:8080/api/v1/branch "${AUTH[@]}" "${ACT[@]}" | jq # tenant 1 onlycurl -s localhost:8080/api/v1/branch "${AUTH[@]}" "${ACT[@]}" \ -H 'Content-Type: application/json' -d '{"name":"Uptown"}' | jq # a write inside tenant 1$act = $auth + @{ 'X-Acting-Tenant' = '1'; 'X-Acting-Branch' = '1' }
Invoke-RestMethod http://localhost:8080/api/v1/branch -Headers $act # tenant 1 onlyInvoke-RestMethod http://localhost:8080/api/v1/branch -Method Post -Headers $act ` -ContentType 'application/json' -Body '{"name":"Uptown"}' # a write inside tenant 1Background work
Queue jobs (mail, imports, backups) and scheduled tasks run in their own processes. Start them in two more terminals when you need them:
make queue # ims queue:workmake schedule # ims scheduleNext steps
- Understand the request path: How it works.
- Find your way around the folders: Project tour.
- See every screen: The app.
- Build something, from the table to the screen: Your first feature.
- Let an AI agent use your API: Connect an AI agent.
- Something not working? Local development & troubleshooting.

