Full scope, feature list, and downloadable source ZIP for the Optimal Auction Builder module — including Lot Styles, Build Auction Lots, and Build a Lot with AI.
Optimal Auction Builder Source (ZIP)
21 files · ~59 KB · 1 page, 4 optimal-auction components, 7 lot components, 1 lib, 5 backend functions, 3 entities
The Optimal Auction Builder is the AI brain of AuctionSnap's cataloging stage. It takes your pool of graded Bulk Upload cards and turns them into a sellable auction: it analyzes the market, decides which cards to grade vs sell raw vs group, groups low-value cards into themed lots, sequences the whole catalog for maximum bidding momentum, and lets you review/edit/accept each lot before it lands in your Auction Library. It also includes a natural-language "Build a Lot with AI" prompter and a visual showcase of every lot display style.
Maximize auction profit and bidder engagement by making smart, data-driven decisions for every card — and giving the auctioneer full manual control to override anything.
/OptimalAuction — the builder page with two tabs: Optimal Sequence and Auction Lots.src/pages/OptimalAuction.jsx — the builder page (tabs, build buttons, lot review grid, bulk actions, modals).src/components/optimalauction/)MarketAnalysisPanel.jsx — live market intelligence + sports/players/brands hotness bars.AuctionCatalog.jsx — the sequenced catalog view (opening → star → mid → premium → closing).LotStyleShowcase.jsx — visual gallery of all 11 lot display styles with sample previews.PromptedLotBuilder.jsx — natural-language "Build a Lot with AI" prompter + option picker.src/components/auctionlots/)LotCard.jsx — one reviewable lot (preview, accept/reject/edit/add, style switcher, expandable card list).LotPreview.jsx — renders the composed lot image (or a live CSS fallback).LotAcceptModal.jsx — accept a lot → pick an auction → save to Media Library.LotEditModal.jsx — edit a lot's cards, title, description, and display style.AddCardsModal.jsx — add available graded cards to a lot.BulkAcceptModal.jsx — accept many lots at once into one auction.DownloadLotButton.jsx — download a lot's composed image.src/lib/lotAcceptHelper.js — composes the lot image + builds MediaLibrary records (composed image + per-card front/back).base44/functions/buildOptimalAuction/entry.ts — market analysis + grade/raw/group decisions + lot grouping + auction sequencing + DB persist.base44/functions/buildAuctionLots/entry.ts — rules-based lot builder (singles, 4/6/20-packs) with display-style assignment + rich descriptions.base44/functions/buildPromptedLots/entry.ts — LLM-powered natural-language lot builder (proposes 3–6 options).base44/functions/composeLotImage/entry.ts — server-side image composer (renders cards into one image by display style).base44/functions/selectBulkCards/entry.ts — AI auction selection (solo vs group recommendations).base44/entities/BulkUploadCard.jsonc — the graded card pool (source of lots).base44/entities/MediaLibrary.jsonc — accepted lots land here.base44/entities/AuctionItem.jsonc — auction item records.buildOptimalAuction pipeline: market analysis → grade/raw/group decisions → lot grouping → auction sequencing. Shows a summary, the Market Analysis panel, and the sequenced Auction Catalog.buildAuctionLots, a rules-based lot builder that produces reviewable, editable lots (singles, 4-packs, 6-packs, 20-packs) with composed preview images.Every lot is arranged in one of these visual styles. The AI picks one based on card count, but you can change it anytime via the style dropdown on each LotCard or in the Lot Edit modal. The Lot Styles button opens LotStyleShowcase — a visual gallery of all styles rendered with sample cards:
The server-side composeLotImage function renders the chosen style into a single composed JPEG (white background, bilinear-resized cards, letterboxed) and uploads it — that composed image becomes the lot's primary thumbnail in the library.
buildAuctionLots groups all graded cards into lots using these deterministic rules (most valuable cards first):
Each lot gets:
buildAuctionLots won't recreate the exact same grouping on rebuild; the cards get redistributed into other lots.The "Build a Lot" button opens PromptedLotBuilder. You type a request (e.g. "Make a lot of 10 Dodgers cards" or "Make a lot of 4 higher-priced rookies"), and buildPromptedLots:
buildOptimalAuction runs the complete AI pipeline:
selected_for_auction, auction_sequence, auction_role (solo_grade / solo_raw / lot_member), and group_id back to each card.LotAcceptModal picks an auction → lotAcceptHelper composes the image and builds MediaLibrary records (1 composed lot image as zoom_out + each card's front/back, all sharing the lot number).LotEditModal changes cards, title, description, and display style; removed cards go back to the pool.AddCardsModal adds available graded cards to the lot.DownloadLotButton downloads the composed image.BulkAcceptModal accepts many lots into one auction at once.localStorage so they survive reloads and tab switches until acted on.composing flag is stripped on save so a reload never shows a stuck spinner.Graded BulkUploadCards
→ "Build Optimal Auction" (buildOptimalAuction) → market analysis + sequence + DB persist
→ "Build Auction Lots" (buildAuctionLots) → reviewable lots + composed images
→ "Build a Lot" (buildPromptedLots) → AI-proposed custom lots
→ Review queue (LotCard) → edit / add cards / change style / accept / reject
→ Accept (LotAcceptModal) → composeLotImage + lotAcceptHelper → MediaLibrary records
→ Auction Library (gallery)
buildAuctionLots is deterministic rules-based; buildPromptedLots is LLM-based; buildOptimalAuction is a hybrid (deterministic decisions + LLM market context).zoom_out image as the primary thumbnail plus individual front/back images — all sharing the lot number so they group in the gallery.lotAcceptHelper refuses to save (prevents a single player card becoming the lot thumbnail).