Search by

omnipack / forge

GlitchArt

Software forge for omnisense/omnibase: software and its versions, builds per platform, downloads, each version's documentation and a publish API. Licences and paid downloads (omnipack/marketplace), releases from git tags and a Composer repository (git/git-bundle) and a Unity registry (omnisense/omni

Package info

github.com/glitchr-omnisense/omnipack-forge

Type:symfony-bundle

pkg:composer/omnipack/forge

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v3.0.0 2026-11-22 08:14 UTC

This package is auto-updated.

Last update: 2026-11-22 14:05:48 UTC


README

A software forge for omnisense/omnibase applications: software and its versions, the builds of each version per platform, downloads, each version's documentation and a publish API - the core, which presumes no provider. What a studio sells besides its time on a site switches on with the packages it stands on (docs/installation.md): licences and paid downloads with omnipack/marketplace, releases from git tags with git/git-bundle, the Unity registry with omnisense/omnihub.

  • Versions, builds and documentation (the core). A version's builds per platform, published by the API (POST /api/software/{slug}/releases/{version}), forge:artifact:attach or the back office; its documentation from a build's docs/ folder, the repository's or the back office, rendered by omnidocs when installed; the versions as JSON for a game that checks for updates - see docs/games.md.

  • Software and releases. Each git tag of a repository becomes a release. git/git-bundle reads the tree in-process and the release is zipped from it.

  • Downloads. Free software downloads for anyone. Licensed software downloads against a licence bought as a market product (LicenseOffer). Files are served through signed, short-lived URLs and nginx X-Accel-Redirect.

  • A private Composer repository. /composer/packages.json lists the free packages for anyone, and the licensed ones for the holder of a valid licence. Authentication is HTTP Basic with the e-mail and the licence key.

  • A Unity registry. /upm speaks the npm registry protocol Unity's Package Manager reads from a scoped registry: free Unity packages for anyone, licensed ones with the licence key as the registry's token - see docs/upm.md.

  • The hub. A manifest (/upm/-/hub.json), a catalogue with the paid packages' offers and the games, and a device flow that links a Unity editor to its user's licences once bought - see docs/hub.md.

  • Games and applications. Builds per platform (WebGL, Windows, macOS, Linux, Android) attached to each release, a WebGL build played in the game's page with the headers Unity's compressed builds need, screenshots and a trailer - see docs/games.md.

  • Client projects.

    • A board the client and the studio both move cards on: its page, its script and its stylesheet are the bundle's - see docs/board.md.
    • The time the studio logs, and the history of the project's repository.
    • Its pipelines: what ran on each commit, stage by stage, drawn as a graph in the back office and on the project's page - see docs/pipelines.md.
  • Support hours.

    • Prepaid packs (HourPack) credit a ledger.
    • Logged time debits it.
    • The balance is always the sum of the ledger's lines.
  • Quotes (special offers).

    1. A client asks for a quote from the site.
    2. The studio prices it in the back office and sends it.
    3. The client accepts it and pays it like any order.
    4. Its hours are credited.

    What every quote is (its client, status, discount, validity, numbering) is omnipack/marketplace's AbstractQuote; the forge keeps the hours and the HourPack - see docs/quotes.md.

Requirements

  • PHP 8.4 (omnisense/omnibase 7.0 asks it), ext-zip
  • omnisense/omnibase 7.0, omnibridge/symfony 3.0, omnipack/admin 2.x, Doctrine, Symfony 6, 7 or 8

Suggested, each switching its part on when installed (Base\Forge\Feature):

  • omnipack/marketplace 2.x: licences sold, paid downloads, support hours, quotes, invoices, client projects - without it every software is free and no checkout route exists; with omnisense/omnitrade and a provider, one-click purchases
  • git/git-bundle 1.0, with the php-git2 extension (RogerGee/php-git2): releases from git tags, the Composer repository, the repositories' docs and history
  • omnisense/omnihub 1.x (with git/git-bundle): the Unity registry and the hub
  • omnisense/omnistate with omnistate/annuaire-entreprises: they turn on omnipack/marketplace's company register, which checks the SIRETs typed in quote requests against the State's free register
  • omnidocs/markdown (else league/commonmark): each version's documentation rendered

Installation

composer require omnipack/forge

