Skip to main content
Build a single-page ordering storefront using React 19, Vite, and @craveup/storefront-sdk. This guide covers project setup, fetching menus, and managing a cart — all in the browser.

Prerequisites

  • Node.js 18+ and a package manager (pnpm, npm, or yarn)
  • A Crave API key from the Dashboard
  • At least one live location in your merchant account

1. Create a React project

2. Install the SDK

3. Set environment variables

Create a .env file in the project root:
Vite exposes variables prefixed with VITE_ to client code via import.meta.env.

4. Create the storefront client

5. Fetch and display the menu

6. Add cart functionality

Create a simple hook to manage the ordering session and cart state.

7. Run the dev server

Open the URL shown in the terminal (usually http://localhost:5173).

Next steps

Display Menu

Fetch menus, categories, and products for a location.

Manage Cart

Add, update, and remove items with modifiers.

Checkout Flow

Collect customer details and process payments.

SDK Reference

Full SDK documentation with all available modules.

Slack Community

Ask questions and get help from the Crave team and community.

Discord

Join our Discord server for real-time discussions.

Email Support

Reach out to hello@craveup.com for direct support.