Skip to content

Plan United's PocketBase-only replatform #405

Description

@nathanhruby

Destination

Produce a decision-complete, implementation-ready migration plan for a fresh implementation from main that replaces Gin, S3/KMS, and Redis with one single-writer PocketBase server. PocketBase will own group-scoped authentication, encrypted versioned state, and configurable lock leases while preserving the Terraform HTTP backend contract.

Notes

  • Planning only: this map resolves decisions and stops before implementation.
  • Do not reuse code from the nrh/plan-two branch. It is non-normative evidence only.
  • Existing S3 state is not imported by United; users migrate it by switching Terraform backends.
  • Production topology is one active process and one writer. Host infrastructure owns durable storage, backups, availability, and replication outside the application.
  • Each group identifies one state namespace and has one shared Terraform credential.
  • Human PocketBase users belong to groups with roles and manage access according to those roles.
  • Successful writes create immutable state versions. DELETE tombstones the logical state.
  • State documents use per-group data keys wrapped by a runtime master key.
  • State locks are transactional leases with an operator-configurable expiry.
  • Treat paths, credentials, key material, state documents, and lock behavior as security- and data-sensitive.

Decisions so far

Not yet specified

  • The exact crash-safe publication, missing-file recovery, and lease-fencing experiments; these become precise after the persistence and lock designs settle.
  • The operational backup, restore, and disaster-recovery validation that binds PocketBase data to its runtime master key and prevents restored backups from silently reactivating retired groups; this depends on persistence and key-lifecycle decisions.
  • State-size limits and resource controls; these depend on the persistence decision.
  • The final implementation module boundaries and execution slicing; these follow the completed domain, persistence, protocol, and rollout decisions.

Out of scope

  • Reusing or merging implementation code from nrh/plan-two.
  • Automatic S3 import, dual reads or writes, and in-application migration of existing state.
  • Active-active serving, application-level clustering, leader election, and replication.
  • Provisioning the host-level durable volume, backup system, or replication mechanism.
  • Step-up authentication or MFA for credential lifecycle operations in the initial replatform.
  • Implementing the migration while this map is being resolved.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions