Setting Up for Local Development

This page provides information on various required and recommended tools, programs and resources for developing the CIPP React frontend.

Prerequisites

Required Software

It's recommended that you have the following installed on the computer you're using for development:

Core Development Tools

Runtime and SDKs

  • Node.js V22.X LTS

    winget install --exact OpenJS.NodeJS.LTS --version 22.13.0
    winget pin add OpenJS.NodeJS.LTS --version 22.13.* --force
  • .NET Core 3.1

    winget install --exact Microsoft.DotNet.SDK.3_1
  • .NET SDK 5

    winget install --exact Microsoft.DotNet.SDK.5
  • .NET SDK 6

    winget install --exact Microsoft.DotNet.SDK.6
  • .NET SDK 8

    winget install --exact Microsoft.DotNet.SDK.8

Required VSCode Extensions

Install these extensions to enhance your development experience:

πŸ“ Note: This page guides you through getting setup to develop for CIPP using the command line to perform operations with git and npm. There are graphical user interfaces for these tools but they won't be covered in this documentation. The commands below are broadly OS agnostic.

Global Package Installation

Using npm which is included with nodejs, you're going to install the Azure Static Web Apps CLI, the Azure Functions Core Tools and the Azurite storage emulator globally.

⚠️ Warning: Depending on your system setup you may have to run the following commands as an administrator in order for npm to write the package files into its global package folder. Globally installed npm packages are available to all users.

Install Required Global Packages

Run the following commands to install the necessary global packages:

# Azure Static Web Apps CLI
npm install --global @azure/static-web-apps-cli
# Azure Functions Core Tools
npm install --global azure-functions-core-tools@4 --unsafe-perms true
# Azurite storage emulator
npm install --global azurite
# Yarn package manager
npm install --global yarn
# Next.js framework
npm install --global next

Repository Setup

Now we need to get the files downloaded for CIPP. In order to properly test as you develop the CIPP frontend we need a copy of your CIPP and CIPP-API repositories.

Forking Repositories

πŸ’‘ Info: You're going to want to work on a forked copy of the CIPP and CIPP-API repositories.

For the rest of this guide we assume that your forks are at:

  • CIPP - https://github.com/goodatforking/CIPP

  • CIPP-API - https://github.com/goodatforking/CIPP-API

πŸ’‘ What's a repository? A Git repository is the .git/ folder which you'll find inside many projects like CIPP. This repository tracks all changes made to files in the project, changes to these files are committed to the repository (repo) which then builds up a history of the project.

Directory Structure

The CIPP and CIPP-API repositories need to be located alongside each other (siblings) - so we're looking for a folder structure that looks like this:

CIPP-Project/
β”œβ”€β”€ CIPP/
└── CIPP-API/

Cloning the Repositories

If we assume that we want our CIPP-Project directory in X:\Development, we're going to do the following:

cd "X:\Development"
mkdir "CIPP-Project"
cd "CIPP-Project"

# Clone your forked repositories
git clone https://github.com/goodatforking/CIPP --origin goodatforking
git clone https://github.com/goodatforking/CIPP-API --origin goodatforking

πŸ“ Info: When you clone a git repository you automatically get a remote - this is a pointer (usually a URL) to a remote copy of the git repository which you can push changes to. By default your first remote is called origin. But that doesn't really mean much to most people. In the commands above we're using --origin goodatforking to tell git that we want our first remote (origin) to be called goodatforking.

Adding Upstream Remote

At this point we could start working on the code - we have our pre-requisites and we have the code setup as we need it, but we're going to do one last thing to make life easier down the road.

We're going to add Kelvin's original repository as upstream:

# Add upstream remote for CIPP
cd "CIPP"
git remote add upstream https://github.com/KelvinTegelaar/CIPP
cd ..

# Add upstream remote for CIPP-API
cd "CIPP-API"
git remote add upstream https://github.com/KelvinTegelaar/CIPP-API
cd ..

Branch Structure

When working on open source projects it's often helpful to keep your stable/tested code separate from your under-development code. We can achieve this with git by using branches. The CIPP project uses the following branches:

Branch
Purpose

main

Our stable/tested code - this is where releases are created (tagged)

dev

Our development code - this is the branch where active development takes place

docs

The CIPP documentation files aka. the content of the website you are reading this from

Switching to Development Branch

We're going to want to work from the dev branch since that's where the latest development code is. Switching branches in git is achieved by doing a checkout on the branch:

# Switch to dev branch in CIPP
cd "CIPP"
git checkout dev
cd ..

# Switch to dev branch in CIPP-API
cd "CIPP-API"
git checkout dev
cd ..

Opening the Project in VSCode

Now that we have our repositories set up, we need to open them correctly in Visual Studio Code

Multi-Root Workspace Setup

⚠️ Important: Don't open the parent CIPP-Project folder in VSCode. Instead, you need to add both repository folders (CIPP and CIPP-API) as separate workspace folders in the same VSCode window.

  1. Open VSCode (if not already open)

  2. Add the repositories:

    • Go to File β†’ Open Folder

    • Navigate to your CIPP-Project directory

    • Hold the Control key and select the CIPP and CIPP-API folders

    • Click "Add"

  3. Save a workspace:

    • Go to File β†’ Save Workspace As...

    • Save it as CIPP-Development.code-workspace in your CIPP-Project directory

    • This allows you to easily reopen both projects together in the future

Method 2: Using Command Line

Alternatively, you can open both folders from the command line:

cd "X:\Development\CIPP-Project"
code CIPP CIPP-API

Verifying Correct Setup

Your VSCode Explorer panel should show both folders at the root level like this:

EXPLORER
β”œβ”€β”€ CIPP
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ package.json
β”‚   └── ...
└── CIPP-API
    β”œβ”€β”€ Modules/
    β”œβ”€β”€ host.json
    β”œβ”€β”€ requirements.psd1
    └── ...

❌ Wrong Setup: If you see a single CIPP-Project folder with CIPP and CIPP-API as subfolders, you've opened the wrong directory. Close the workspace and follow the steps above.

βœ… Correct Setup: You should see CIPP and CIPP-API as two separate root-level folders in the Explorer panel.

Why This Matters

Opening both repositories as separate workspace folders ensures that:

  • Git integration works correctly for both repositories

  • IntelliSense and auto-completion work properly across both projects

  • You can easily manage different branches in each repository independently

  • Extensions can properly detect and work with both codebases

    • This is vital for the starting the project emulators using the 'Run and Debug' section of VSCode

Next Steps

That's it - we've got our repositories setup locally, on the dev branch, and properly opened in VSCode. Our local environment is setup and ready to develop the CIPP UI. Read on through the next section for further instructions.

Last updated

Was this helpful?