app-anything GitHub

The package and portability

A .aapkg is a directory you can read with your eyes and open with any tool. This page documents what travels in it and why each part exists.

Layout

<id>-<version>.aapkg/
├─ aapkg.json          the package manifest: format, digest, backend form
├─ manifest.json       the app manifest exactly as checked
├─ reports/check.json  the check report that gated the pack
├─ frontend/           the built frontend, entry at index.html
├─ backend/            source plus lock, or prebuilt binaries per triple
└─ assets/             icon and declared assets

aapkg.json carries package_format, the app manifest, the backend form (source, prebuilt or none), a digest over the contents, the tool version that packed, and the check summary. The digest makes packages comparable; the embedded format field makes them self-describing, so an older tool reading a newer package fails at the door instead of guessing.

Why source-plus-lock is the default

A prebuilt binary per platform multiplies build matrices and quietly couples the package to the machine that made it. Source plus a lock file (requirements.txt, package-lock.json, …) is one artifact that any runtime provider can install reproducibly — the lock pins exact versions — on any host. Prebuilt remains available for genuinely compiled backends; the manifest says which form a package carries, and creators never assume.

Why the report ships inside

The check report in the package is the tool's testimony: these rules, this result, at pack time. A creator that refuses can name the finding; a user who receives a package can ask what was verified. It also keeps the packer honest — the gate runs the real check engine, not a summary.

Determinism on purpose

Packing the same project twice yields byte-identical zips: fixed timestamps in the archive, sorted entries, no absolute paths in the report. The package is a build artifact, not a log — if it varies, "did anything change?" stops being answerable by diffing.

What does not travel

The developer's toolchains, caches, node_modules, virtual environments and everything the manifest does not declare as sources. Portability here is not "copies everywhere" but "depends on exactly what it says". The intermediate-representation rationale is in why an intermediate representation.

Rendered from docs/explanation/the-package-and-portability.md on main.