Liking cljdoc? Tell your friends :D

PG Sync Compatibility Matrix

Purpose

This matrix maps the current role of each repo in the PG-first, :db/sync architecture.

Summary Matrix

Capabilityfoundation-basestatstrade-corestatstrade-v1gw-v2Status
rt.postgres grammar/runtimeCanonical implementationConsumedConsumedConsumedStrong
defpolicy.pg / RLSCanonical implementationMostly absent in old designActive usageActive usageStrong outside -core
xt.db graph query and sync layerCanonical implementation and backboneHeavy usage and reference architectureMinimalMinimalStrong but aging
:db/sync client convergence modelPartial primitivesStrong historical referenceIndirectIndirectNeeds recovery
sqlite client projection patternDriver + backend primitivesSQL/cache split presentNot centralNot centralNeeds reconnection
page-level data link modelNot defined as a stable product yetImplicit server contract over xt.db patternsNot primaryNot primaryMissing in canonical form
helper function generation from entitiesPartialMacro-heavy legacy patternsStrongStrongGood reference outside foundation
code generation via output filesEmergingWeakGoodGoodDirectionally correct
infer/openapi/runtime type extractionStrong and growingMinimalMinimalStrongStrong in foundation/gw-v2

Repo Detail

foundation-base

Primary files:

Current role:

  • canonical home of rt.postgres
  • canonical home of xt.db
  • canonical location for driver contracts and SQL graph generation
  • best place to define the normalized spec used by generators
  • home of the most important backbone pieces

Gaps:

  • no thin defentity.pg authoring model yet
  • no canonical page/link runtime contract yet
  • no explicit dashboard link test model yet
  • xt.db is not emphasized strongly enough as the preserved backbone in plans

statstrade-core

Primary files:

Current role:

  • best reference for the old end-to-end architecture
  • strongest example of server query graph -> sqlite/cache -> page flow
  • strongest reference for where xt.db needs to be recovered and preserved

Gaps:

  • auth/guard layer predates current RLS direction
  • client/page contract is implicit rather than normalized
  • too much behavior is spread across old runtime idioms

statstrade-v1

Primary files:

Current role:

  • reference for generated helper function patterns around entities
  • reference for generated policy files
  • reference for output-file oriented generation rather than giant macro expansion

Gaps:

  • old app structure
  • less useful as a canonical page/data sync reference

gw-v2

Primary files:

Current role:

  • strongest modern reference for current rt.postgres
  • strongest modern reference for policy/RLS generation
  • strongest modern reference for runtime/infer/openapi direction

Gaps:

  • does not currently exercise the old xt.db client sync architecture
  • page data layer is not yet the canonical home of the old sqlite sync model

Architectural Conclusions

What is stable enough now

  • PG-first entity and function authoring
  • server-side policy and RLS
  • generated helper functions as normal output code
  • DB-first source of truth
  • xt.db as a major part of the query/sync backbone

What must be rebuilt explicitly

  • :db/sync-driven client convergence
  • normalized dashboard/list/page link model
  • thin page data contract suitable for testing before UI
  • integration between modern rt.postgres and revived xt.db sync usage

What should not be forced early

  • final page DSL syntax
  • rich hook/runtime semantics
  • edge cache policy details
  • full client architecture symmetry with Postgres

Immediate Implications

  1. foundation-base should own the new normalized authoring/generation contract.
  2. statstrade-core should provide the first recovered vertical slice.
  3. statstrade-v1 and gw-v2 should inform helper generation and policy generation.
  4. xt.db should be treated as a preserved backbone subsystem, not a temporary bridge.
  5. The first client-facing target should be a minimal Dashboard/List link contract driven by :db/sync.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close