Skip to content

Atlas v1 Prisma schema draft#1

Draft
bpalmer77fluid wants to merge 1 commit into
mainfrom
claude/atlas-certified-counties-fvwIz
Draft

Atlas v1 Prisma schema draft#1
bpalmer77fluid wants to merge 1 commit into
mainfrom
claude/atlas-certified-counties-fvwIz

Conversation

@bpalmer77fluid

Copy link
Copy Markdown
Owner

Summary

  • Adds backend/prisma/schema.atlas-v1.prisma as a design draft for Atlas v1
  • Live droplet schema (schema.prisma) is untouched
  • Models the seven-layer architecture: Fluid boundary, Workspace, Identity, Derived data, Collaboration, Audit, Sync infrastructure

Design highlights

  • Money stored as Decimal(19,4) with native amount + currency + USD snapshot + FX rate at event time
  • Time stored as UTC DateTime + sourceTimezone companion field
  • Every derived entity carries a version Int for stale-comment detection
  • Polymorphic comments via (entityType, entityId) indexed pair
  • Soft-delete on user-facing entities preserves audit trail
  • SyncState per (workspace, domain) for O(1) sync health checks
  • RawEvent archive for replay/debugging

Not yet applied

This is a review artifact, not a migration. No changes to running services.

Test plan

  • Review schema layering against the design discussion
  • Confirm Customer.email is the right natural key, or switch to fluidCustomerId
  • Confirm Fluid API actually exposes an "admin list" endpoint for auto-provisioning
  • Decide whether to constrain currency via Postgres enum or keep as String
  • Decide cutover path: in-place migration vs parallel namespace

https://claude.ai/code/session_01KbMxHgCS9ApAueQ64oBqdX


Generated by Claude Code

Design draft for Atlas as a continuously-synced, read-only,
internationalized workspace built on the Fluid droplet template.
Not yet applied — kept alongside the live schema for review.

https://claude.ai/code/session_01KbMxHgCS9ApAueQ64oBqdX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants