Sprites Metadata Storage
The meta store holds one record per item: the whole envelope without its heavy data. This is the metadata every listing reads, including the thumbnail, so a media page shows hundreds of items without loading any art. Each record is keyed by its id, and the matching data lives beside it in the data store under the same id.
{
"id": "9f8c2a4e7b1d40128e5a6c3f0b9d7e21",
"media": "sprite",
"platform": "c64",
"name": "Player ship",
"created": 1754300000000,
"modified": 1754300450000,
"info": "High-res · 24×21",
"thumb": "data:image/png;base64,..."
}
meta record, the metadata a listing reads. The heavy data lives in the data store under the same id, one shape per media format.The record
Every item, of any media type, is one envelope with the same metadata. The id is a fresh 128 bit random value as a 32 character hex string, fixed for the life of the item.
| Field | Type | Description |
|---|---|---|
id | String | The item id, 32 hex characters. The key in both object stores. |
media | String | The media type, always the singular key, for example "sprite" or "font". Scopes every listing and count. |
platform | String | The machine the item targets, for example "c64" or "freeform". |
name | String | The item name, shown and searched in listings. |
created | Number | When the item was made, in milliseconds since the epoch. |
modified | Number | When the item was last written, in milliseconds since the epoch. The default sort orders by this, most recent first. |
info | String | A short summary a listing shows without loading the data. See below. |
thumb | String | A small preview as a PNG data URL. Optional, absent until the first save writes one. |
data | Object | The payload for the media type, kept in the data store under the same id. Each media format documents its own shape. |
The info field is a short summary string, so a card can show a size or a mode without loading the data. Its contents are the media type's own choice: a sprite writes its mode and size, for example "High-res · 24×21". The values themselves are authored in the payload, so a sprite's true width, height and mode live in its data object, and this string is a copy for listings.
Indexes and queries
Listings read from the meta store. Two indexes scope a read to one media type before any work in memory.
| Index | On | Purpose |
|---|---|---|
by_media | media | All items of one media type, for a media listing or a count. |
by_media_modified | [media, modified] | One media type in recency order, the compound key for a media page's default sort. |
The pages read the light meta rows and never touch the data store, and the store keeps them live: a write here or in another tab refolds them.
| Read | Source | Serves |
|---|---|---|
| Sprites.Library.Store.Media.List | The by_media index for the media, then platform, search, sort and paging in memory. | The grid of items on a media page. |
| Sprites.Library.Store.Meta.Count | A count off the index for a filter. | The totals for a media type or a platform. |
A listing read never touches the data store. It scopes on the index, then filters by platform, keeps names that contain the search text, sorts by name or by modified most recent first, and slices the page. Opening one item is the only read that joins data, through Sprites.Library.Store.Media.Binding.