Feature Specification: Org & User Mgmt
1. Overview & Vision
The Org & User Management feature is the administrative control center for the platform. It handles the lifecycle of organizations (tenants) and their members, ensuring that every user is correctly mapped to their corporate identity and organizational context.
2. Personas & Stakeholders
| Persona | Goal |
|---|---|
| Org Admin | Invite members, manage profiles, and configure org settings. |
| End User | Complete onboarding and update personal profile. |
| System Admin | Approve B2B onboarding requests and monitor tenant health. |
3. User Stories
- As an admin, I want to invite my team via email so they can access our workspace instantly.
- As an admin, I want to change our company logo and slug to match our rebranding.
4. Functional Requirements (FR)
- REQ-MGMT-001: B2B Onboarding workflow for new organizations.
- REQ-MGMT-002: Email-based member invitation system with role selection (Owner / Admin / Member).
- REQ-MGMT-003: Organization profile management (Logo, Name, Domain, Slug).
- REQ-MGMT-004: User status lifecycle (
ACTIVE,INACTIVE,SUSPENDED). - REQ-MGMT-005: Pending invitations list — org admin can view and revoke outstanding invites.
- REQ-MGMT-006: Member role filter (All / Admin / Member) in the Members tab.
- REQ-MGMT-007: SCIM 2.0 provisioning — automated user/group sync from external IdP via bearer token.
- REQ-MGMT-008: Delete member with confirmation dialog and error feedback.
5. Non-Functional Requirements (NFR)
- Isolation: Mandatory
organization_idon all tenant-specific records. - Consistency: 100% parity between User state in Shell and satellite modules.
6. Business Logic & Rules
- Unique Slugs: Organization slugs must be globally unique.
- Domain Locking: (Optional) Prevent users with non-corporate emails from joining an org.
- Invite Expiry: Invitations expire after 48 hours for security.
7. User Interface (UI/UX)
- "Organization Settings" dashboard.
- "Members" list with search, filter, and bulk actions.
- "Invite User" modal with role selection.
8. Information Architecture
- Primary admin interface in the Shell.
- User profile editing exposed in the top-bar.
9. Data Model & Persistence
- Tables:
organizations,users,onboarding_requests.
10. API & Service Layer
GET /api/usersPOST /api/users(create member directly)PUT /api/organizations/:id
11. Integration Patterns
- Mail Service: Integrates with SendGrid/AWS SES for invitation emails.
- Satellite Sync: Changes to user status are broadcasted to satellite modules via event hooks.
12. Security & Permissions
- Only
Org Admincan invite or remove members. Ownerrole is required to delete an organization or change its slug.
13. Error Handling & Resilience
- Validation for invalid email domains.
- Graceful handling of "Already Invited" states.
14. Performance & Scalability
- User lists are paginated and searchable.
- Organization metadata is cached in the API layer.
15. Globalization & i18n
- Multi-language support for invitation emails.
16. Accessibility (a11y)
- Screen reader friendly user tables and action menus.
17. Observability & Analytics
- Tracking of "Active Monthly Users" (MAU) per organization.
- Conversion tracking for the B2B onboarding funnel.
18. Testing & Quality
- Integration tests for the invite-to-active conversion flow.
- Validation of slug uniqueness logic.
19. Constraints & Assumptions
- Assumes organizations have at least one valid admin at all times.
20. Future Enhancements
- Member groups / Teams (v2).
- Bulk import via CSV.
- Org admin self-service SSO configuration (see Identity & SSO).