Build workflow
- Scaffold with the CLI –
npx craveup initclones an opinionated Next.js storefront, installs dependencies, and prompts for your Crave credentials. - Configure environment variables – Add your API key and default location IDs to the generated
.env.local. - Extend with the Storefront SDK – Import
@craveup/storefront-sdkto fetch menus, manage carts, and submit analytics from your UI. - Call the REST API when needed – Non-JavaScript clients (native apps, server automations) can hit the same endpoints directly over HTTPS.
Choose the right tool
| Tool | Ideal for | Highlights |
|---|---|---|
| Crave CLI | Getting productive in minutes | Scaffolds templates, installs deps, optional auto-start |
| Storefront SDK | React/TypeScript frontends | Typed client, shared DTOs, pluggable auth token retrieval |
| REST API | Any platform | Full coverage of storefront operations via standard HTTP |
Prerequisites
- Node.js 18+ and a package manager (
pnpm,npm, oryarn) - A Crave API key from the Crave Dashboard
- At least one live location in your merchant account
Where to go next
- CLI Quickstart – scaffold and configure your storefront template
- Storefront SDK – consume the API with TypeScript-first utilities
- REST API Essentials – interact with Crave from any language