Composer brings the core, its Symfony host and omnipack/admin with it; require the suggested packages you want beside. config/bundles.php registers the core's bundle first (see the core's README for the other bundles a site usually adds), then the ones the forge stands on - the optional ones only when installed:

// config/bundles.php
Base\BaseBundle::class => ['all' => true],
Base\Admin\AdminBundle::class => ['all' => true],
Omnistate\Bridge\Symfony\OmnistateBundle::class => ['all' => true],
Base\Marketplace\MarketplaceBundle::class => ['all' => true],
Git\GitBundle::class => ['all' => true],
Base\Forge\ForgeBundle::class => ['all' => true],

With the routes below and the schema migrated, /telechargements lists the software and its releases and /composer/packages.json answers Composer. One-click purchases from Forge Store and Forge Hub also need omnisense/omnitrade:^1.1 and a provider that saves payment methods (omnitrade/stripe:^1.1); they carry the buyer's statements (terms of sale, immediate supply and the waived right of withdrawal) as docs/hub.md describes, required by default (forge.hub.consent_required).

# config/routes.yaml: the routes of the features that are on (Base\Forge\Routing\ForgeRouteLoader)
forge:
    resource: .
    type: forge
# config/packages/forge.yaml: every key is optional
forge:
    storage_dir: '%kernel.project_dir%/var/storage/forge'          # release archives, never under public/
    repositories_dir: '%kernel.project_dir%/var/storage/repositories'
    accel_prefix: '/_protected/forge/'   # nginx internal location; empty: PHP streams the file
    download_ttl: 600                    # seconds a signed link stays valid
    support_store: support               # market store selling hour packs and quotes
    software_store: logiciels            # market store selling licence offers
    hourly_rate: 6000                    # default rate of a quote line, in cents
    low_balance_minutes: 120             # below this, forge:hours:low-balance reminds the client
    contact_email: '%env(MAILER_CONTACT)%'   # where quote requests are mailed
# config/packages/git.yaml: open each client their own repositories
git:
    access_role: ROLE_USER
    repository_attribute: GIT_VIEW       # Base\Forge\Security\Voter\GitRepositoryVoter

Every project and piece of software with a repository shows up in git-bundle's viewer on its own, through Base\Forge\Git\ForgeRepositoryProvider. The bundle also needs an nginx internal location for the archives:

location /_protected/forge/ {
    internal;
    alias /srv/app/var/storage/forge/;
}

How a purchase is delivered

Base\Marketplace\Service\Checkout::confirm() dispatches OrderPaidEvent, and Base\Forge\EventSubscriber\OrderPaidSubscriber delivers the order:

Product Delivered
HourPack minutes × quantity credited to the buyer's ledger
LicenseOffer one License per unit (seats, duration and updates taken from the offer)
a quote's own HourPack its hours credited, and the quote marked paid

Delivery is idempotent per order reference. Bank transfers (the manual gateway) stay pending until someone in the admin posts to forge_admin_order_paid, which confirms the order.

Licence keys (glk_…) are generated by their owner from /compte/licences and shown once. Only their SHA-256 is stored.

Commands

Command What it does Suggested cron
forge:release:sync [slug…] fetch the repositories, turn new version tags into releases and build their zip hourly
forge:license:expire mark the licences past their expiry as expired daily
forge:hours:low-balance [--dry-run] e-mail the clients whose support hours run low weekly

Routes

Path Name
/telechargements, /telechargements/{slug} forge_downloads, forge_software
/telechargements/{slug}/{version} forge_download (checks the licence, redirects to a signed URL)
/telechargements/fichier/{id}/{filename} forge_download_file (signed)
/support, /support/devis forge_shop, forge_quote_request
/devis/{token}, /devis/{token}/accepter forge_quote, forge_quote_accept
/compte/licences forge_account_licenses
/composer/packages.json forge_composer_packages
/admin/forge/… release build, quote send, order paid

The templates extend the host's layout1.html.twig, as omnipack/marketplace's do. They use forge-* classes for the host to style, and can be overridden in templates/bundles/ForgeBundle/.

Tests

vendor/bin/phpunit   # standalone, or from a host: vendor/bin/phpunit -c vendor/omnipack/forge

Licence

MIT since 2026-10-09; earlier versions remain published under LGPL-3.0-or-later.