Microstock production engine. A strongly-typed, deterministic pipeline that turns a niche + brief into an engine-ready prompt, a compliance report, a 5-question North Star verdict, tiered metadata, and multi-platform CSV exports — in a five-step wizard.
Built as a pure functional pipeline: schema → data → pipeline → UI. The domain logic ships with 35 passing tests; the UI is a thin rendering layer.
The AI microstock market in 2026 is saturated with Midjourney-gloss. Buyers actively reject it. The differentiator is physical plausibility + buyer-intent metadata + platform-correct exports. stockwright encodes that discipline into a reusable pipeline so every asset you ship passes the same review gate.
| Layer | Files | Role |
|---|---|---|
| Types | src/types/schema.ts |
Single-source-of-truth contract for every stage |
| Data | src/data/ |
Engines, niches, lexicon, banned terms, platforms |
| Pipeline | src/pipeline/ |
Pure stages: route, compose, compliance, northstar, metadata, export, run |
| UI | src/ui/ |
DOM-only wizard, zero framework dependencies |
Recraft V4 · Midjourney V8 (+ --tile) · Flux 2 Max · Nano Banana Pro · GPT Image 2 · Ideogram 3 · Leonardo · SDXL — each with its own formatter and quality-trigger profile.
A curated catalog across still-life, concept, background, non-photo, and video. Each niche encodes priority, suggested engines, palette hints, evergreen keywords, and a one-line buyer note.
L1 output → L2 subject → L3 style → L4 palette → L5 technical → L6 composition → L7 quality → L8 negatives
The composer produces these layers deterministically, then the engine-specific formatter joins them into the syntax that engine actually wants.
Subsurface scattering, Fresnel rim, anisotropic highlight, halation, peripheral vignetting, chromatic aberration, micro grain, caustic light — plus Kelvin / aperture / focal-length presets for photo briefs.
Four severity-tiered categories: artist names, brand references, protected persons/characters, AI-disclosure spam. Every issue carries a remediation hint.
Five questions, three auto-evaluated (copy space, metadata quality) and two manual. Output score maps to upload | fix | delete.
Title (≤ 120 chars, utility token auto-injected when copy space ≥ 30%), four keyword tiers (specific → style/mood → related → broad), alt text, IPTC block.
Adobe, Freepik, Pond5, Creative Fabrica, Shutterstock — each with correct CSV header + row.
npm install
npm run dev # local preview at http://localhost:5173
npm test # 35 unit tests
npm run build # production bundle to dist/→ How the pipeline thinks — one example brief walked through every stage with real intermediate output. Best read after npm test succeeds, so you know the code is honest.
- Types are the contract. Every stage reads and writes a typed artifact — nothing leaks.
- Pipeline is pure.
run()is deterministic; given the same brief it always produces the same output. - UI is disposable. The wizard is a thin render layer; swap it for another UI and the pipeline is untouched.
- Tests gate the logic, not the chrome. 35 tests pin down
compose,compliance,northstar,metadata, androute— the parts that actually earn money.
MIT