Skip to content

Dnext-Frontend-Template is a scalable and high-performance template built with Next.js, designed to streamline the development of headless front-end applications with Drupal

Notifications You must be signed in to change notification settings

ffwagency/dnext-frontend-template

Repository files navigation

Headless solution for a single branding website

Description

Headless solution for a single branding website that uses Drupal as a back-end system and Next.js as a front-end.

Table of Contents

Pre-requisites

  • Node.js (v20.12.6 required)

Installing Node.js using NVM

For macOS and Linux:

  1. Install nvm:
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
    # or
    wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
  2. Install and use Node.js v20.12.6:
    nvm install 20.12.6
    nvm use 20.12.6
  3. Verify installation:
    node -v  # Should output 'v20.12.6'

Git Repository Setup

git clone git@github.com:ffwagency/headless-poc-next.git
cd headless-poc-next
npm install

Configuration

.env File Setup

Create a .env.local in the root of your project with the following:

NEXT_PUBLIC_DRUPAL_BASE_URL=drupal_base_url
NEXT_IMAGE_DOMAIN=image_domain

DRUPAL_CLIENT_ID=drupal_client_id
DRUPAL_CLIENT_SECRET=drupal_client_secret
DRUPAL_PREVIEW_SECRET=drupal_preview_secret

NEXT_PUBLIC_DEFAULT_LANGUAGE=default_language
NEXT_GENERATE_FILES=true

Usage

Running the Development Server

npm run dev

Building for Production

npm run build
npm start

Tests and Lints

Running Tests

npm test

Running Lints

npm run lint

Web Accessibility Rules

Ensuring our project is accessible to all users, including those with disabilities, is a top priority. Below are specific rules and guidelines to follow to achieve web accessibility.

Web Accessibility Rules

Development and Contributing

Git workflow

We are using:

Lead Developer(s)

Deployment

Development Environment

Deploy locally or to a staging environment for testing.

Production Environment

Set up to handle real user traffic efficiently.

Technical Documentation

Links with Technical Documentation for This Project:

Useful Documentation

About

Dnext-Frontend-Template is a scalable and high-performance template built with Next.js, designed to streamline the development of headless front-end applications with Drupal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published