# Fabryka

> An e-commerce listing factory that cannot invent a claim: facts-checked copy, pixel-true images, human-gated exports.
>
> https://pravda.systems/work/fabryka · 2026-07-26

**Problem.** Producing marketplace listings at catalog scale burns weeks of skilled time per drop, and every AI copy tool on the market will happily invent a spec. One hallucinated claim in an export is a return wave and false-advertising exposure.

**Solution.** A production-line pipeline: phone photos plus the merchant's own words in, styled scene images and facts-gated copy and per-platform packs out. A deterministic whitelist gate blocks any claim the merchant did not provide, the AI decorates around the product but can never repaint it, and nothing exports without human approval.

**Outcome.** 51 products across three catalogs ran the full line on production: 58.8 percent passed the facts gate first try, 51 of 51 scenes kept every product pixel byte-identical, 1,424 claims cross-validated, about 93 seconds of machine time per finished listing.

## Key metrics

- **58.8%** First-pass facts-gate rate — 30 of 51 products passed the deterministic facts gate on their first draft. The held 21 are the check working, kept visible with reasons, and a held draft is fixed and re-checked in seconds. _(verified: version-1 gate_verdict per SKU, live production DB, three persona catalogs rerun on the local model router, docs/METRICS.md 2026-07-26)_
- **51 / 51** Pixel truth held — Every generated scene re-overlays the original product pixels byte-exact. The AI can style the background, never the product. _(verified: scene_main artifacts query across all three catalogs, per-pixel assertion in the compositor test suite, docs/METRICS.md)_
- **1,424** Claims cross-validated — Individual copy claims checked word-by-word against the merchant's provided facts across the 51-product fleet. _(verified: sum(gate_report->>'checkedClaims') over the live batches, docs/METRICS.md 2026-07-26)_
- **92.8 s** Machine time per listing — Productive machine time per finished, checked, multi-platform listing (cutout, scene, re-overlay, copy, gate), measured per job attempt, not wall clock. _(verified: sum(jobs.active_ms) / 51 across the three single-claimant router batches, docs/METRICS.md 2026-07-26)_
- **0** Duplicate artifacts across 3 crash tests — An organic native segfault, a deliberate mid-batch kill, and a real unplanned PC reboot: the queue resumed every time with no duplicates and no double charges. _(verified: GROUP BY sku_id, kind, variant HAVING count(*)>1 after each recovery run, docs/METRICS.md)_

## The problem

A scaling brand produces listings in the worst way possible: a studio shoot per collection, a copywriter's week per hundred products, then days of reformatting for each marketplace. Industry practice puts one done-well listing at 45 to 90 minutes of skilled time. A 200-product drop is 150 to 300 person-hours. The AI tools that promise to fix this stop at the picture or skip the truth. No product in the field traces a claim to a verifiable source, and a copy tool that invents "stainless steel" on a product page is a return wave and a false-advertising problem, not a time saver.

## What I built

Fabryka is a listing factory that treats truth as a structural guarantee, not a score. A merchant drops in phone photos and describes the products in their own words. The machine groups the photos, proposes the facts it can actually see, and waits: every guess needs a yes, a fix, or a no on one confirm screen before any paid compute runs. Then the line runs: a local GPU cuts the product out, an image model builds a styled scene around it, and the original product pixels are deterministically re-overlaid, byte-exact. Copy is drafted from the confirmed facts and passed through a deterministic whitelist gate that checks every word. Any claim it cannot trace fails the product into review. A human approves, fixes, or rejects each listing, and only approved work becomes per-platform packs for Etsy, eBay, Amazon Handmade, Facebook, and Shopify, plus store import files.

## How it works

The UI is the production floor made visible: products travel through named stations and every number on screen is a live instrument, marked verified, estimate, or market research. The runtime splits across Vercel (UI and thin API) and an always-on PC (GPU cutout sidecar, scene calls, Claude-drafted copy through a local model router), joined by a Neon Postgres job queue with per-process leases, mid-job lease renewal, and crash-safe resume. Idle, the worker polls a wake flag and never touches the database, so infrastructure cost sits at zero between batches. Access is by invite with an owner-funded test budget: a real ledger meters every paid call, pauses the batch gracefully at zero, and resumes on top-up. Balances reconcile to the cent.

## Results

Three fictional-maker catalogs (51 products, 63 photos) ran the full line on production. 30 of 51 passed the facts gate on the first draft, 58.8 percent. The 21 held products are the check working, shown with reasons, and a hold is not a dead end: fix the words or add the fact that backs them and the same check runs again in seconds. All 51 scenes kept product pixels byte-identical, 1,424 claims were cross-validated, and measured machine time is about 93 seconds per finished listing at roughly three cents of image compute (estimate, with copy on a flat model subscription). That first-pass figure is the current measurement, not the best one recorded: an earlier engine path scored 84.3 percent, and moving every model call onto one local router redistributed which drafts get held rather than degrading them, with the weakest catalog becoming the strongest. The published number is whichever one was last measured. The sharpest proof came from Marta's candle catalog: her sparse facts passed only 2 of 15, because the gate honestly blocked the words "fragrance" and "scent" that she never provided. Enriching her own description licensed those words and the rerun passed 13 of 15, with the gate untouched. The pipeline survived an organic segfault, a deliberate mid-batch kill, and a real unplanned reboot with zero duplicate artifacts and zero double charges. The whole acceptance path (fresh account, real invite, real budget, one fix and one rejection verified downstream) was run by an agent on production, screenshots committed, no human in the loop.

## Tech

- **Languages:** TypeScript, Python, SQL
- **Frameworks:** Next.js, React, Drizzle ORM
- **Infrastructure:** Vercel, Neon Postgres (job queue with crash-safe leases), Vercel Blob, Clerk (production instance), Windows GPU worker service (2x12 GB, NSSM)
- **AI/ML:** Claude Opus (copy drafting + advisory judge, via a local model router), gpt-image-2 (scene generation behind a deterministic re-overlay), BiRefNet (local GPU background removal, isolated sidecar), Claude Sonnet (photo grouping and fact proposals, same router)

## Skills demonstrated

- Fail-closed verification architecture (whitelist gate, no ML in the authoritative path)
- Deterministic image compositing with byte-exact integrity guarantees
- Crash-safe distributed job queue (leases, mid-job renewal, resume-aware stages)
- Hybrid cloud + local-GPU runtime with zero idle infrastructure cost
- Money ledger with atomic balance ops and graceful mid-run exhaustion
- Agent-run end-to-end acceptance on production (real accounts, real spend, screenshots)
- Honest metrics methodology, every number traced to a logged run or labeled
