Phase 39 · planning only

Server persistence & identity architecture

Footprint for future accounts and selective cloud slices — still zero backend, zero auth wiring. Local snapshot remains today’s source of truth.

Narrative summary

Server persistence plan · anonymous local posture

  • Nine persistable slices are catalogued — 7 default private, 1 table-shared ledger posture, 1 host-visible coordination.
  • Game-adjacent ledgers sync as ordered facts; coaching preference and BYOC remain user-owned unless future consent flows say otherwise.
  • Migration spine emphasizes codec parity, slice-by-slice rollout, and explicit merge surfaces — 7 staged steps in the canonical plan.
  • Non-goals lock out backend implementation until reviewers approve: Implementing OAuth connectors, hosted relational adapters, REST handlers, or Next.js mutation endpoints in Phase 39. Live socket transports, push fan-out layers, or multiplayer matchmaking.

Persistable slices

Planning-only catalog — no remote writes. Privacy defaults follow Phase 39 doctrine.

SlicePrivacy defaultConflict policyShareable
onboarding
Beginner onboarding ladder
privateserver_last_write_winsNo
session_progress
Session continuity markers
privateappend_only_mergeNo
coaching_preference
Coaching depth preference
privateserver_last_write_winsNo
byoc_references
BYOC shorthand & anchors
privateexplicit_user_merge_requiredNo
guided_practice
Guided practice rack focus
privatedevice_scope_last_write_winsNo
solo_practice_ledger
Latest solo practice ledger
privateledger_sequence_authoritativeNo
solo_table_ledger
Solo / local-bot table ledger
table sharedledger_sequence_authoritativeYes
private_table_setup
Private table salon setup
host visibleserver_last_write_winsYes
replay_reflections
Replay reflection taps
privateappend_only_mergeNo

Migration steps

  1. Freeze `schemaVersion` increments with explicit migration scripts — never silently rewrite learner blobs.
  2. Ship read-only export (JSON) before any write path touches hosted storage — proves codec parity.
  3. Land identity stub (`signed_in_future`) with zero gameplay mutations — feature-flag server reads per slice.
  4. Migrate onboarding + coaching preference first — smallest blast radius, easiest rollback.
  5. Gate BYOC references behind encryption + explicit consent strings — default stays unsynced.
  6. Introduce solo-table ledger replication only after multiplayer architecture review — append-only validator contract.
  7. Private-table roster sync remains opt-in per host — merge conflicts surface in UI, never silent overwrite.

Privacy principles

  • Local snapshot remains the rehearsal source of truth until learners opt into cloud continuity.
  • BYOC notes and coaching overlays default private — table transports carry ledger facts, not notebooks.
  • Host-visible slices expose coordination metadata only — never substitute for participant consent.
  • Ledger sequences beat narrative overlays — conflicts resolve by authoritative event order later.

Phase 39 non-goals

  • Implementing OAuth connectors, hosted relational adapters, REST handlers, or Next.js mutation endpoints in Phase 39.
  • Live socket transports, push fan-out layers, or multiplayer matchmaking.
  • Payments, tournaments, marketplace hooks, stakes, or wagering metadata.
  • Digitizing official NMJL card typography into persisted payloads.

Next gate: Phase 40 chooses providers and minimum account fields — still no implementation until reviewers sign off.