/example-nextjs-app-router-starter

Saleor Example: Next.js 13 App Router Starter

Primary LanguageTypeScript

Next.js App Router + Saleor

Saleor Example: Next.js 13 App Router Starter

Next.js (App Router) Starter

A minimalistic boilerplate to start developing Next.js applications with Saleor.

Open in StackBlitz

🏠 Website 📚 Docs 📰 Blog 🐦 Twitter 💬 Discord

Motivation

🤏 Bare bones: Useful for prototyping or building your stack from scratch.

💪 Typesafe: Get productive with code generation and types.

Stack:

Quickstart

  1. Create a new repository from this template ("Use this template")
  2. Create .env file based on .env.example:
cp .env.example .env
  1. Replace the SALEOR_API_URL environment variable with the address of your Saleor instance.

  2. Install the dependencies:

pnpm i
  1. Generate the types based on GraphQL schema:
pnpm generate
  1. Start the development server:
pnpm dev
  1. Enjoy! 🎉