Pranor Hub
docker run -p 8090:8090 ghcr.io/vyuvaraj/pranor-hub:latest
Pranor Hub is the lightweight, S3-backed community package hub and registry server for the Pranor ecosystem. It allows sharing, versioning, and resolving packages written for pranor microservices.
Features
- S3 / Pranor Vault Backend: Packages are stored as tarballs in a dedicated S3 bucket (or
Pranor Vault). - Dependency Resolution: Exposes APIs to resolve package dependency trees dynamically.
- Token Authorization: Supports JWT signature verification to protect package publication.
- Ecosystem Landing Dashboard: Built-in web dashboard displaying active packages, sizes, and versions.
API Endpoints
1. Health Checks
GET /healthz- Health probe.GET /readyz- Readiness probe.
2. Publish Package
POST /publishorPOST /api/v1/publish- Uploads a package tarball (
.tar.gz). - Expects a
pranor.tomlmanifest file in the root of the archive to parse the package name, version, and dependencies. - If
PRANOR_JWT_SECRETis enabled, requires a valid token via theAuthorization: Bearer <token>header.
- Uploads a package tarball (
3. Fetch Package Tarball
GET /packages/{name}.tar.gzorGET /api/v1/packages/{name}.tar.gz- Fetches the latest published version of the package.
GET /packages/{name}/{version}/{name}-{version}.tar.gzorGET /api/v1/packages/{name}/{version}/{name}-{version}.tar.gz- Fetches a specific version of the package.
4. Search Packages
GET /api/packages/search?q={query}orGET /api/v1/packages/search?q={query}- Returns a list of packages matching the query string.
5. Listing and Dependencies
GET /api/packages/orGET /api/v1/packages/- Lists all packages in the registry.
GET /api/packages/{name}/versionsorGET /api/v1/packages/{name}/versions- Retrieves all published versions of a package.
GET /api/packages/{name}/depsorGET /api/packages/{name}/deps- Returns the resolved dependency tree for the latest package version.
GET /api/packages/{name}/{version}/depsorGET /api/packages/{name}/{version}/deps- Returns the resolved dependency tree for a specific version.
Configuration (Environment Variables)
| Variable | Description | Default |
|---|---|---|
PORT | Local server port | 8088 |
PRANOR_STORE_ENDPOINT | Pranor Vault or external S3 URL | http://localhost:9000 |
PRANOR_STORE_ACCESS_KEY | Access key for S3 bucket | admin |
PRANOR_STORE_SECRET_KEY | Secret key for S3 bucket | admin123 |
PRANOR_JWT_SECRET | Secret key to validate signature for publishing | (Disabled) |
Running Locally
go run main.go --addr :8088 --s3-endpoint http://localhost:9000