H1Products PRD - Molino App
version: 2026.04
status: active
owner: Molino
scope: app/products
last_updated: 2026-04-26
H2Focus Strip
| Now | Lock | Do Not Break | Next Closure |
|---|---|---|---|
| Keep catalog supportive | Product feeds LineItems, not transactions | commercial authority stays downstream | replace hardcoded product type after commerce lock |
| State | Meaning |
|---|---|
| built/locked | product CRUD and Product-LineItem relation |
| built/partial | product engine helper and sample product creation |
| docs-ahead | deterministic pricing loaders and explicit product type resolution |
H10. Implementation Snapshot
H2Current goal
H3Keep Products as the reusable catalog and pricing-engine layer
Use it to support commercial output.
H2Remaining features
H3Keep product pricing loaders deterministic
Make the loader behavior stable and repeatable.
H3Feed trip and commercial projections without making Products the transaction authority
Preserve the downstream authority boundary.
H3Preserve separation between Product, TripPricing, LineItem, Offer, and Order
Keep the pricing chain explicit.
H3Keep pricing rules out of UI-only components
Keep pricing in server-side support code.
H2Next build steps
H3Inspect `app/products/actions/product-engine/loaders/` and product projection actions
Check the current product pipeline first.
H3Confirm product data flows into commercial output through server-side helpers
Keep the projection bridge explicit.
H3Verify projections are derived from canonical records
Maintain canonical derivation.
H3Test representative pricing outputs after loader changes
Validate the pricing outputs after any loader update.
H2Prompt starter summary
- Keep Products as a reusable catalog and pricing support layer with deterministic server-side loaders and strict Product/TripPricing/LineItem/Offer/Order boundaries.
H2Prompt starter
Implement the next Products PRD slice. Use _PRD/products/README.md as source of truth. Treat Products as a reusable catalog and pricing-engine support layer, not transaction truth. Keep pricing loaders and projection helpers deterministic and server-side. Preserve the boundary between Product, TripPricing, LineItem, Offer, and Order. Do not put pricing authority in UI components. Inspect app/products/actions/projectProducts.ts, projectSeed.ts, product-engine/loaders/, and prisma/schema.prisma before editing.
H21. Product Identity
H3Name
Products
H3One-line Definition
Products is the catalog and pricing-engine layer used to shape commercial output and trip-related pricing rules.
H3User-facing Purpose
This feature exists so users can:
- browse or inherit product-shaped commercial data
- see price-driven content consistently
- rely on stable pricing labels and projections
H3Internal Platform Purpose
Inside Molino App, this feature exists to:
- feed pricing and line-item generation
- support reusable product-oriented rules
- keep trip and order projections deterministic
H22. Scope
H3In Scope
- route surface:
app/products/ - actions:
projectProducts.ts,projectSeed.ts, product-engine loaders - models:
ProductType,Product,LineItem,TripPricing - helpers: product pricing loaders and projection support
H3Out of Scope
- replacing Trip as the main customer-facing planning surface
- hiding pricing authority inside UI components
H23. Authority Model
- pricing logic stays in server-side helpers and actions
- product projections are derived, not canonical
- commercial snapshots still own the final economics
H24. Current Implementation Surface
app/products/actions/projectProducts.tsapp/products/actions/projectSeed.tsapp/products/actions/product-engine/loaders/prisma/schema.prisma
H24.1 Code Audit - 2026-04-26
H3Built / locked
getProjectProducts(),getProductById(),createProduct(),updateProduct(), anddeleteProduct()provide project-scoped product CRUD.Productis related toProductType,Project, andLineItem, so it can support catalog-to-commerce projection.
H3Built / partial
createProduct()validates project existence and returns an existing product when the slug already exists.- A product-engine trip pricing helper exists, but it duplicates the Trips trip engine shape and is not the current commercial authority.
H3Docs-ahead / pending
- Product type resolution is still weak in
createProduct()becauseproductTypeIdis hardcoded to1. - Product pricing loaders are not yet a fully deterministic catalog pricing authority.
H3Critical next step
Do not expand Products before the commercial pipeline is locked. When returning to Products, first replace hardcoded product type behavior with explicit product-type resolution and keep all pricing effects downstream of LineItems.
H25. Acceptance Criteria
- product data feeds commercial output without drift
- pricing helpers stay deterministic
- no business logic leaks into UI-only components
H26. Locked Summary
Products is the reusable pricing and catalog layer that supports Molino's commercial output without becoming the source of truth for transactions.