Skip to main content

Getting started

This guide will help you set up and run Manage Your Civil Cases locally.

Prerequisites

  • node stable version 25.8.1
  • Yarn 4.9.2 package manager (see installation instructions below)
  • TypeScript 5.8.3
  • docker-compose (optional)

Installing Yarn

This project uses Yarn 4.9.2 managed by corepack (built into Node.js 16.10+). To ensure all team members use the same version, follow these installation steps:

  1. Enable corepack (if not already enabled):
   corepack enable
  1. Install dependencies:
   yarn install
  1. Verify the installation:
   yarn --version
   # Should output: 4.9.2

To Note:

  • Corepack automatically uses the Yarn version specified in the packageManager field of package.json. No additional setup is required once corepack is enabled
  • Corepack is the preferred yarn way, to install the package manager, instead of npm install -g yarn in your ci/cd pipeline
  • yarn install --immutable ensures that the lockfile (yarn.lock) is not modified during the installation process

Set local environment variables

Create your local config file .env from the template file:

cp .env.example .env

Align to the Node Version specified for this project

If using Node Version Manager (nvm), use the following command to switch to the correct version:

nvm use
nvm install

Install dependencies and run application for development

yarn install
yarn build
yarn dev

Then, load http://localhost:3000/ in your browser to access the app.

Install dependencies and run application for production

yarn install
yarn build
yarn start

Node Version Manager

You may have to tell your local machine to use the latest version of node already installed on your device, before installing and running the application. Use the following command.

nvm install node

Running locally with docker

Prerequisites, Docker Desktop

  • To build the docker image
  docker build -t mcc:latest .
  • To run the docker image
  docker run -d -p 8888:3000 mcc:latest

(The application should be running at http://localhost:8888)

  • To stop the container

obtain the container id

  docker ps

stop the container

  docker stop {container_id}

Routing

This template uses the built-in Express JS routing.

A route is a section of Express code that associates an HTTP verb (GET, POST, PUT, DELETE, etc.), with a URL path/pattern, and a function that is called to handle that pattern.

You can find further documentation here.

Using redis for session storage

By default, the application uses in-memory session storage, which is not suitable for production environments with multiple instances of the application.

To enable Redis locally for session storage, set the following environment variables in your .env file:

REDIS_ENABLED=true
REDIS_HOST='localhost'
REDIS_PORT=6379
REDIS_TLS_ENABLED=false

Make sure you have Docker installed and the docker-compose command available:

docker-compose --version

Then, start a Redis container using docker-compose:

docker-compose up -d

This will start a Redis container that the application run by yarn dev can connect to for session storage.

Using Redis Insight for debugging, inspecting data visually, and monitoring Redis performance

To use Redis Insight, ensure you have done the prerequisites for using Redis locally as described above. Redis Insight will automatically connect to the Redis instance running in the docker container.

Steps: 1. Open http://localhost:5540/ in your browser. 2. Accept the Terms of Service (toggle at the bottom of the page). 3. Click “Connect existing database”. 4. Click the button “Connection settings”. 5. Change the “Host” to: redis 6. Ensure the port is set to: 6379 7. Click “Add Redis Database”.

This page was last reviewed on 4 December 2025. It needs to be reviewed again on 15 January 2026 .