This project demonstrates how to integrate a Drupal 11 backend with a Next.js frontend using DDEV for local development.
Before getting started, make sure you have the following installed:
Start and configure the Drupal backend:
ddev composer install
ddev composer drupal:recipe-unpack
ddev start
ddev launch
ddev import-db --src=db/db.sql.gz
Use the following credentials to log into the Drupal admin interface:
Username: admin
Password: admin
cd nextjs-drupal-auth
npm install
Create a .env.local
file in the nextjs-drupal-auth directory with the following content:
NEXT_PUBLIC_DRUPAL_API_URL=https://drupal-nextjs.ddev.site
npm run dev
Drupal: https://drupal-nextjs.ddev.site
Next.js: http://localhost:3000
- Drupal 11 – Headless CMS
- Next.js – React framework for the frontend
- DDEV – Local development environment
This project is licensed under the MIT License.