Skip to content

Core Concepts

Packages separates catalog definitions (Entries blueprints) from high-throughput telemetry and credential verification (4 managed SQL tables).

flowchart LR
  Source["GitHub Webhook or CI Push (pkg_ci_)"] --> Storage["Private Archive Storage (site/assets/packages/)"]
  Storage --> Releases["packages-releases (SHA-1 & SHA-256)"]
  Payments["Payments Checkout / CLI"] --> License["packages-licenses (KeyCodec Sealed)"]
  License --> Composer["Composer v2 (/composer/p2 & /dist)"]
  License --> Zip["Versioned ZIP (/packages/download/{slug})"]
  License --> Verify["POST /packages/api/verify (Domain Quotas)"]
  License --> Portal["Customer Portal (/portal/*, pkg_tok_)"]
  Verify --> Tables["Managed SQL Tables (activations, downloads, rate_limits)"]
  • packages-items: Commercial or internal packages with Composer vendor/package name, slug, visibility, source configuration (GitHub mirror or manual/CI push), per-package tier_prices, and unique 1:1 product_page_id + documentation page bindings.
  • packages-tiers: Reusable license tier templates defining site quotas, seats, license model, update window days, and renewal discount percentage.
  • packages-bundles: Multi-package suites specifying package_ids or include_all_packages for all-access passes.
  • packages-releases: Versioned release records with semver tag, changelog, prerelease/yanked flags, archive_sha1, and .sha256 digests.
  • packages-licenses: Issued customer licenses with sealed keys (KeyCodec), masked key hints (PKG-...-XXXX), model, status, update expiry, and billing ledger links.

Packages owns four managed SQL tables under entries_tbl_packages_*:

  1. entries_tbl_packages_downloads (packages_downloads): Audit log of every Composer dist and versioned ZIP download.
  2. entries_tbl_packages_activations (packages_activations): Active production, staging, and dev domain activations linked to licenses and packages.
  3. entries_tbl_packages_rate_limits (packages_rate_limits): Sliding-window rate limiting for verify, download, and Composer endpoints.
  4. entries_tbl_packages_credentials (packages_credentials): Hashed per-customer Composer tokens (pkg_tok_...) and CI publish tokens (pkg_ci_...).
Model Access Behavior
one_time_updates Perpetual right to use versions released before updates_until; renewing extends update access (often with a renewal discount).
subscription Active access while the linked Payments subscription remains active or trialing.
lifetime Perpetual access to all current and future releases with no renewal required.
trial Time-boxed evaluation window that converts cleanly into a paid tier via upgradeLicense().

Next steps