---
id: getting_started
title: Getting Started
linkTitle: Getting Started
weight: 2
---

== 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
----

or

----
yarn global add nx
----

=== Node

We recommend using the latest LTS version of Node, you can find the latest LTS version https://nodejs.org/en/[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 link:../stackscli/about.md[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
----

NOTE: Ensure you have the Ensono Stacks CLI installed!

Visit the link:../stackscli/about.md[Ensono Stacks CLI] docs for more information and setup instructions!

TIP: Visit the link:../stackscli/about.md[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 link:/docs/getting_started/create-stacks-workspace/ensono-stacks-create-stacks-workspace[@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 link:./workspace/plugin-information.md[@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!


[cols="1,2"]
|===
|Plugin |Description

|link:./create-stacks-workspace/plugin-information.md[`@ensono-stacks/create-stacks-workspace`]
a|Create 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

|link:./workspace/plugin-information.md[`@ensono-stacks/workspace`]
a|'Stackify' your existing Nx workspace

- Add build and deploy infrastructure to your workspace
- Set up libraries to manage code & commit quality

|link:./next/plugin-information.md[`@ensono-stacks/next`]
a|Enhance 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

|link:./azure-node/plugin-information.md[`@ensono-stacks/azure-node`]
a| - Add Azure app insights to a node project in your Ensono Stacks workspace

|*@ensono-stacks/azure-react*
a|Coming soon!

- Install and configure a ReactJS library with app insights

|link:./rest-client/plugin-information.md[`@ensono-stacks/rest-client`]
a|Add 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

|link:./playwright/plugin-information.md[`@ensono-stacks/playwright`]
a|Add 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


|link:./logger/plugin-information.md[`@ensono-stacks/logger`]
a|Add 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`.
