Skip to content
Flows
App Builder Advanced · 2-4 hours

Marketplace Buyer/Seller Flow

Build a two-sided marketplace core: listings, browsing, and a real transaction/request flow between buyers and sellers.

Start Route · 6 steps

The route

6 steps to Done

  1. 01

    Define marketplace entities and rules

    Two-sided products fail without clear roles and states - define them first.

    Preview prompt + verify gate ▾

    Define the marketplace spec. Specify: the listing model (title, description, price, images, category, status, seller id); the order/request model (listing, buyer, seller, status flow e.g. pending -> accepted -> completed / declined); user roles (any user can be both buyer and seller, or separate roles - decide); and rules: sellers cannot order own listings, only sellers edit their listings, only the two parties see an order. Do not implement yet.

    • Listing and order models are fully fielded
    • Order status flow is enumerated
    • Ownership and visibility rules are stated
  2. 02

    Build seller listing management

    Supply side first: sellers must create and manage real listings.

    Preview prompt + verify gate ▾

    Implement seller listing management. Requirements: a create-listing form (title, description, price, category, image URL) with validation; listings persisted with the seller's user id; a 'my listings' view showing only the seller's items with edit and publish/unpublish; edits persist; loading, empty, and error states. Verify persistence with a refresh after each operation.

    • Created listing survives refresh
    • My-listings shows only my items
    • Unpublish hides it from public browse
  3. 03

    Build public browse and search

    Demand side: buyers must find listings through real queries.

    Preview prompt + verify gate ▾

    Implement the public marketplace browse. Requirements: a grid of published listings from a backend query; text search across title and description; category filter and price sort applied server-side; pagination or load-more; listing cards showing image, title, price, seller name; empty state for no matches; loading skeletons. Unpublished listings must never appear.

    • Search narrows to matching listings
    • Filters and sort work server-side
    • Unpublished listings are hidden
    • Empty and loading states render
  4. 04

    Build listing detail with order action

    The transaction moment: a real order must be created, with rules enforced.

    Preview prompt + verify gate ▾

    Implement the listing detail page and order placement. Requirements: full listing details with seller info; an Order/Request button that creates a real order record (listing, buyer, seller, status=pending) via the backend; the button is disabled with an explanatory note on your own listings; logged-out users are prompted to log in; success shows confirmation and links to 'my orders'; failures show visible errors. Duplicate pending orders for the same listing+buyer should be prevented.

    • Order appears in the database with correct parties
    • Own-listing ordering is blocked
    • Logged-out users are redirected to login
    • Duplicate pending order is prevented
  5. 05

    Build buyer and seller order dashboards

    Both sides must track the same order truthfully through its lifecycle.

    Preview prompt + verify gate ▾

    Implement order management for both sides. Requirements: buyers see 'my orders' with listing, seller, status, and date; sellers see 'incoming orders' with buyer and actions to accept/decline pending orders and mark accepted ones completed; every status change persists and is immediately visible to the other side on refresh; status badges are color-coded; both lists have loading and empty states. Enforce that only the seller can accept/decline and only parties can view the order.

    • Seller accept changes status for the buyer too
    • Only sellers can change status
    • Non-party users cannot fetch the order
    • Empty states render for new accounts
  6. 06

    Marketplace end-to-end test

    Prove the full two-sided loop with two real accounts.

    Preview prompt + verify gate ▾

    Run the full two-account test and report PASS/FAIL with evidence: account A creates a listing; account B finds it via search, orders it; A sees the incoming order and accepts; B sees the accepted status; A completes it; both histories are correct after refresh; A cannot order A's own listing; a third account C sees none of these orders. Fix every failure and re-run.

    • Full loop executed with two accounts
    • Third account is fully isolated
    • Statuses consistent after refresh on both sides
    • All failures fixed