carrier-explode Explode and decode carrier data GitHub About

Storage and serving

Storage is one R2 bucket, carrier-explode-ingest, holding every file and normalized object, and one D1 database, carrier-explode-index, holding the index over them. The extractor alone writes both. Serving is two Workers that only read them: the site (SvelteKit) and the API (Hono).

R2

Every key is spelled in packages/storage/src/keys.ts.

KeyWhatWritten
obj/<sha256>an artifact’s bytes: a bundle, a .pb file, a pack, a modem package or configurationonce
norm/v7/<sha>.jsona profile or a modem configurationonce per PROFILE_SCHEMA
norm/v7/combos/<key>.jsona band-combination listonce
decoded/baseband/v<n>/<sha>.jsonan iOS modem package’s summaryonce
releases/<platform>/…jsona unit’s release record: ios/24A446.json, android/CP3A.260905.009/tokay.jsonlast, by its unit
ota/apple/manifests/<sha1>.plista manifest as fetchedonce
ota/pixel/snapshots/<sha1>.jsona set of update service answersonce
ota/<feed>/current.jsonthe snapshot a feed was last planned fromper snapshot
ota/<feed>/files/<sha256 of URL>.jsonone OTA file’s record: its hash, digests and every listingper change
firmware/samsung/<build>.jsonwhat FUS said of a Galaxy build: its Android version, build day and model nameonce
tmp/<instance>/…hand-offs between a unit’s stepsexpired after a day

D1

The schema is packages/db/src/schema.ts.

GroupTables
Factsreleases, copies, profiles, sims, routes, modems, modem_configs, ota_files, devices
Per sourceentries, sources, settings, base_settings, concepts, phone_states, changes
Linkingcarriers, and links, the corrections people write
Nameslabels

Indexing says what each holds. A carrier’s countries, its platforms, how rare a setting is, and a carrier’s modem configurations (sims joined to modem_configs) are computed in SQL per request. Labels fill in names no feed gives: a feed’s own name first, then one a person wrote, then one a language model found on a page it read.

Reading

ReaderD1R2
Siteevery list and page, per requestprofiles and modem configurations from norm/, iOS modem summaries from decoded/baseband/; a file view decodes its artifact from obj/
APIthe sameprofiles, modem configurations and band combinations from norm/

A file view shows the file decoded. The only bytes served as stored are the images and sounds Apple bundles carry, at /raw/…; a carrier logo in Apple’s CgBI PNG form is converted to PNG first.

Caching

AnswerAt the edgeIn a browser
a named version, a redirect30 daysrevalidated each use
a source’s newest version, a list1 dayrevalidated each use
a 40460 secondsrevalidated each use
a bundle’s image or sound (site)30 days1 day

An edge answer may also be served stale for a day while it is fetched again.

Every cached answer carries one cache tag, index. When an index message writes anything, it queues a purge; the purge queue gathers up to 100 messages or 30 seconds and sends one purge of index to each reader.

An API answer also carries an ETag, so a repeat request can be a 304. Requests that miss the cache are limited per IP address (API § Rate limits).

See also