Core Concepts
Packages separates catalog definitions (Entries blueprints) from high-throughput telemetry and credential verification (4 managed SQL tables).
Distribution & Licensing Architecture
Section titled “Distribution & Licensing Architecture”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)"]
Storage Architecture
Section titled “Storage Architecture”Entries Blueprints (PackagesBlueprints)
Section titled “Entries Blueprints (PackagesBlueprints)”packages-items: Commercial or internal packages with Composer vendor/package name, slug, visibility, source configuration (GitHub mirror or manual/CI push), per-packagetier_prices, and unique 1:1product_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 specifyingpackage_idsorinclude_all_packagesfor all-access passes.packages-releases: Versioned release records with semver tag, changelog, prerelease/yanked flags,archive_sha1, and.sha256digests.packages-licenses: Issued customer licenses with sealed keys (KeyCodec), masked key hints (PKG-...-XXXX), model, status, update expiry, and billing ledger links.
Managed SQL Tables (4)
Section titled “Managed SQL Tables (4)”Packages owns four managed SQL tables under entries_tbl_packages_*:
entries_tbl_packages_downloads(packages_downloads): Audit log of every Composer dist and versioned ZIP download.entries_tbl_packages_activations(packages_activations): Active production, staging, and dev domain activations linked to licenses and packages.entries_tbl_packages_rate_limits(packages_rate_limits): Sliding-window rate limiting for verify, download, and Composer endpoints.entries_tbl_packages_credentials(packages_credentials): Hashed per-customer Composer tokens (pkg_tok_...) and CI publish tokens (pkg_ci_...).
Four Commercial License Models
Section titled “Four Commercial License Models”| 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(). |