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>
2.5 KiB
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
OrgRegistrationOrganisation(pending state)
Endpoints
org.mdPOST /v1/org/registerPOST /v1/org/register/requestGET /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
- Admin registration queue:
gishen-admin.md
UI components
- Multi-step form (company → admin account → confirmation)
- Pending activation banner on AppShell
- Request form with channel radio (email / phone)