Schema
    The Solo Mom ProjectUpdated Jun 3, 2026MD

    The Solo Mom Project database schema

    Imported Markdown source from DOCS/database/schema-overview.md.

    Source file

    DOCS/database/schema-overview.md

    Markdown73 lines
    1. ---
    2. title: Schema Overview
    3. description: Primary relational model for auth, products, taxonomy, claims, contacts, and blog
    4. status: evolving
    5. lastUpdated: "2026-03-23 12:18 ET (America/New_York)"
    6. owner: Engineering
    7. ---
    8. # Schema Overview
    9. ## Definition File
    10. - `db/neon/schema.ts`
    11. ## Core Table Groups
    12. ### Auth (Better Auth)
    13. - `user`
    14. - `session`
    15. - `account`
    16. - `verification`
    17. ### App Profile and Products
    18. - `users` (app profile, includes `is_admin`)
    19. - `products`
    20. - `bookmarks`
    21. - `product_views`
    22. - `card_backgrounds`
    23. ### Taxonomy
    24. - `taxonomy_terms`
    25. - `taxonomy_synonyms`
    26. - `product_taxonomy`
    27. ### Claims and Moderation
    28. - `product_claims`
    29. - `product_edit_proposals`
    30. ### Submissions
    31. - `product_submissions`
    32. ### Contact Enrichment
    33. - `resource_contacts`
    34. ### Taxonomy Suggestion Runs
    35. - `taxonomy_suggestion_runs`
    36. - `taxonomy_suggestions`
    37. - `taxonomy_suggestion_actions`
    38. ### Blog (migration `0116`)
    39. - `blog_posts` — post content, status lifecycle, SEO fields, cover image
    40. - `blog_tags` — tag name/slug/description
    41. - `blog_post_tags` — many-to-many bridge with composite PK `(post_id, tag_id)`
    42. ### Editorial Corpus (migration `0118`)
    43. - `editorial_sources` — one row per persisted corpus source set, such as a WhatsApp export bundle
    44. - `editorial_source_threads` — per-chat thread records with counts and non-identifying source metadata
    45. - `editorial_source_items` — redacted message/system-event records ready for downstream annotation and retrieval work
    46. - `editorial_media_artifacts` — metadata-only attachment records and future derived-artifact lane
    47. - `editorial_ingestion_runs` — operator-run history for analyze/manifest/redact/persist workflows
    48. ### Editorial Retrieval Layer (migration `0119`)
    49. - `editorial_chunks` — contiguous retrieval windows derived from persisted source items
    50. - `editorial_observations` — typed retrieval annotations linked to chunk/item evidence
    51. - `editorial_entities` — normalized entities derived from recommendation observations and linked evidence keys
    52. See `DOCS/features/blog.md` for full schema details.
    53. ## Notes
    54. - Legacy categorization columns still exist in `products` (`categories`, `labels`, `tags`).
    55. - Hierarchical taxonomy links are represented via `product_taxonomy`.
    56. - Enrichment audit flags are stored in `products.enrichment_meta`.
    57. - Editorial corpus tables intentionally store redacted working-corpus records and ingestion metadata, not raw WhatsApp source text or raw chat/member labels.
    58. - Retrieval tables are additive overlays on the redacted corpus and are designed for internal editorial intelligence and downstream brief/draft grounding.