Publishing a snapshot's size without hosting the snapshot
Node operators need to know how much disk a Base node takes when restoring from a snapshot, before they provision. The number moves weekly and was published nowhere convenient.
Four API routes: snapshots, latest-filename, download, mock-snapshots.
The mechanism is getting a size without transferring the bytes, a HEAD request
returns Content-Length for a file that is hundreds of gigabytes, so the site
reports an accurate current number without ever downloading anything. That is
why it could be a small deployment rather than infrastructure.
latest-filename being separate from snapshots looks redundant and is not.
Resolving which file is current and reading its size are different failures: a
naming-scheme change breaks one while sizes are fine. Separating them makes a
break diagnosable rather than a blank page. mock-snapshots lets the site be
developed without hitting a slow, rate-limited bucket.
The framing that matters is what the number excludes. Snapshot size is not steady-state disk requirement, and an archive node is a different question.
README is the create-next-app default.