# Herdulike source and licences

This archive is the free source offer for the version served with it. It is available to everyone who can use the password-gated application; no additional account or payment is required. No public Git repository is needed.

## Contents

- `backend/`: the standalone gateway, alpha converter, native video encoder, acquisition overlay, and preferred browser-player source.
- `candidate/web/`: the shipped interface, compiled browser libraries and applicable notices. PPNeueBit font files are intentionally excluded; supply your own licensed copies if rebuilding the complete branded interface.
- `gif-worker/`: the retained Go GIF worker and its pinned Alpine/FFmpeg/Gifski Docker recipe.
- `video-worker/`: the retained Go/Node video worker and its existing pinned-base Docker recipe.
- `materialious/`: the retained Materialious 1.17.12 preferred web/server source, build scripts and dependency locks used by the existing worker family. Its SABR adapter is AGPL-3.0. The local application changes are present directly in this snapshot.
- `materialious-runtime/`: the exact server JavaScript distribution and package manifest captured from the running Herdulike acquisition worker, paired with the preferred source and its retained lockfiles above. The runtime image does not contain a lockfile. These generated files are identified as generated distribution, not substituted for preferred source.
- `upstream/gifski-1.34.0.tar.gz`: unmodified Gifski 1.34.0 source, from https://github.com/ImageOptim/gifski/tree/1.34.0 . Its licence and build instructions are inside that archive.
- `licenses/`: retained third-party licence and attribution files.
- `MANIFEST.sha256`: hashes of archive contents.

Operational configuration, credentials, media, job state, evidence, home directories and compiled private native engines are not included. Deployment-specific paths in source are defaults, not access credentials.

## Build the standalone browser player

The readable entry is `backend/player/player.mjs`; the Materialious adapter/helpers and exact installed googlevideo/protobuf library distributions are retained alongside it. Shaka is a separate browser global, not bundled again.

Requires Node.js and esbuild **0.28.2**. Install that build tool in `backend/player` (`npm install --no-save esbuild@0.28.2`), then from the archive root run:

```
node backend/player/build.cjs
```

Alternatively set `HERDULIKE_NODE_MODULES` to an existing directory containing that exact esbuild version. The source's vendored packages are used for the actual player dependencies. Output is `candidate/web/vendor/player-0.4.3.js`; any emitted `.LEGAL.txt` file belongs beside it. The Herdulike changes are same-origin `/api/vidsave/playback/` routing, its existing request headers, and the already-present bounded error diagnostics. No Nextcloud session or CSRF global is required.

## Build the Go programs

Use the Go version declared by each module. In `backend/`, `backend/alpha/`, `backend/video-encoder/`, `gif-worker/worker/` and `video-worker/worker/`, run `go build .` for that program. The encoder and alpha converter use external FFmpeg/ffprobe; binaries are not included. Apple VideoToolbox encoding requires macOS. Existing source-defined media/resource limits remain in force.

For the original workers, build their named Go binaries before using their supplied Dockerfiles. The video worker's base is the retained Materialious application, not an unrelated current upstream release. To rebuild that base, use `materialious/package-lock.json`, `shared/package-lock.json`, source and original Dockerfiles. The captured `materialious-runtime` identifies the actual server chunk imported by the acquisition overlay. The overlay's preferred modules remain in `backend/videos-engine/`; its concatenated running form is retained separately under `materialious-runtime/herdulike-video-engine.mjs`.

## Licences and notices

Materialious/SABR adapter: GNU AGPL-3.0. Gifski: AGPL-3.0-or-later, with its upstream terms. Shaka Player: Apache-2.0. googlevideo, protobuf, bgutils-js and esbuild retain their respective upstream notices. The alpha packed player includes its existing Apache/MIT and browser-logo attributions. FFmpeg is an external tool; this archive does not convey an FFmpeg binary. Source availability does not grant rights to the excluded proprietary fonts or to users' media. Existing upstream licence grants remain intact; this offer does not invent a new licence for unrelated local code.
