A minimalistic boilerplate to start developing Next.js applications with Saleor.
🤏 Bare bones: Useful for prototyping or building your stack from scratch.
💪 Typesafe: Get productive with code generation and types.
- pnpm
- TypeScript
- Next.js with static data fetching
- urql
- GraphQL Code Generator
- Create a new repository from this template ("Use this template")
- Create
.env
file based on.env.example
:
cp .env.example .env
Note: Currently, only
.env
is supported..env.local
and any other variation will not work with GraphQL Code Generator.
-
Replace the
NEXT_PUBLIC_SALEOR_INSTANCE_URI
environment variable with the address of your Saleor instance. -
Install the dependencies:
pnpm i
- Generate the types based on GraphQL schema:
pnpm codegen
- Start the development server:
pnpm dev