Recipes
ORBCART DOCUMENTATION
Recipes
Complete, copyable code for the tasks shops build first, from an add-to-cart button to a test that buys something.
Each recipe builds one thing for Nordgrat, the outdoor shop from the Quickstart,
in the order you write it. It links to the reference instead of explaining it again. Swap
BACKPACK-30-GREEN for one of your own references and the code is yours.
In the storefront
| Recipe | You build |
|---|---|
| Add to cart and a mini cart | A button and a header bag with React, the token in an HttpOnly cookie. |
| A checkout without React | Your own checkout page in plain TypeScript, every outcome handled. |
| Free shipping and a welcome code | Two declared promotions, a code field and a test that proves both. |
In your Worker and your systems
| Recipe | You build |
|---|---|
| Prices and stock from your ERP | offers and inventory over HTTP, with a reservation. |
| Send paid Orders to your ERP | A sales order per Order, exactly once, and shipments reported back. |
| A gift message, end to end | A field of your own, from the bag to the packing slip. |
| Test a purchase | A Vitest test that buys, pays and reads the Order back. |
Looking for where your code plugs in, and how deep it can go? Extend OrbCart maps every extension point.