Umami Demo

How to run the Umami demo on your local.


Drupal

  1. Create a new Drupal project
composer create-project drupal/recommended-project umami
  1. Edit composer.json file and add the following patches under extra.
"extra": {
"patches": {
"drupal/decoupled_router": {
"Unable to resolve path on node in other language than default": "https://www.drupal.org/files/issues/2024-08-05/decouple_router-3111456-resolve-language-issue-63--get-translation-re-rolled-and-good-redirect.patch"
}
},
}
  1. Add dependencies
composer require drupal/next drupal/jsonapi_menu_items drupal/jsonapi_views drupal/jsonapi_resources cweagans/composer-patches
  1. Install Drupal. Make sure you select Demo: Umami Food Magazine (Experimental) as the installation profile.

    For a quick installation, you may also use the quick-start command:

php -d memory_limit=256M ./web/core/scripts/drupal quick-start demo_umami
  1. Enable the following modules:
  • Next
  • Next JSON:API
  • JSON:API Menu Items
  • JSON:API Views

Next.js

  1. Grab a copy of the Next.js code:
git clone https://github.com/chapter-three/next-example-umami
  1. Install dependencies
yarn install
  1. Copy .env.example to .env.local and update the values to point to your Drupal site:
NEXT_PUBLIC_DRUPAL_BASE_URL=http://drupal.test NEXT_IMAGE_DOMAIN=drupal.test
  1. Start the development server
yarn dev
  1. Visit http://localhost:3000 to see the Next.js site.