# Content Catalog And Records

## What It Does

This subsystem manages tiles, sprites, images, and related metadata. It is the bridge between authored graphics data and the editor features that paint, preview, import, and delete those records.

## Key Files

- `server.js`
- `src/App.tsx`
- `src/components/worldshaperShared.ts`
- `src/worldshaperStudio/graphicsDocumentHelpers.ts`
- `src/worldshaperStudio/importController.ts`

## Endpoints It Uses

- `GET /api/content/:type`
- `POST /api/content/:type`
- `POST /api/content/tiles/:tileId/delete`
- `POST /api/content/sprites/:spriteId/delete`
- `GET /api/catalog-meta`
- `POST /api/catalog-meta`
- `GET /api/images`
- `GET /api/images/:filename`

## Important Data And Rules

- tiles and sprites are content records, not world chunk records
- tile symbols are used heavily by painting and rendering paths
- deleting tiles or sprites can require scrubbing world references
- catalog metadata can influence grouping and presentation

## Invariants And Constraints

- content ids must stay stable if worlds reference them
- deletion flows need to consider world data cleanup
- image availability affects painter previews and imports
- schema drift here can break multiple editor systems at once

## Common Request Themes

- better tile metadata
- sprite or tile deletion behavior
- import and catalog organization
- richer animation metadata on graphics records

## Triage Questions

- Is the request about the content record itself, or how it is used in-world?
- Will this require schema changes to tiles or sprites?
- Could this impact rendering, painting, and save behavior all at once?
