8000 Store and automated pipeline for 3D-printed letter reliefs by aazzolini · Pull Request #1 · aazzolini/artist · GitHub
[go: up one dir, main page]

Skip to content

Store and automated pipeline for 3D-printed letter reliefs - #1

Open
aazzolini wants to merge 19 commits into
mainfrom
claude/code-make-money-4i401s
Open

aazzolini wants to merge 19 commits into
mainfrom
claude/code-make-money-4i401s

Conversation

@aazzolini
@aazzolini aazzolini commented Nov 17, 2026 •
Copy link
Copy Markdown
Owner

Summary

This replaces the letter-drawing RL agent with a store and an automated pipeline. The pipeline turns News in Letters drawing scripts into full-color, ready-to-hang relief plaques and sells them.

Store (shop/): FastAPI + Stripe Checkout.

  • Physical products collect a US shipping address and charge flat shipping. Digital downloads are also supported.
  • Product pages have a three.js 3D viewer.
  • Pieces without a price are hidden drafts, with a private preview link.
  • POST /admin/pieces accepts pipeline bundles. It whitelists file names, installs files atomically and rolls back the catalog on failure.
  • POST /admin/products/<id> sets the price and takes a piece live.
  • Print orders are emailed to the owner with a signed, expiring link to the print file. The print file is never public.

Reliefs (relief/)

  • build.py: re-runs the drawing script at print resolution and records every layer, giving each object its own depth and color. The picture is made of raised letters about 1.5 mm wide, legible from 30 cm. It has a sculpted letter frame.
  • hang.py: hollowed back (2.5 mm shell, which saves 27% material) and two keyhole slots cut with manifold3d.
  • export.py: watertight textured 3MF and OBJ. The front and back surfaces are simplified separately and stitched, with a fold-free Delaunay fallback. It also writes a web model whose letter detail is a normal map; it loads under strict CSPs.
  • spec.py: Claude (claude-opus-5-5, structured outputs, server-side fallbacks) writes depth and color specs as schema-checked JSON. A heuristic is used when there's no key or Claude declines. Hand-written specs win.
  • pipeline.py: spec → build → QA (watertight, manifold, size, letter size, mesh accuracy, keyholes) → price → bundle → publish.

Automation: .github/workflows/relief-pieces.yml runs the pipeline when relief/pieces/ changes on main, and commits generated specs back.

Testing

  • pytest: 25 passed. They cover the full chain on a small piece (bundle → store → draft preview → price → buy → print-order link → 3MF download; a tampered link is refused), the Claude spec step with a mocked client (validation, clamping, refusal fallback), bad bundles, and keyholes.
  • Full-size run of The Catch: all QA checks pass (letter accuracy p95 0.056 mm), published over HTTP to a local store, and the product page renders in headless Chromium with no errors.
  • The QA gate caught a bug in its own accuracy check during the first full-size run (fixed).
  • Not tested: real Stripe, SMTP, the Claude API with a real key, or the GitHub Action on GitHub.

Not automated

Placing the order with a print service. I found no verified full-color print API that ships to customers, so print orders go to the owner by email. make_fulfiller is where an API adapter slots in.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj

Removes the letter-drawing RL agent and adds a FastAPI store that sells
digital files via Stripe Checkout, with webhook fulfilment, expiring
download-limited links, optional email delivery and an admin sales view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
- Physical products: Stripe collects a US shipping address and charges flat
  shipping; paid orders go to a pluggable fulfiller (emails the owner the
  address + STL today) and buyers get an order-status page.
- Admin: filter orders by status, mark shipped with tracking (emails buyer).
  Revenue now uses the amount actually paid.
- Product images on the storefront.
- Fix: stripe-python 13+ objects aren't dicts, so session.get() crashed on
  every real payment. Normalize with to_dict(); tests now use real Stripe
  objects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
@aazzolini aazzolini changed the title Replace project with self-hosted Stripe digital-download store Replace project with a store for 3D-printed character figures Nov 22, 2026
Dithers a grayscale field into a JetBrains Mono letter grid (same method
as the News in Letters site) and rasterizes it at physical resolution.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
Re-runs a piece's drawing script at print resolution, records each painted
layer, and gives every object its own depth and color. The picture is made
of raised letters sized to stay legible up close. Exports a watertight,
textured 3MF and OBJ zip for full-color PolyJet printing, plus previews.
Includes the first piece, The catch, as a 200 mm plaque.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
Exports a light glTF model (object depths as geometry; raised letters as
a full-resolution normal map, with color and gloss maps) and a three.js
viewer to orbit, zoom into the letters, move the light and compare print
finishes. Side walls between depth layers now get the plain ground color
instead of smeared letters, on the print file too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
Strict content policies block fetching data: URLs, which an embedded glTF
relies on. Ship the model as JSON (glTF + base64 geometry) plus PNG
textures, and rebuild a binary glTF in the page. Also keep side walls
smooth in the letter-detail map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
The frame is a molding (lip, crest, cove, bead) mitered at the corners,
made of the same raised letters, gilt to bronze, with letters dense where
the molding faces the light. The outer rim gets a plain color so the
plaque's sides aren't streaked. Mesh simplification occasionally pinched
an edge (non-manifold); exports now verify every edge and retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
Hollow the back like a real frame (2.5 mm shell, solid 4 mm wall rim;
The Catch drops from 367 to 268 cm3) and cut two keyhole slots into the
frame's side bands with manifold3d booleans. Wall-facing faces print a
plain color. The front and back surfaces are now simplified separately
and stitched, so they can't be pinched together where the shell is thin;
a fold-free Delaunay fallback covers the rare folded sheet. The viewer
gets a Back view of the keyhole and hanging instructions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
relief/pipeline.py runs spec -> build -> QA -> price -> bundle -> publish.
Specs come from Claude (structured outputs, schema-checked, no code
executed) with a heuristic fallback; hand-written specs win. QA gates
watertightness, manifold edges, size, letter size, mesh accuracy on the
letters and keyholes. The store accepts bundles at /admin/pieces, shows
product pages with the 3D viewer, keeps unpriced pieces as drafts with a
private preview link, and sends print orders with a signed link to the
print file. A GitHub Action runs the pipeline when pieces change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
@aazzolini aazzolini changed the title Replace project with a store for 3D-printed character figures Store and automated pipeline for 3D-printed letter reliefs Nov 22, 2026
/admin: first-run password, sign-in, Connect Stripe (paste a secret key;
the store verifies it with Stripe and registers its own webhook), product
pricing and go-live, and an orders-to-print list with print-file links and
mark-shipped. Keys are saved in the store's database; environment variables
still work as a fallback. On Render the public URL is detected, so the
blueprint asks for nothing. Checkout is off until payments are connected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
The camera drifts about +/-20 degrees left-right and +/-10 degrees up-down
around where it rests, so visitors see the frame's sides and depth. Any
touch, drag or zoom pauses it; it resumes after 5 seconds; it stays off
for reduced-motion users.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
…nter

Each move tilts a few degrees (8 sideways, 6 vertically), eases back to
center and pauses; the loop takes about 25 seconds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
…speeds

Up to 14 degrees sideways and 9 vertically. Each axis picks a new random
period (4-11 s) and size every few seconds and glides into it; phase is
integrated so speed changes never jump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj
The random-sway change removed the lastInput/sway/off/sph declarations,
so the viewer script threw a ReferenceError and nothing rendered. Restore
them, and add a headless-Chromium test that loads a product page and fails
on any page error, a model that doesn't load, or a view that doesn't move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbbX7QLN9q9EJbG9FL1ZEj

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0