Skip to main content

Getting Started

Prerequisites

Nx

We recommend installing Nx globally, all Nx based commands in this guide are based upon a globally installed Nx package.

npm install -g nx

Node

We recommend using the latest LTS version of Node, you can find the latest LTS version here.

Get Started

There are three ways to get started with building an SSR (Next JS) frontend web application with Ensono Stacks, we recommend using our Ensono Stacks CLI for the best experience!

Option 1: Ensono Stacks CLI

The Ensono Stacks CLI is a command line interface that allows you to scaffold a brand new Ensono Stacks and Nx workspace. This is the recommended approach if you are planning to use Ensono Stacks to build your infrastructure as well as your frontend web applications.

Once the Ensono Stacks CLI has been installed you can scaffold a brand new Ensono Stacks and Nx workspace through answering a set of interactive questions. Launch the Ensono Stacks CLI with the following command to get started:

stacks-cli interactive
Ensure you have the Ensono Stacks CLI installed!

Visit the Ensono Stacks CLI docs for more information and setup instructions!

tip

Visit the NX Example for the complete instructions/example on using NX with the Ensono Stacks CLI!

Option 2: Create Ensono Stacks workspace generator

You can scaffold a brand-new Ensono Stacks and Nx workspace using the @ensono-stacks/create-stacks-workspace package.

This approach is ideal if you want to use Ensono Stacks to build your frontend web applications but already have an existing infrastructure set up without Ensono Stacks as it's not mandatory to provide any infrastructure details. However, it is still possible to use Option 2 for infrastructure and deployment through passing the required CLI arguments!

Follow the interactive questions with the below command to get started:

npx @ensono-stacks/create-stacks-workspace@latest
tip

Visit the @ensono-stacks/create-stacks-workspace docs for more information and setup instructions!

Option 3: 'Stackify' your existing Nx monorepo

If you already have an Nx monorepo, you can still utilise Ensono Stacks!

tip

Visit the @ensono-stacks/workspace docs for more information and setup instructions!

Ensono Stacks Plugins

To accelerate your project development and ensure consistency across those projects, we have several Ensono Stacks plugins available!

PluginDescription
@ensono-stacks/create-stacks-workspaceCreate an Nx workspace using Ensono Stacks!
  • Create an Nx workspace for a Next application with your choice of testing framework!
  • Create a testing project for the generated Next application. Supported: Playwright & Cypress
  • @ensono-stacks/workspace'Stackify' your existing Nx workspace
  • Add build and deploy infrastructure to your workspace
  • Set up libraries to manage code & commit quality
  • @ensono-stacks/nextEnhance your Next.js project with Ensono Stacks!
  • Add Ensono Stacks configuration and developer tools to an existing next application
  • Add NextAuth.js to your next application
  • Add build and deploy infrastructure to your next application
  • @ensono-stacks/azure-node
  • Add Azure app insights to a node project in your Ensono Stacks workspace
  • @ensono-stacks/azure-react
  • Coming soon!
  • Install and configure a ReactJS library with app insights
  • @ensono-stacks/rest-clientAdd a rest client to a project in your Ensono Stacks workspace
  • Create an Axios http-client with custom configuration
  • Create a client endpoint with Axios HTTP methods for your application
  • Bump existing endpoints to new versions
  • Create code implementation from an OpenApi schema using Orval
  • @ensono-stacks/playwrightAdd the playwright testing library and much more to your project!
  • Create a playwright testing project for your application
  • Add accessibility testing to your test project
  • Add native visual testing with playwright
  • Add visual testing with Applitools eyes
  • Add playwright testing and reporting automatically to your build pipelines
  • @ensono-stacks/cypressAdd the cypress testing library and much more to your project!
  • Add accessibility testing to your test project
  • Add cypress testing and reporting automatically to your build pipelines
  • @ensono-stacks/loggerAdd industry standard logging capabilities to your project
  • Add Winston to your project
  • Further Notes

    Quite a few of our generators have a safeguard of sorts to prevent running them subsequent times. This has been implemented to prevent accidental overwriting of further developed custom code following an understanding that most likely multiple runs would not be required anyway. However, if for your own reasons you would like to re-run such a generator, then you are simply required to remove the relevant project/generator or workspace/generator name entry within the stacks -> executedGenerators fields within nx.json.