This repository has been archived on 2026-08-11. You can view files and clone it, but cannot push or open issues or pull requests.
Gishen-B2B/docs/features/org-registration.md
kirukib 3778801ef5 Ship Gishen B2B institutional portal with polished layout and mock-backed flows.
Deliver role-aware shell (sidebar, breadcrumbs, quick search, tables, detail/create layouts), locale-ready pages, shared backend/feature docs, and Vercel project config so HR, finance, and members can demo against typed mocks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 21:18:23 +03:00

2.5 KiB

Feature: Org registration

Self-serve organisation signup and assisted request-to-register before Admin activates commercial terms.

Workspace: /Users/kirukib/Desktop/Yaltopia Project/Gishen-B2B

Pages

Route Purpose
/register/organisation Full self-register form + first SUPER_USER account
/register/request Lightweight lead form (email or phone)
/login CTAs: "Register organisation", "Request registration"

Flows

Self-register

User fills company + SUPER_USER details
  → POST /v1/org/register
  → Org created (pending_activation)
  → Session as SUPER_USER
  → Dashboard shows pending banner
  → Admin activates → org.activated event → full access

Request to register

User submits contact + channel preference
  → POST /v1/org/register/request
  → Confirmation message
  → Gishen sales contacts client offline
  → Admin creates/activates org + invites SUPER_USER

Entities

Endpoints

  • org.md
    • POST /v1/org/register
    • POST /v1/org/register/request
    • GET /v1/org/registration-status

Events

Event When
org.registration_submitted Self-register success
org.registration_requested Request form success
org.activated Admin activates (consumed)

Pending org restrictions

Until org.status === active:

Allowed Blocked
View registration status Create active members
Edit submitted company details (limited) Migration commit
Draft packages (optional) Assign packages to members
SUPER_USER session Finance statements

Default: block all entitlements until activation.

Validation

Field Rule
legal_name Required, min 2 chars
tin Required, unique
billing_contact.email Valid email
billing_contact.phone E.164
super_user.password Min 8, 1 upper, 1 digit
Request channel=email Email required
Request channel=phone Phone required

Clinical withhold

Registration flows contain no clinical data.

Coordination

UI components

  • Multi-step form (company → admin account → confirmation)
  • Pending activation banner on AppShell
  • Request form with channel radio (email / phone)