omnipack / forge
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
Requires
- php: ^8.2
- ext-zip: *
- doctrine/doctrine-bundle: ^2.13|^3.0
- doctrine/orm: ^2.15|^3.0
- omnibridge/symfony: ^3.0
- omnipack/admin: ^2.0
- omnisense/omnibase: ^7.0
- symfony/config: ^6.0|^7.0|^8.0
- symfony/dependency-injection: ^6.0|^7.0|^8.0
- symfony/doctrine-bridge: ^6.4|^7.0|^8.0
- symfony/form: ^6.0|^7.0|^8.0
- symfony/http-kernel: ^6.0|^7.0|^8.0
- symfony/lock: ^6.0|^7.0|^8.0
- symfony/security-bundle: ^6.0|^7.0|^8.0
Requires (Dev)
- git/git-bundle: ^1.0
- omnibridge/doctrine: ^3.0|^4.0
- omnibridge/eloquent: ^2.0
- omnipack/marketplace: ^2.0
- omnisense/omnihub: ^1.0
- omnisense/omnistate: ^1.0
- omnisense/omnitrade: ^1.2
- omnistate/annuaire-entreprises: ^1.0
- phpunit/phpunit: ^9.6|^10.5
- symfony/console: ^6.0|^7.0|^8.0
- symfony/framework-bundle: ^6.0|^7.0|^8.0
- symfony/twig-bundle: ^6.0|^7.0|^8.0
Suggests
- ext-git2: Required by git/git-bundle to read repositories (releases, the project dashboard's history)
- git/git-bundle: ^1.0: releases built from the repositories' tags, their archives, the Composer index, the repositories' docs/ and history (Base\Forge\Feature::GIT); without it the builds are attached
- league/commonmark: ^2.6: each version's documentation rendered as HTML when omnidocs/markdown is not installed
- omnidocs/markdown: ^1.0: each version's documentation read with omnidocs (callouts, code frames, headings); league/commonmark alone renders it plainly, and without either it shows as Markdown
- omnipack/marketplace: ^2.0: licences sold, paid downloads, one-click purchases, support hours, quotes, invoices and client projects (Base\Forge\Feature::MARKETPLACE); without it every software is free and no checkout route exists
- omnisense/omnihub: ^1.0, with git/git-bundle: the Unity registry (/upm) and the hub clients' manifest and catalogue (Base\Forge\Feature::HUB)
- omnisense/omnistate: ^1.0 with a register provider (omnistate/annuaire-entreprises): the quote form's SIRET check, through omnipack/marketplace's company register
- omnisense/omnitrade: ^1.2 with a provider that saves payment methods: one-click purchases from Forge Store and Forge Hub (forge.hub.payment_gateway, docs/hub.md)
- omnitrade/paypal: ^1.2: PayPal as forge.hub.payment_gateway (an approved setup turned into a saved method when its buyer returns)
- omnitrade/stripe: ^1.2: Stripe as forge.hub.payment_gateway (a saved card read back when its buyer returns)
- symfony/http-client: Reads the pipelines' runs from GitHub Actions (Pipeline\GithubActionsSource)
- symfony/yaml: The stages of a GitHub Actions run, from its workflow file's needs
Provides
None
Conflicts
- omnisense/omnitrade: <1.2
Replaces
- omnibase/forge: v3.0.0
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:attachor the back office; its documentation from a build'sdocs/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 nginxX-Accel-Redirect. -
A private Composer repository.
/composer/packages.jsonlists 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.
/upmspeaks 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.
- Prepaid packs (
-
Quotes (special offers).
- A client asks for a quote from the site.
- The studio prices it in the back office and sends it.
- The client accepts it and pays it like any order.
- 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 theHourPack- see docs/quotes.md.
Requirements
- PHP 8.4 (
omnisense/omnibase7.0 asks it),ext-zip omnisense/omnibase7.0,omnibridge/symfony3.0,omnipack/admin2.x, Doctrine, Symfony 6, 7 or 8
Suggested, each switching its part on when installed (Base\Forge\Feature):
omnipack/marketplace2.x: licences sold, paid downloads, support hours, quotes, invoices, client projects - without it every software is free and no checkout route exists; withomnisense/omnitradeand a provider, one-click purchasesgit/git-bundle1.0, with the php-git2 extension (RogerGee/php-git2): releases from git tags, the Composer repository, the repositories' docs and historyomnisense/omnihub1.x (with git/git-bundle): the Unity registry and the hubomnisense/omnistatewithomnistate/annuaire-entreprises: they turn on omnipack/marketplace's company register, which checks the SIRETs typed in quote requests against the State's free registeromnidocs/markdown(elseleague/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.