B2BEA.org V1 Company Workspace Data Spec
B2BEA.org V1 Company Workspace Data Spec Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: company workspace data spec Artifact ID: 05e0ed7c 416a 4d8f 853a bc3dfa3d64f6 Version: 1 Status: draft Updated: 2026 05 07T00:32:06.585172+00:00 Scope Included in V1: Private practit...
Source of record: RedKey Supabase Studio artifact.
- Project:
B2BEA.org Rebuild - Project ID:
a820dd0c-6cef-4133-bfbd-d802fd806e44 - Artifact:
company-workspace-data-spec - Artifact ID:
05e0ed7c-416a-4d8f-853a-bc3dfa3d64f6 - Version:
1 - Status:
draft - Updated:
2026-05-07T00:32:06.585172+00:00
Included in V1:
- Private practitioner company workspace only.
- Company admins and employee/member access.
- Academy seat assignment and company learning visibility.
- Company-created jobs submitted for B2BEA admin review.
- Company profile/account settings for private workspace use.
- Bounded own-company analytics/export rules.
Excluded from V1:
- Public practitioner company profile pages.
- Public company directory for practitioner companies.
- Complex internal admin permissioning beyond the Brett/Sarah/Justin light admin model.
- Company-owned CRM pipeline; HubSpot remains CRM primary.
Checked against the active B2BEA Supabase project and current B2BEA-org-new code signals.
- Supabase host:
czqxkykbhoyyjccckpqq.supabase.co - Source repo:
/Users/justinking/Vaults/Projects/B2BEA-org-new
| Table | Rows | Status | Notes |
|---|---:|---|---|
| organizations | 60 | Exists, populated | Supports name, slug, type, website, location, status, primary contact, careers extension fields. |
| organization_members | 0 | Exists, empty | Supports org-person role admin/member plus joined/removed timestamps. Currently unused live. |
| memberships | 1 | Exists, partial | Supports held_by_person_id or held_by_org_id and seat_count. Only one active person-held Pro membership observed. |
| membership_seats | 0 | Exists, empty | Supports membership seat assignment to a person. No active seat assignments observed. |
| jobs | 30 | Exists, populated | Supports organization_id, company_name, source, status, published_at, expires_at. Existing statuses do not include review/submitted. |
| courses | 9 | Exists, populated | Course access exists but needs entitlement normalization before company assignment. |
| course_enrollments | 4 | Exists, partial | Participation exists, but no company assignment/source fields observed. |
| person_roles | 8 | Exists, partial | Global person roles exist; no company-specific role scope beyond organization_members.role. |
|
Code signals:
src/admin/companies/index.njkmanages organizations and members from the internal admin surface.- Admin companies page loads people by
people.organization_idrather thanorganization_members, soremoved_atstate can drift from visible membership. - Admin companies page can upsert
organization_members, but schema role choices are onlyadmin/member; vendor roles are assigned separately throughperson_roles. - Admin jobs page can choose organizations for jobs; public company-created job submission workflow is not present.
- No practitioner company workspace route or portal surface was observed.
- No company course assignment, invitation, seat availability, or company analytics export implementation was observed.
| ID | Topic | Decision |
|---|---|---|
| CW-DEC-001 | Public surface | Practitioner company accounts are private workspace only in V1. Do not build public company profile pages or a public company directory for practitioner companies. |
| CW-DEC-002 | Canonical company account | Use organizations as the canonical company account table. Extend it for workspace/account metadata instead of creating a second company table. |
| CW-DEC-003 | Company membership | Use org-held memberships plus membership_seats as the canonical source of company seats and included benefits. |
| CW-DEC-004 | Company roles | Use organization_members for company-scoped roles. Use person_roles only for global/internal/vendor roles. |
| CW-DEC-005 | Jobs publishing | Company-created jobs require B2BEA admin review before public publishing in V1. |
| CW-DEC-006 | Academy assignments | Company admins can assign available academy content to employees only when the org entitlement grants the content and the employee has an active seat or assignment. |
| CW-DEC-007 | Analytics exports | Company analytics and exports are own-company only and must exclude raw platform-wide data and sensitive us
| Capability | Surface | Actor | Description |
|---|---|---|---|
| CompanyWorkspaceView | Company workspace | company_admin/company_member | View private company dashboard, account status, seats, assigned courses, submitted jobs, and reporting. |
| CompanyUpdateProfile | Company workspace | company_admin | Update private company workspace metadata, logo/banner for careers, website, HQ, and primary contact. |
| CompanyInviteEmployee | Company workspace | company_admin | Invite employee by email, assign role, optionally reserve/assign academy seat. |
| CompanyRemoveEmployee | Company workspace | company_admin | Remove employee access, revoke active seat, preserve audit history. |
| CompanyAssignAcademy | Company workspace | company_admin | Assign eligible course/path/certification to employee or cohort. |
| CompanyViewLearningProgress | Company workspace | company_admin | View aggregate and employee-level progress allowed by policy. |
| CompanyCreateJob | Company workspace | company_admin | Create a job submission for B2BEA admin review. |
| CompanyManageJobs | Company workspace | company_admin | View submitted/published/expired/returned jobs and make updates through
Reuse and harden:
| Table | Use | Required Hardening |
|---|---|---|
| organizations | Canonical company account and workspace profile. | Add or confirm workspace_status, workspace_enabled, and account type handling beyond pro_member/vendor if needed. Keep public profile disabled/not used for practitioner companies in V1. |
| organization_members | Company-scoped membership and roles. | Expand role enum to owner/admin/member/learner/recruiter if V1 needs distinct workflows. Use active filter removed_at is null everywhere. Add invite/acceptance fields if not using separate invites table. |
| memberships | Org-held membership and seat count. | Use held_by_org_id for company accounts. Ensure status/current_period_end drives entitlement evaluator. |
| membership_seats | Seat assignment to people. | Add assigned_by, assignment_source, and status if audit cannot be fully covered elsewhere. Enforce active seats <= memberships.seat_count. |
| jobs | Published public jobs and company-submitted job records. | Add review lifecycle statuses or separate submission table. Add submitted_by, approved_by, reviewed_at, rejection_reason, and change request fields. |
| `course_en
Add new:
| Table | Purpose | Core Fields |
|---|---|---|
| organization_invitations | Invite and acceptance lifecycle for company employees. | id, organization_id, email, role, invited_by_person_id, status, token_hash, expires_at, accepted_by_person_id, accepted_at, timestamps |
| course_assignments | Company/admin assignment of courses, paths, or certifications before/alongside enrollment. | id, organization_id, course_id, assigned_to_person_id, assigned_by_person_id, source_type, status, due_at, timestamps |
| company_job_submissions | Review workflow wrapper for company-created jobs before publishing to jobs. | id, organization_id, submitted_by_person_id, job_id, payload, status, reviewed_by_person_id, reviewed_at, review_note, timestamps |
| company_analytics_events | Optional normalized own-company analytics event stream if existing tables are insufficient. | id, organization_id, person_id, event_type, resource_type, resource_id, metadata, created_at |
| company_audit_events | Workspace audit trail for employee, seat, academy, job, export, and settings changes. | id, organization_id, actor_person_id
Employee lifecycle:
1. invited
2. accepted_active
3. seat_assigned
4. seat_revoked
5. removed
6. reinvited
Job submission lifecycle:
1. draft
2. submitted_for_review
3. changes_requested
4. approved
5. published
6. rejected
7. expired
8. removed
Academy assignment lifecycle:
1. assigned
2. enrolled
3. in_progress
4. completed
5. overdue
6. revoked
Company membership lifecycle:
1. prospect_or_inactive
2. active
3. past_due_or_suspended
4. expired
5. cancelled
| Role | Grants | Notes |
|---|---|---|
| company_owner | company.workspace.admin, company.academy.assign, company.careers.submit_job, company.analytics.export | One or more accountable company owners. May manage admins. |
| company_admin | company.workspace.admin, company.academy.assign, company.careers.submit_job, company.analytics.export | Operational company admin; can invite/remove members depending policy. |
| company_recruiter | company.workspace.read, company.careers.submit_job | Optional V1 role if hiring workflow needs separation. |
| company_member | company.workspace.read | Employee/member baseline access. |
| company_learner | company.workspace.read, academy.course.enroll.included | Employee with active academy seat or assignment. |
| b2bea_admin | admin.platform.manage, admin.content.publish | Brett/Sarah/Justin light admin model for review and support. |
| Surface | Requirements |
|---|---|
| Company workspace dashboard | Current membership/status, seat usage, employee roster, assigned academy content, job submissions, recent audit/activity, exports/downloads available to the account. |
| Employee roster | Invite employee, role selection, seat assignment/revocation, remove employee, status filters, last active/accepted state. |
| Academy management | Available courses/paths from entitlement, assign to employee/cohort, progress view, completion/certification status, export allowed reporting. |
| Careers/jobs | Create job draft, submit for review, see admin review status, respond to change request, expire/remove job. |
| Admin review | Queue of company job submissions, diff/payload review, approve to jobs table, reject/request changes, publish/unpublish, audit event. |
| ID | Severity | Area | Current | Required |
|---|---:|---|---|---|
| CW-GAP-001 | P0 | No company workspace route | Only internal admin companies page observed. | Build authenticated private company workspace surface for company admins and employees. |
| CW-GAP-002 | P0 | Empty company membership tables | organization_members and membership_seats exist but have zero rows. | Implement invite, membership, and seat assignment lifecycle with active removed_at filtering. |
| CW-GAP-003 | P0 | Role scoping | organization_members.role only supports admin/member; person_roles is global. | Define company-scoped roles and avoid using global roles for company permissions. |
| CW-GAP-004 | P0 | Academy assignment | No course_assignments/company assignment model observed. | Add course assignment model tied to org, employee, entitlement, and enrollment. |
| CW-GAP-005 | P0 | Company-created jobs | Jobs table has published/draft statuses but no company submission/review lifecycle. | Add review workflow and admin approval before public publishing. |
| CW-GAP-006 | P1 | Analytics exports | Own-company analytics export model not defined. | Define bounded event taxonomy, a
1. Fix people/persons references and decide roster truth before building company workspace.
2. Extend or formalize organization_members roles and active roster read model.
3. Implement organization_invitations and acceptance flow.
4. Wire org-held memberships and membership_seats into entitlement evaluator.
5. Add course_assignments and company academy assignment/progress reporting.
6. Add company_job_submissions or extend jobs with review fields, then wire admin review.
7. Add company audit events and notification events for invites, seat changes, assignments, and job review outcomes.
8. Add own-company analytics aggregation and export checks.
9. Build workspace UI surfaces against the hardened data contracts.
- A company admin can invite an employee, assign a seat, assign a course, and see resulting access through the entitlement evaluator.
- Removing an employee or revoking a seat removes workspace/academy access within the documented cache window.
- Company-created jobs cannot become public without B2BEA admin approval.
- Practitioner company data has no public profile route or public directory exposure in V1.
- Company exports include only own-company data and are policy-gated.
- All employee, seat, academy, job, export, and settings changes create audit events.