Repository navigation
Replace the legacy PHP ERP with Vitrina, an AI product-visuals studio for e-commerce - #1
Merged
Merged
Conversation
Removes the legacy PHP ERP and brings in the open-higgsfield Next.js studio (catalog-driven image/video generation) as the foundation for a vertical product built around it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
…pricing, plans Pure, tested modules that make the vertical data: channels decide ratio and duration, presets carry the prompt skeleton and preferred models, the compiler folds product, brand kit and channel guidance into a prompt, and pricing turns a resolved run into an integer credit cost. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
Drizzle over libsql (a local file or Turso), better-auth email/password with a sign-up hook that bootstraps a workspace, brand kit and trial credits, an AES-GCM seal for bring-your-own platform keys, and an atomic credit ledger with idempotent refunds and grants — all covered by an integration test against a temporary database. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
… billing The generation engine now runs behind the session: submits reserve credits, runs are persisted per workspace and settled server-side on poll, and a workspace can bring its own platform key. The studio gains a product / preset / channel rail that compiles the prompt from the brand kit, review states, product filters and a final-prompt preview. Around it: sign-in, products with photos, the brand kit, campaigns that generate a preset-by-channel plan and export approved files as a zip, and settings with Stripe plans, a credit ledger and the key. Local or Vercel Blob storage, a mock platform server for development. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
Playwright drives sign-up, brand kit, product photo upload, a pack shot generated through the job rail, review from the viewer, a refunded failure, and a campaign generated and exported as a zip. Along the way: the studio opens on images, the pack-shot preset carries the scene, filters live inside the gallery panel, the live credit balance is shared with the sidebar, an empty selection no longer reads as approved, and every app page redirects a signed-out visitor instead of erroring. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
… Vitrina brand assets ESLint 9 with the Next config. The studio no longer sets state from effects: the selection is read through the visible set and reset by the handlers that change scope or filters, the gallery scope follows the surface during render, and picking a preset chooses its model in the picker itself. The selection bar holds the last non-empty selection as state. New mark, icons and Open Graph card for Vitrina. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
The server migrates its database when it starts, so a container or a fresh checkout needs no separate step; the traced output excludes runtime data. Dockerfile (standalone, non-root, /data volume), compose file, a GitHub Actions pipeline (lint, types, unit, build, e2e with the mock platform), Stripe webhook tests, a responsive gallery grid, and the README, architecture, deployment and vertical guides. NOTICE.md records the upstream provenance and its missing license. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
Invite links seat people up to the plan's seats, the owner sees members and open links in Settings, an account can hold several brands and switch between them from the sidebar. Password reset goes out through Resend when a sender is configured and stays hidden otherwise. The run log pages by creation time with a load-older control. The e2e suite now serves the standalone build (what Docker ships) and covers the invite flow with a second browser context; unit tests cover invites, seats, run settlement and paging. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
…n redirects, closed sign-ups Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
…eset to wipe-local Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Empties the repository of the legacy PHP ERP and replaces it with Vitrina: a vertical SaaS built on top of the open-higgsfield generation studio, aimed at e-commerce brands that need product photos and clips for every channel.
What is in the box
src/domain): 11 presets (pack shot, lifestyle, flat lay, hero, on-model, macro, product reveal, b-roll, UGC clip, unboxing, seasonal), 8 channels that fix ratio and duration, a prompt compiler that folds product + brand kit + channel + scene, integer credit pricing and plans.src/generation): the inherited catalog of 38 models, platform client and poll loop, now behind the session with credits reserved before a run and refunded on failure; runs persisted per workspace and settled server-side.src/studio): product / preset / channel rail, final-prompt preview, review (approve / reject), product and review filters, paged run log, bulk actions.src/app,src/ui): sign-in, products with photos, brand kit, campaigns (preset × channel generated in one press, exported as a zip filed by channel), settings with Stripe plans, credit ledger, BYOK platform key, team invites with seats per plan, several brands per account, optional password reset by email, closed sign-ups for private installs.reset-totalandwipe-localskills.Verification
pnpm lint,pnpm typecheck: clean.pnpm test: 34 unit tests (prompt compiler against the real catalog, pricing, credits ledger races and idempotent refunds, Stripe event handling, invites and seats, run settlement and paging).pnpm test:e2e: 5 Playwright flows against the standalone build and the mock platform (sign-up, brand kit, product photo upload, generation through the job rail, review, refunded failure, campaign generation and zip export, invite flow with a second browser, signed-out redirects).Not verified here: the real Higgsfield API (no key), Stripe in live mode (covered by simulated events), the Docker image build (no daemon in the session; the artifact it packages was run directly).
Heads-up before selling
The upstream repository carried no LICENSE file at import time.
NOTICE.mdrecords the provenance; confirm terms with the author before commercial distribution.🤖 Generated with Claude Code
https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
Generated by Claude Code