data-model-spec · supabase_json
B2BEA.org V1 Data Model Spec
data-model-spec artifact · for B2BEA.org Rebuild · status approved
Agent Handoff
Start Here
data-model-spec artifact · for B2BEA.org Rebuild · status approved
Completion Evidence
No explicit evidence field yet. Require tests, screenshots, linked PRs, or reviewed outputs before marking complete.
Artifact Shape
- title: B2BEA.org V1 Data Model Spec
- version: 1
- decisions: 5 items
- next specs: 6 items
- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44
- updated at: 2026-05-06T20:34:52.340Z
- schema gaps: 10 items
- source repo: /Users/justinking/Vaults/Projects/B2BEA-org-new
- live domains: 9 items
- artifact type: data-model-spec
- source artifacts: 4 items
- current row counts: jobs: number, events: number, people: number, courses: number, lessons: number, modules: number, vendors: number, page_views: number, memberships: number, scrape_runs: number, search_logs: number, b2bew_events: number
Structured Payload
Machine-readable source fields
title
B2BEA.org V1 Data Model Spec
version
1
decisions
| id | topic | decision |
|---|---|---|
| DM-DEC-001 | Profiles and operational data | B2BEA Supabase owns people, organizations, vendors, memberships, seats, academy, surveys/forms, jobs/events operations, analytics, notifications, and operational records. |
| DM-DEC-002 | Editorial content | Sanity owns standard public/editorial page content and SEO/GEO/social editorial fields. |
| DM-DEC-003 | CRM | HubSpot is primary CRM for leads, pipeline, sales activity, and renewals. B2BEA Supabase may store intake/submission references and profile relationships. |
| DM-DEC-004 | Public company profiles | Vendor public profiles remain V1. Practitioner company public profiles are excluded from V1; company workspace is private only. |
| DM-DEC-005 | Legacy persons table | The target model uses people. Any remaining persons references must be migrated or shimmed before production rebuild launch. |
next specs
- survey-system-spec
- company-workspace-data-spec
- entitlement-model-spec
- notification-spec
- sanity-schema-spec
- media-asset-model-spec
project id
a820dd0c-6cef-4133-bfbd-d802fd806e44
updated at
2026-05-06T20:34:52.340Z
schema gaps
| id | area | current | required | severity |
|---|---|---|---|---|
| DM-GAP-001 | Legacy people/persons split | Live schema has people; current code still references persons in authbridge and older docs/plans. | All production code uses people, or a compatibility view/shim is intentionally created and tested. | P0 |
| DM-GAP-002 | Generalized surveys | assessment_sessions exists; no live surveys/survey_questions/survey_responses schema. | Create survey definitions, questions, assignments/audiences, responses, reporting/export tables. | P0 |
| DM-GAP-003 | Reusable forms/intake | No live forms/form_submissions schema. | Create form definitions, submissions, status/assignment, spam/rate metadata, export support. | P1 |
| DM-GAP-004 | Private company workspace | organizations and organization_members exist; company workspace seats/academy/careers entitlements are not first-class. | Define company account, employee roles, seat lifecycle, benefit grants, team reporting, and assignment tables or extend existing membership_seats/organization_members. | P0 |
| DM-GAP-005 | Entitlement model | Membership tiers, memberships, seats, course access fields, vendor memberships exist separately. | Unify access decisions for resources, courses, events, company seats, vendor portal, and pro membership. | P0 |
| DM-GAP-006 | Events model split | Generic events and b2bew_* operational event tables coexist. | Define boundary or consolidate: marketing event pages vs event operations/registration/sponsorship. | P1 |
| DM-GAP-007 | Notifications | No notification event/preferences/delivery schema observed. | Email-first notification event log, template key, recipient, delivery status, provider ids, retry/suppression. | P0 |
| DM-GAP-008 | Certification and learning paths | Courses/progress exist; no certificates/certifications/learning_paths observed. | Certification requirements, issued certificates, learning paths, company assignments. | P1 |
| DM-GAP-009 | Media/storage | Code references headshots storage and graphic_assets; live storage bucket list returned empty and graphic_assets is not in public OpenAPI schema. | Verify storage buckets/RLS and define media asset source of truth for headshots, graphics, page/social images. | P1 |
| DM-GAP-010 | HubSpot handoff | HubSpot is decisioned as CRM primary; live Supabase has people.hubspot_contact_id implied by migration but no visible CRM pipeline tables. | Define lead capture/submission handoff, HubSpot ids, sync status, failure handling, and audit fields. | P1 |
source repo
/Users/justinking/Vaults/Projects/B2BEA-org-new
live domains
| name | tables |
|---|---|
| Core identity and organizations | - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object |
| Vendors and vendor portal | - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object |
| Membership and entitlements | - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object |
| Academy and learning | - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object |
| Careers and scraping | - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object |
| Events | - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object |
| Search, analytics, content support | - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object |
| Assessments and plan builder | - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object |
| Profile extensions and taxonomy support | - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object - item: rows: number, table: string, columns: object |
artifact type
data-model-spec
source artifacts
| version | artifact id | artifact type |
|---|---|---|
| 5 | c889a1fe-c3ce-4b0d-873c-af4e0ec8dfe4 | capability-map |
| 3 | 80328220-3deb-4cf9-a68f-d440b41a38da | production-readiness-gap-register |
| 3 | dcfc8620-9f28-4019-aeeb-de3e279fd7a7 | permission-lifecycle-matrix |
| 1 | a9636e2f-a4be-4586-82dd-c1a7bf3199fa | publishing-model-spec |
current row counts
jobs
30
events
46
people
6733
courses
9
lessons
40
modules
10
vendors
187
page views
6
memberships
1
scrape runs
124
search logs
36
b2bew events
3
target entity model
| notes | entity | status | source of truth |
|---|---|---|---|
| Large live table; target replaces any old persons usage. | Person/Profile | current | B2BEA Supabase: people |
| Private company workspace can build on this, but seats/entitlements/roles need clearer company-workspace model. | Organization/Company | current/needs_v1_extension | B2BEA Supabase: organizations + organization_members |
| Vendor profiles are public; vendor self-service tables exist but most are empty. | Vendor | current | B2BEA Supabase: vendors + vendor_* tables |
| Needs unified entitlement model for pro, vendor, company seats, academy/careers/resources/events. | Membership/Entitlement | partial | B2BEA Supabase: membership_tiers, memberships, membership_seats, vendor_memberships |
| Needs certification, learning paths, company assignment, and stronger entitlement links. | Course/Learning | current/partial | B2BEA Supabase: courses/modules/lessons/progress |
| assessment_sessions exists; generalized survey/question/response/reporting tables do not. | Survey/Assessment | partial | B2BEA Supabase target |
| No generalized forms/submissions model in live public schema. | Forms/Intake | missing | B2BEA Supabase target |
| Company-created job posting lifecycle needs explicit ownership/review fields. | Jobs/Careers | current/partial | B2BEA Supabase: jobs + scrape_* |
| Two event models exist and need consolidation or boundary definition. | Events/Sponsorship | current/split | B2BEA Supabase: events + b2bew_* |
| Supabase supports operational references, analytics, downloads, search embeddings. | Editorial/Public Pages | external | Sanity |
| B2BEA.org captures/routes lead intake; HubSpot owns pipeline and renewals. | CRM Lead/Opportunity | external | HubSpot primary |
| No notification_events table observed in live schema. | Notification | missing | B2BEA Supabase target plus email provider logs |
| Needs event taxonomy and bounded export rules. | Analytics | current/partial | B2BEA Supabase: page_views, resource_downloads, search_logs |
implementation rules
- Use B2BEA Supabase for operational product data and live user/workspace state.
- Use Sanity for standard editorial/public content and page metadata authoring.
- Use HubSpot for CRM pipeline, sales activity, renewals, and opportunity lifecycle.
- Do not create public practitioner company profile routes or tables for V1.
- Do not add new feature-specific one-off intake tables when a reusable forms model should cover the workflow.
- Any member/vendor/company mutation requires ownership columns and server-side validation path.
- Every public projection needs lifecycle/status fields and archive behavior.
- Analytics exports must be bounded to own-account data by vendor/company role.
live supabase project
url host
czqxkykbhoyyjccckpqq.supabase.co
generated at
2026-05-06T20:32:33.020Z
schema source
PostgREST OpenAPI live schema
public table count
60
storage buckets observed
No items captured.