# Openfront Grocery

> Openfront Grocery gives shoppers product, department, cart, checkout, list, subscription, pickup, and delivery flows while operators manage merchandising, suppliers, lots, stock, orders, substitutions, routes, and receiving.

From the basket to the doorstep.

## At a glance

- 66 models for catalog, lots, purchasing, orders, delivery and finance
- 9 order states, from pending to delivered, returned or cancelled
- 1 store per deployment, with pickup and delivery windows

## Links

- [Product overview](https://spec.openship.org/grocery): every area and feature on one page
- [Live demo](https://grocery.openship.org)
- [Documentation](https://docs.openship.org/docs/openfront/grocery)
- [Source code](https://github.com/openshiporg/openfront-grocery)
- [Feature film](https://spec.openship.org/grocery/video): a 27-second walk through every area

## Areas

### Shopping

- **A grocery store that travels with you**: Browse departments, products and specials, keep shopping lists and favorites, then build a basket for pickup or delivery. Customer accounts bring order history and notification preferences together. (https://docs.openship.org/docs/openfront/grocery/products-merchandising)
- Departments organize the catalog.
- Published products carry information versions.
- Lists can become a basket without starting over.
- Stock and price alerts have their own customer preferences.

### Picking

- **Sell what actually leaves the store**: Pickers record actual quantities and weights, propose substitutions and freeze the final picked goods before capture. Customers accept or decline substitution proposals from their order page. (https://docs.openship.org/docs/openfront/grocery/fulfillment)
- Each line keeps its accepted product and price snapshot.
- Substitution preferences travel with the basket.
- Higher totals require a new customer authorization.
- Guest order access uses a signed token.

### Pickup

- **Make the curb a part of checkout**: Pickup windows follow store hours and dated slot records. Shoppers choose a window, check in on arrival and select a parking spot for the handoff. (https://docs.openship.org/docs/openfront/grocery/pickup)
- Dated slots and rolling policies work together.
- Parking spots are managed by the store.
- Staff track readiness and complete handoff.
- Guest and signed-in customers have check-in paths.

### Delivery

- **A route, not just an address**: Manage delivery slots, postal coverage, minimums and fees. Staff build routes from orders, record stop outcomes and reschedule returned deliveries. (https://docs.openship.org/docs/openfront/grocery/delivery)
- Checkout rechecks the delivery policy.
- Route stops retain proof and condition notes.
- Failed and refused deliveries have their own states.
- Returned orders can be scheduled again.

### Inventory

- **Fresh stock with a traceable history**: Lots keep quantity, expiry, condition and safety status. Counts, adjustments, case conversions, holds, quarantine and recalls give inventory work an explicit record. (https://docs.openship.org/docs/openfront/grocery/inventory)
- Allocate sellable lots in expiry order.
- Convert cases into their stock units.
- Record counts and recounts.
- Recall closure checks affected-order notice evidence.

### Purchasing

- **From supplier to sellable lot**: Create purchase orders, advance their status and receive goods into lots with lot numbers, expiry and condition. Supplier invoices and credits stay connected to settlement work. (https://docs.openship.org/docs/openfront/grocery/suppliers-purchasing)
- Supplier records support buying workflows.
- Purchase receipts preserve receiving evidence.
- Receiving creates inventory rather than just a status label.
- Supplier claims, debits and settlements are recorded.

### Payments

- **Authorize first. Settle the picked basket.**: Configured Stripe checkout uses manual capture so fulfillment actuals can become the final sale. Refund by line or amount, recover interrupted checkouts and reconcile provider events. (https://docs.openship.org/docs/openfront/grocery/payments)
- Stripe must be enabled and configured.
- Checkout attempts support resume and restart.
- Refunds and authorization voids have separate operations.
- Financial close supports settlement-statement import and review.

### Retention

- **Keep the weekly shop connected**: Customers manage recurring baskets and redeem configured loyalty points. Due recurring runs prepare a basket for checkout; they do not silently place an order. (https://docs.openship.org/docs/openfront/grocery/subscriptions-rewards)
- Pause, resume, skip or cancel a recurring basket.
- Configure one store loyalty program.
- Customers redeem points at checkout.
- Help messages and privacy requests reach staff workflows.

### Developer

- **A grocery platform you can run yourself**: Openfront Grocery gives one store a storefront and an operator platform in one Next.js, Keystone, Prisma and Postgres application, from departments and lots to routes and financial close. (https://github.com/openshiporg/openfront-grocery)
- 66 models cover catalog, lots, purchasing, orders, pickup, delivery, payments and finance.
- Checkout rereads products, lots, slot, coupon and policy before it writes the order.
- Lots are allocated in expiry order and line snapshots are kept on the order.
- Stripe with manual capture is the payment adapter in the source.
