Where things live. The route table is app/main.py's docstring; the design
decisions are in identification.md and
pricing.md; the rules a change is held to are in
CONTRIBUTING.md.
app/— FastAPI app.main.py— routes, lifespan; the route table is its docstring. Also the bulk-capture queue: one background thread (identify_queue) that identifies queued drafts one at a time, reset at startup.auth.py— HTTP Basic on every write and third-party call; fails closed with 503 untilADMIN_USER/ADMIN_PASSWORDare set.photos.py— uploads on disk asPHOTO_DIR/<item id>/<kind>-<hex>.<ext>, stored relative so host and container paths both resolve; derived images underPHOTO_DIR/_derived/— a 480px thumbnail per photo, which is what every page shows (the item page's photo viewer loads the originals), a front-edge strip per item, and the spine cut from the spine photo — made at save, backfilled at startup off the request path, made on first request when missing. Drafts — photos held for review,PHOTO_DIR/_drafts/<token>/— are pruned after a day unless queued.spine.py— finds the case in a spine photo, cuts it, and judges whether its print reads at shelf size.reprice.py— the monthly re-price: when it is due, the run, its log.film.py— TMDB by title: the main genre and the director.barcode.py— zxing-cpp decode of the UPC off the photos.shelf.py— the sort keys and grouped shelves, search, most valuable, value over time.stats.py— what/statscounts.csvio.py— the shelf as CSV, out and in: for/export.csvthe item's fields, then what it is worth, ask or sold; for/importthe file read (read) with each column's field guessed from its header (guess,ALIASES) or chosen on the preview (check_mapping), and the repairs a spreadsheet needs — the UPC's lost leading zero, a decimal comma, the export's formula apostrophe.present.py— dates as the local date only (SQLite stamps are UTC, and the container is UTC too unlessTZis set in.env), and the chart geometry the templates draw as inline SVG.db.py— schema:items,photos,valuations,listings, the re-price logreprice_runs/reprice_items, anddrafts, bulk capture's queue.settings.py— env via pydantic-settings.pricing.py— thePricingSourceinterface;current_worth, which valuation an item is worth;EbayActive, by UPC;EbayKeyword, which the app uses — UPC when there is one, else a title search filtered to steelbooks of that title and format, saved assource = 'ebay_keyword';value_item, which appends avaluationsrow;TitleSearched, the UPC → own search → title pipeline behindSerpApiSold/SerpApiActiveandSoldComps, all off unless enabled;narrow_edition, the judge then the word tiers; andparse_prices/record_sold, for sold prices typed in.judge.py— which listings are the item's edition:ClaudeJudge,OpenAIJudge,WorkerJudge,FallbackJudge, andListingJudge, which the sources hold.identify.py— theIdentifierinterface;ClaudeVision: photos downscaled to 2576px, one Messages API call with a JSON-schema output, web search capped at 3, a paused search turn resumed, server-side refusal fallbacks on;OpenAIVision, the same throughchat.pywhenAI_PROVIDER=openai, with the search rules cut from the prompt unless OpenRouter's search is on;ClaudeCodeWorker, the worker's client;Fallback, the worker then the API.chat.py—ChatClient, one POST to an OpenAI-compatible/chat/completions(OpenAI, OpenRouter, Ollama…) with a JSON schema, the answer read leniently; the other route beside the Anthropic SDK.templates/— the library is a CSS bookcase: one wrapping row of same-height steelbook spines per shelf run, each as wide as its--r, a repeating background painting a plank under each wrapped line. A spine is its spine photo, or else a strip cut from the left edge of its front photo —photos.spine_strip, the way a real case's art wraps round — over the case colour fromphotos.spine_color; that strip assumes the case fills the middle of the frame,CASE_BOX.static/—steelshelf.css; the icon — three steelbook spines and a disc on a shelf — asmark.svgfor the header, manifest and PWA PNGs, andicon.svg, a simpler two-spine cut that still reads at 16 px, for the browser tab andfavicon.ico; Fraunces and Figtree vendored underfonts/with their OFL licences, so page loads stay CDN-free. Every colour insteelshelf.cssis a:roottoken, redefined underprefers-color-scheme: dark;tests/test_theme.pyholds the sheet to it. Pages link it assteelshelf.css?v=<content hash>(css_version), so a phone's cached copy can't outlive a deploy.
design/— the touch and maskable icon masters (design/icon/) and the lockups (design/logo/), including the README's header, a pale banner that reads on light and dark themes alike.scripts/render-icons.pyrenders every PNG and the ICO from the SVGs;scripts/render-lockup.pybuilds the lockups.data/— SQLite (steelshelf.db) +photos/. Git-ignored but for an empty.gitkeep, so compose has a mount source.tools/— run on the machine logged in to Claude Code, not in the image.worker.pyis the identify and listing-judge worker (user unitsteelshelf-worker,:8012, bearer secret); its docstring has the install.scripts/—demo.py(the demo shelf),shots.py(the README's screenshots, retaken from it with Playwright),set-secrets.shandset-key.sh(README § Keys; their live checks inchecks.sh), and the icon and lockup renderers.tests/— pytest over a throwaway SQLite DB per test (conftest.py); no network, no realdata/.docs/— these pages, deploy.md, the README's screenshots underimg/, and its tour videobrag.mp4(posterimg/brag.jpg), all taken from the demo shelf. The video is made with the/brag-slimskill, not by a script here, so a UI change it shows dates it the way it dates a screenshot.Dockerfile,docker-compose.yml,docker-compose.demo.yml,requirements*.txt,.env.example.