Help › Shop · version 2 ·
tags
#pkg-shop #example #help #listed
view
public
description
Small shop inventory and orders app: catalog, stock, customers and orders, with low-stock warnings. An AI Putty example you can copy and change.

Small shop app: inventory, orders and customers

A small shop app for anyone selling a short list of products who needs stock, orders and customers in one place. It's a live example built with AI Putty from one sentence: "Build me a small shop: my products with price and stock, my customers and their orders. When an order is paid take it off stock, and warn me when something runs low." The sample shop is Grindstone Coffee Gear. You can import it into your own project and change it by talking to your AI.

Catalog

Four totals: Products, Units in stock, Stock at cost and Running low. Then a warning listing what's running low, fewest left first, with its reorder point and the supplier to order from. Then every product by category, with its supplier, price, cost, margin, stock and Reorder at. A product at or under its reorder point is marked low.

Orders

Totals: Orders, Open (new or paid) and Sales (cancelled orders don't count). Then every order, newest first, with the date placed, the customer, what's in it, its status (new, paid, shipped or cancelled) and its total.

When an order is marked paid, its quantities come off stock, once. Cancelling a paid order puts them back. This page has no button to change an order's status yet.

Add an order (members): pick the Customer and the Product and give the Qty, then Add. It starts as new, at the product's price.

Customers

Who buys, oldest customer first, with their email, city, since when, how many orders and what they've spent. Cancelled orders don't count toward spent.

Examples

"What do I need to reorder?" Read the Running low warning on the Catalog tab. In the sample shop, the Cedar pour-over dripper and the Stovetop kettle are down to 2 each and the Paper filters 02 to 12, all at or under their reorder points.

"Which orders still need work?" On the Orders tab, look for new and paid. In the samples, o-1002 is paid and o-1003 and o-1004 are new; o-1001 has shipped.

"Who's my best customer?" Open the Customers tab and compare Spent. In the samples, Maya Chen leads with $145 from one shipped order.

Make it yours

Ask your AI to import it (see Shop): "import the shop app from examples". Your project gets the model, the rules, the app, this help and the sample shop, and from then on it's yours to change. Then, say:

  • "Add my products"
  • "Email me when something runs low"
  • "Add a Paid button on the Orders tab"
  • "Let an order have more than one product"

How it's built

Four classes: a product, a customer, an order and its order lines (product, quantity, price). The model computes a product's margin and whether it's low, and an order's total. Rules move the stock, not the page: a paid order takes it and a cancelled paid one puts it back, once each, whoever changes the order. A product left low raises a low-stock warning that a notify rule can use. See ShopDesign for the layout and Shop for all the parts.

Updated by razie · version 2