MolinoPro

README

Master Codebase Guidebook
Markdown + HTML Dev-Docs Renderer - Frontend Client Module

Default Index
Open README.md
Root: README.mdproducts
Milestones
H1Products PRD - Molino App

version: 2026.04 status: active owner: Molino scope: app/products last_updated: 2026-04-26

H2Focus Strip
NowLockDo Not BreakNext Closure
Keep catalog supportiveProduct feeds LineItems, not transactionscommercial authority stays downstreamreplace hardcoded product type after commerce lock
StateMeaning
built/lockedproduct CRUD and Product-LineItem relation
built/partialproduct engine helper and sample product creation
docs-aheaddeterministic 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.ts
  • app/products/actions/projectSeed.ts
  • app/products/actions/product-engine/loaders/
  • prisma/schema.prisma
H24.1 Code Audit - 2026-04-26
H3Built / locked
  • getProjectProducts(), getProductById(), createProduct(), updateProduct(), and deleteProduct() provide project-scoped product CRUD.
  • Product is related to ProductType, Project, and LineItem, 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() because productTypeId is hardcoded to 1.
  • 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.