Admin and Onboarding

This page is for org admins running customer rollouts or admin tasks.

Admin work is split across a few guides:

Organization settings

/organizations lists every org you can access. Each card has a ⋯ menu:

Manage members dialog

Opened from the ⋯ → Manage members. Shows:

Inviting someone who has no account yet? Use an invite link instead. It works for brand-new users and enforces the org's seat limit. See Data export and invites.

Theme / brand color

Top bar → theme menu (the half-moon / sun icon). Org admins see a 12-color swatch grid below the Light/Dark/System options:

Click a swatch → the choice persists to organizations.theme_primary_color (hex). Every user in the org sees the new color on next render. Realtime broadcasts the change, so other tabs/users update without a manual reload.

Click the swatch again or the Reset option to clear the override and fall back to default Blue.

Onboarding seed import

For new customer orgs, you can bulk-create departments, processes, and chains from a JSON seed.

Page: /onboarding.

Steps

  1. Side nav (or direct URL) → Onboarding.
  2. Click Load small sample or Load large sample to populate the editor with a starter JSON. Or paste your own JSON in the textarea.
  3. Click Validate. The validator counts how many rows would be created (e.g. 21 departments, 472 processes, 0 chains) and surfaces any structural errors.
  4. Click Apply to current organization.
  5. The progress chip shows Applying…. The import takes 20-60 s for the large sample (472 rows of processes inserted serially).
  6. On completion, a snackbar confirms: Imported 21 departments, 472 processes, 0 chains. The result panel shows new vs existing counts.
  7. Re-runnable - existing rows are skipped by code/name match. Re-running only adds anything new since last run.

Seed format (abbreviated)

{
  "departments": [
    { "code": "HQ", "name": "Headquarters", "sort_order": 0 },
    { "code": "DGO", "name": "DG Office", "parent_code": "HQ" }
  ],
  "processes": [
    {
      "code": "DGO-04-01",
      "name": "Strategic Planning",
      "department_code": "DGO",
      "owner_email": "amos@example.com",
      "owner_label": "DG"
    }
  ],
  "chains": [
    {
      "name": "DG Office process approval",
      "steps": [
        { "approver_type": "department_head" },
        { "approver_type": "user", "approver_email": "amos@example.com" }
      ],
      "assignments": [
        { "target_type": "department", "target_code": "DGO", "priority": 100 }
      ]
    }
  ]
}

Full schema: see lib/services/onboarding_service.dart (apply()).

Test it

Org-level settings (advanced)

Currently exposed via /organizations card edit:

On the roadmap (not yet UI):

← Back to CompStack