Skip to content

srijanone/ezcontent-decoupled

Repository files navigation

About EZContent

EZContent Open Source, full-featured Drupal Distribution with many content management features out of the box, including rich content, content staging and AI/ML assisted workflows

Create and Publish content easily

Build an SEO friendly, structured content model using flexible fields, meta tags, scheme.org and large library of components (rich text, multimedia etc).

Powerful Landing Page Builder

Editors can create page layouts on the fly, without dependency on developers. With the layout builder, editors can drag and drop reusable components onto pages.

Decoupled CMS and API Ready

Retain non-negotiable CMS features such as drag & drop page builder and content preview even in a de-coupled CMS implementation.

AI powered content generation

Be one step ahead with AI and ML-based auto-tagging, content generation, and personalized content.

Prerequisite

If you are running the EzContent Drupal distribution and the NextJS starter kit on your local system, make sure you create a Virtual Host for your Drupal application and add the host URL as environment variable in NextJS side (as API_HOST).

Getting Started/Setup

EZContent and EZContent API should be installed/setup to make this decoupled code working.

If you have EZContent already up and running, then follow these steps.

  1. Get this codebase
git clone [email protected]:srijanone/ezcontent-decoupled.git 
  1. Install NPM dependencies
npm install
  1. Copy .env.example file and name it .env
cp .env.example .env
  1. Add environment variables in .env file
API_HOST= # EZContent's base URL 

# Below variables are also required    
# To get the JSON data for 'Layout Builder' and menu's      
AUTH_USERNAME= # Drupal user (make sure this user has permission to get menu's, manage layout)   
AUTH_PASSWORD= # Drupal user password   
CLIENT_ID= # Drupal Simple Oauth client id   
CLIENT_SECRET= # Drupal Simple Oauth client secret
  1. Make this codebase up and running
npm run dev
  1. Browse your decoupled EZContent site at [http://localhost:3000]

Module Dependencies

Make sure following modules are enabled and configured

  1. JSONAPI
  2. EZContent API for preview (https://www.drupal.org/project/ezcontent_api)
  3. Simple Oauth (https://www.drupal.org/project/simple_oauth)
  4. Decoupled Router (https://www.drupal.org/project/decoupled_router)

Menus

  1. Add menu items under main for header section
  2. Add menu items under footer (existing) menu, these will be displayed in footer section (you can also name footer-menu if don't have footer menu)
  3. Create privacy-policy menu for bottom of the screen

[If you don't see menu items as linked, please edit /admin/config/services/jsonapi/add/resource_types/menu_link_content/menu_link_content jsonapi resource and change link value to URL for link (clear cache)]

Decoupled Features

  1. Menu (Main, footer, privacy)
  2. Article content type
  3. Landing page content type with layouts and EZContent's components
  4. Meta tags for SEO
  5. Dynamic path aliases (managed in Drupal)
  6. Content Preview

Components/widgets supported

  1. Hero Banner

Alt Hero Banner

  1. Gallery

Alt Gallery

  1. Card

Alt Card

  1. Embed

Alt Embed

  1. Map

Alt Map

  1. Social Media

Alt Social Media

  1. Rich Text

Alt Rich Text

  1. Image

Alt Image

  1. Quote

Alt Quote

  1. Accordion/FaQ

Alt Accordion and FaQ

  1. Card Grid

Alt Card Grid View

License

The MIT License (MIT)