Skip to content

Development#11

Merged
ofcskn merged 38 commits into
mainfrom
development
May 19, 2026
Merged

Development#11
ofcskn merged 38 commits into
mainfrom
development

Conversation

@ofcskn

@ofcskn ofcskn commented May 19, 2026

Copy link
Copy Markdown
Owner

No description provided.

ofcskn and others added 30 commits May 18, 2026 02:00
Locks the hackathon MVP as "AI Visual Commerce QA" and aligns every
screen to the seller risk-reduction story. Bad assets are blocked
before buyers ever see them; approved assets unlock publish and export.

Key changes:
- Rebrand: tagline, nav, breadcrumbs, and all copy updated to QA story
- Gallery: QA score badge + marketplace readiness badge on every card;
  failed products get red border and "Blocked — publish gated" overlay
- ProductDetailPage: status banners (blocked/awaiting/approved), three
  readiness cards (QA score, marketplace readiness, export package),
  gated action buttons (embed/share/Trendyol only for approved),
  redesigned AI diagnosis card with severity colours and next actions
- UploadPage: seller-first empty state explaining the QA gate, QA
  outcome display with boxed next-action CTA on critical failure
- PublicProductPage: only approved products render; no internal QA
  details exposed; trust badge added for buyers
- i18n (en + tr): new keys for all QA story strings
- GalleryModel type: added optional qaScore field

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ck AI, demo seeds

Adds the domain foundation for the approval gate:
- ProductWorkflowStatus VO: draft → analyzing → failed_qa | needs_fix | ready_for_review → approved → published
  with deriveFromAiAnalysis(), isPublishable(), canExport(), isBlocked()
- ExportProfileFactory: polymorphic export targets (public_page, embed, trendyol, shopify)
  blocked/available per workflow state — keeps Trendyol/Shopify coupling out of approval logic
- Product entity: workflowStatus field, isPublishable(), withWorkflowStatus() — centralises gate decisions on the aggregate
- getMockAnalysis(): replaceable mock AI implementing the same ProductAiAnalysis shape as Gemini
- Demo seed products: DEMO_PRODUCT_FAILED (failed_qa, score 22), DEMO_PRODUCT_WARNING (needs_fix, score 58),
  DEMO_PRODUCT_SUCCESS (approved, score 91) — exercises all three demo paths

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces conversion-status-based approvals with the domain's ProductWorkflowStatus
as the single authoritative gate for all publish/embed/export decisions (B.1–B.16).

Key changes:
- WorkflowStatusBadge component: renders all 7 workflow states with correct
  colour semantics (draft, analyzing, failed_qa, needs_fix, ready_for_review,
  approved, published) — exported from libs/ui
- ProductDetailPage: imports WorkflowStatusBadge alongside ConversionStatus badge;
  derives canPublish/canEmbed from workflowStatus.isPublishable()/canExport()
- Status-specific banners: failed_qa → red block, needs_fix → amber warning,
  ready_for_review → indigo prompt, approved/published → green confirmation
- Approve Product button (ready_for_review only), Approve Anyway + override-reason
  modal (needs_fix), Publish button (approved only) — each saves via productRepo
- Disabled Embed/Public Page/Trendyol buttons carry title= explaining exactly
  why they are locked — seller always knows what to do next
- Internal 3D viewer preview always rendered regardless of status (B.10)
- EventType extended with product_approved and product_approved_with_override

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…demo product data for Phase 4 image quality analysis
…anded workflow states for external URL ingestion.
…tes, status tracking, and new server-side service infrastructure.
…width constraint from product detail container
…i-product types

Adds ImageClass, ImageViewAngle, MaterialFinish, GeometryComplexity enums and
ImportedImageCandidate/ProductCluster/ProductImportData APUS fields to the
Product entity. Introduces IPageScraperAdapter port and extends api-contracts
with cluster selection, import review, and retry response shapes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…aterial inference, cluster analyzer

Introduces GeminiImageClassifier (batch image classification with class/angle/relevance
scoring), GeminiMaterialInferenceEngine (material finish and geometry complexity),
GeminiProductClusterAnalyzer (multi-product bundle detection), and
ImageDeduplicationService (perceptual-hash dedup). Adds four structured Gemini
prompts supporting the APUS pipeline.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…raction endpoints

Introduces ScraperAdapterRegistry with Amazon, IKEA, generic, and mock adapters.
Adds five pipeline stages: image upload, image intelligence, autofill, cluster
detection, and material inference. ExtractionOrchestrator wires all stages with
graceful fallback. Refactors ProductImportService to delegate to the orchestrator
and adds /import/cluster/accept route to server.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-accept API

Adds MultiProductClusterSelector for the APUS multi-product detection flow,
allowing sellers to choose the primary product cluster from a detected bundle.
Extends MerchantApiClient with acceptProductCluster and wires it into
ProductDetailPage for the cluster selection step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ofcskn and others added 8 commits May 18, 2026 13:40
Documents all Phase 1 APUS fields added to the import_data JSONB column
via a column comment migration — no schema changes, purely informational.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…and Turkish

Adds four documentation files covering the six-stage APUS extraction pipeline
(scrape, upload, image intelligence, autofill, cluster detection, material
inference) and a step-by-step guide for importing a product from a URL — both
in English (docs/en/) and Turkish (docs/tr/).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: APUS — Autonomous Product Understanding System (Phase 1)
Replaces the single-pass Gemini prompt + hardcoded template system with a
9-phase AI-driven pipeline that understands product structure semantically
before generating any geometry.

**Core changes**
- `SceneGraph` type replaces flat `ShapeParams` as the central data model;
  each part has its own shape, dimensions, position, rotation, and per-part
  PBR material including glass transmission and emissive support
- 4 new geometry primitives in `glb-builder.ts`: `torus` (wheels),
  `frustum` (car hood/roof), `tapered-cylinder` (bottle necks),
  `extruded-ellipse` (car body cross-section)
- `sceneGraphToPartDefs()` converts the v2 scene graph to `PartDef[]` with
  automatic symmetry mirroring (`symmetryMirror: "x" | "z"`)

**9-phase orchestrator (gemini-3d-generator.ts)**
- Phase A: `GeminiProductUnderstandingAnalyzer` — part-level structural analysis
- Phase B: `GeminiGeometryClassifier` — tessellation and shading rules
- Phase C: `GeminiSceneGraphReconstructor` — multi-view 3D reconstruction
- Phase D: topology-aware GLB encoding via `sceneGraphToPartDefs`
- Phase E: category correctors — `VehicleGenerator`, `ElectronicsGenerator`,
  `FurnitureGenerator`, `PackagingGenerator`, `ClothingGenerator`,
  `JewelryGenerator` via `CategoryGeneratorFactory`
- Phase F: `GeminiPbrMaterialAnalyzer` — per-part color sampling from images
- Phase G: `getStaticScaleBounds` — 25+ product-type size priors
- Phase H: `SceneGraphValidator` + `autoRepairSceneGraph` + `GlbValidator`
- Phase I: `GenerationFeedbackService` + migration 014 for approval/rejection signals

v1 (convert-2d-to-3d) kept as automatic fallback; zero regression in existing
test suite (133 tests pass).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(ai): GLB pipeline v2 — semantic scene graph architecture
@ofcskn ofcskn merged commit 2da30c0 into main May 19, 2026
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.

1 participant