Skip to content

Business verification, deletion, sidebar counters and admin pages - #12

Merged
3m1n3nc3 merged 13 commits into
mainfrom
feat/business-verification-and-admin-tools
Oct 22, 2026
Merged

3m1n3nc3 merged 13 commits into
mainfrom
feat/business-verification-and-admin-tools

Conversation

@3m1n3nc3

Copy link
Copy Markdown
Member

Summary

Business verification. Every organization is treated as a business that proves it may handle personal data before verifying identities in production. Development and staging stay open the whole time.

  • Settings → Business verification takes legal and registration details, a data protection officer, a privacy policy URL and a certificate of incorporation (an optional data protection registration and certificate too).
  • Platform admins review submissions in a new queue, approve or reject with a note, and can mark an organization verified directly. Managers are notified; a rejected organization corrects the prefilled form and resubmits.
  • Unverified organizations can't create production projects (new ones default to development), and live sessions on production projects return 403 organization_unverified. Admins can switch the gate off under Admin → Settings → Compliance.

Delete projects and organizations. A danger zone on each settings page, confirmed by typing the exact name. Stored media is purged in bounded batches by a maintenance job, then the row delete cascades to everything in it. Organization deletions are kept in the platform audit log.

Sidebar counters. Reviews shows sessions awaiting review, the account sidebar shows pending invitations, Settings flags a business still to verify, and admins see pending extended access and verification counts.

Admin. The organization page shows verification, session outcomes, approval rate, reviews waiting, a 30-day trend, top open risk signals and usage. A new project page (/admin/organizations/:id/projects/:pid) shows configuration, effective thresholds, extended access, outcomes and recent sessions.

Smaller changes.

  • New projects start with Arkyc's primary color instead of white.
  • A Documentation link in every sidebar opens the website's /docs (VITE_WEBSITE_URL, set by the Cloudflare deploy).
  • Extended access greys out capabilities already granted or awaiting review, and hides the request form when nothing is left to request.
  • The workflow auto-verify hint shows the accepted range and the project default.
  • CLAUDE.md links to AGENTS.md, which now asks for a branch with one commit per feature and no credits in commits, PRs or release notes.
  • The API lint config requires blank lines between statements.

Before deploying

The verification gate is on by default. On an instance with production projects, verify those organizations (or mark them verified from their admin page) right after deploying, or switch the gate off first, otherwise their live sessions are refused. Two migrations add the verification columns and table.

Tests

  • Business verification: production refused before verification, live sessions refused on an existing production project, validation, submit, double submit, admin count and document, reject without a note, approve, then production allowed; admin-only access.
  • Deletion: wrong name refused, then the project and its sessions are gone; organization deletion removes its projects.
  • Admin views: organization detail stats and trend, the project page.
  • API: 272 passed. Packages and dashboard: all passed.

CLAUDE.md is a symlink to AGENTS.md so every agent reads the same guide.
Work happens on a branch with one commit per feature, and commit messages,
pull request descriptions and release notes carry no credits.
…ions

Adds padding-line-between-statements to the API lint config, matching the
guide's rule to separate setup, validation, actions and returns.
New projects get Arkyc's brand color as their primary color, the widget falls
back to the same value, and project settings show it instead of white. The
color lives in one shared DEFAULT_PRIMARY_COLOR constant.
A Documentation item above the user menu in the organization, account and
admin sidebars opens the website's /docs. The website URL comes from the new
VITE_WEBSITE_URL, which the Cloudflare deploy now sets.
On a project's extended access page, capabilities that are granted or pending
review are greyed out with their status, and the request form is hidden once
there is nothing left to request.
The workflow address stage's auto-verify field now says it takes a score from
0 to 1 with examples, and shows the project default it falls back to.
Project and organization settings get a danger zone that deletes the project
or organization once the user types its exact name. Stored media is purged in
bounded batches by a maintenance job, then the row delete cascades to every
session, check, key, webhook, member, role and audit log. Organization
deletions are recorded in the platform audit log.
Reviews shows how many sessions await review, and the account sidebar's
Invitations shows the user's pending invitations. New count endpoints feed
them (GET /reviews/count, GET /v1/account/invitations/count), refreshed on an
interval, when the window regains focus and after review actions.
Every organization is treated as a business that proves it may handle
personal data before verifying identities in production. Development and
staging stay open.

- Organizations submit legal and registration details, a data protection
  officer, a privacy policy and a certificate of incorporation from Settings ->
  Business verification. Rejected submissions can be corrected and resubmitted.
- Platform admins review submissions in a new queue, approve or reject with a
  note, and can mark an organization verified directly. Managers are notified.
- Unverified organizations can't create production projects (new projects
  default to development), and live sessions on production projects return
  403 organization_unverified. Admins can switch the gate off under
  compliance.business_verification_required.
- Settings shows a pending count while verification is needed, and the admin
  queue badges pending submissions.
The admin organization page shows verification with a direct toggle, session
outcomes, approval rate, reviews waiting, a 30-day trend, top open risk signals
and usage. A new admin project page (organizations/:id/projects/:pid) shows a
project's configuration, effective thresholds, extended access, outcomes and
recent sessions. Session aggregates are shared with the platform stats, and the
trend chart is a shared component.
@3m1n3nc3
3m1n3nc3 force-pushed the feat/business-verification-and-admin-tools branch from f080e3b to a1246d8 Compare October 22, 2026 02:45
@3m1n3nc3
3m1n3nc3 force-pushed the feat/business-verification-and-admin-tools branch from a1246d8 to af22f11 Compare October 22, 2026 02:48
Runs the new padding-line-between-statements autofix over the API, so lint
passes. Blank lines only; no code changes.
The full gate now runs lint between the format check and typecheck, so lint
failures surface locally before CI.
@3m1n3nc3
3m1n3nc3 merged commit fe508f3 into main Oct 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant