- Node.js 22
- A compatible Drupal BE site (see requirements below)
-
Start creating a new Next.js Project using the Starter Kit:
npx create-next-app@latest --example "https://github.com/fourkitchens/4k-nextjs-starter"
-
After the project is created,
cd
into the project folder and create a copy of.env.local.example
. Rename it to.env.local
, edit it and set the right values to match your Drupal Backend configuration. -
Install dependencies and start the dev server:
npm install
npm run dev
- Open your browser and visit the dev site at http://localhost:3000/
This starter kit is designed to work along a Drupal backend site configured with the following features:
- A GraphQL endpoint
- GraphQL Compose configured to expose the content types and other entities that will be accessed by the Next.js site.
- An OAuth consumer configured with a scope role and a default user with permissions to execute GraphQL queries.
You can use Sous and the Sous GraphQL recipe to setup your Drupal BE site.