keygen-sh / keygen-api

Keygen is a fair source software licensing and distribution API built with Ruby on Rails. For developers, by developers.
https://keygen.sh
Other
860 stars 60 forks source link

Add distribution support for common package managers #493

Open ezekg opened 3 years ago

ezekg commented 3 years ago

Related to #478, #489, #490, #491. Foundation implemented in #679.

Add unique subdomain for each engine, e.g. Composer https://composer.pkg.keygen.sh.

ezekg commented 3 years ago

Would like to add a slug to products, to make these URLs prettier. E.g. like GitHub repos or something. Verbiage like "Unique URL-friendly identifier for your product."

https://bin.keygen.sh/<account>/<product>

Related to #84.

ezekg commented 3 years ago

May be easier to just recommend customers add their custom domain, or set up a redirect from one of their own domain to get.keygen.sh.

ezekg commented 2 years ago

We could house this under e.g. update.keygen.sh. Make is super easy to plug-and-play for Electron and other Squirrel-compatible upgrade frameworks (Tauri).

Electron distribution engine

Depending on platform, filetype could default to e.g. darwin => zip.

GET https://electron.keygen.sh/:account/:product/:channel/:platform/:version
{
  url: artifact.url,
  name: release.name,
  notes: release.description,
  pub_date: release.created_at
}

Tauri distribution engine

Defaults to bin filetype?

GET https://tauri.keygen.sh/:account/:product/:channel/:platform/:version
{
  url: artifact.url,
  name: release.name,
  notes: release.description,
  pub_date: release.created_at
}

Even better would be generating a unique URL slug for each account/product/platform/channel combo, so it could end up being something simple like this:

GET https://update.keygen.sh/utAsCd8icu1VGhJw/:version
ezekg commented 2 years ago

Let’s put the engine on the release? Then we can add subdomains, e.g. npm.keygen.sh, which lists releases of a specific engine in the engine’s required format.

keygen new ... --engine SPARKLE
ezekg commented 2 years ago

Use pkg.keygen.sh?

ezekg commented 2 years ago

https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry

ezekg commented 2 years ago

Use Satis for generating static composer repo?

ezekg commented 2 years ago

Open source package manager for reference: https://github.com/go-gitea/gitea/blob/3ae997614ad4125d0ef40a528157dba01522c8e0/routers/api/packages/api.go#L484

ezekg commented 2 years ago

Gitea Rubygem docs: https://docs.gitea.io/en-us/usage/packages/rubygems/

ezekg commented 2 years ago

Starting with pypi may be the easiest. We'd need to set up an endpoint that essentially just lists available artifacts via an HTML page. For more info, see this page on hosting a simple Python package repository.