Supply Chain Resilience Assessment Tool

Installation & Setup Guide

Installation & Setup

Complete guide for setting up the Supply Chain Resilience Assessment Tool in development and production environments.

Table of Contents

Overview

The Supply Chain Resilience Assessment Tool is an open-source supply chain resilience and business continuity assessment platform. Developed by researchers at the University of Southern Denmark (SDU) in partnership with the Royal Danish Military Academy (Forsvarsakademiet), funded by the Danish Industry Foundation (Industriens Fond) as part of the Cybersikkerhed og Forretningskontinuitet project (2023-2026).

The tool helps organizations map their supply chain vulnerabilities and capabilities through structured multi-step surveys, then visualizes results for cross-organizational alignment and action planning. It is used in the first step of the company process within the broader cybersecurity and business continuity programme - see cyber-smv.dk for more.

Architecture

The application follows a client-server architecture with a Go backend and Vue.js frontend:

dk-if-open/
├── back/                  # Go backend (PocketBase framework)
│   ├── main.go            # Server entrypoint, custom routes & hooks
│   ├── main_test.go       # Integration tests
│   └── migrations/        # Database migrations & seed data
├── web/                   # Vue 3 frontend (Vite + TypeScript)
│   ├── src/
│   │   ├── views/         # Page components (13 routes)
│   │   ├── components/    # Reusable UI components
│   │   ├── stores/        # Pinia state management
│   │   ├── surveys/       # FormKit survey JSON schemas (en/da)
│   │   ├── i18n/          # Internationalization (English, Danish)
│   │   └── router/        # Vue Router configuration
│   └── ...
├── Dockerfile             # Multi-stage production build
└── docs/                  # Documentation

How it works

  1. An admin creates a session - 10 participant accounts + 1 session manager are auto-generated
  2. Participants log in with a unique token and complete a 7-step survey assessing vulnerabilities and capabilities
  3. The session manager views aggregated analysis with charts and prioritization

The backend is built on PocketBase (Go/SQLite), providing the API, admin dashboard, and authentication. The frontend is a Vue 3 single-page application with FormKit for survey forms, PrimeVue for UI components, and Chart.js for data visualization.

Prerequisites

Development Environment

Tool Minimum Version Download
Go 1.26+ go.dev/dl/
Node.js 20+ nodejs.org
npm 9+ npmjs.com

Production Environment (Docker)

Tool Minimum Version Download
Docker 24+ docs.docker.com

Development Setup

1. Clone the repository

git clone https://github.com/sdu-concurrency/SCR-model.git
cd SCR-model

2. Start the backend

cd back
go run main.go serve --http=127.0.0.1:8090

Backend Details

The backend starts on http://127.0.0.1:8090:

  • REST API: http://127.0.0.1:8090/api/
  • Admin UI: http://127.0.0.1:8090/_/

⚠️ Important: Migrations run automatically on first start, creating all collections and seeding question data. On the very first start you will be prompted by PocketBase to create your superuser account at http://127.0.0.1:8090/_/ before you can access the admin UI.

3. Start the frontend

cd web
cp .env.example .env          # create config from template
npm install                   # install dependencies
npm run dev                   # start Vite dev server

Frontend Configuration

Edit web/.env with:

VITE_APP_TITLE="Supply Chain Resilience"
VITE_API_URL=http://127.0.0.1:8090
BASE_URL="/"

The frontend dev server starts at http://localhost:5173 (falls back to :5174 if busy).

4. Open the application

Visit http://localhost:5173 in your browser.

Production (Docker)

1. Build and run

docker build -t scr-model .
docker run -d \
  --name scr-model \
  -p 8080:8080 \
  -v scr-data:/pb_data \
  scr-model

Production Details

The application will be available at http://localhost:8080/.

The Dockerfile bundles both the Go backend and compiled Vue frontend into a single Alpine container. The frontend is served as static files from /pb_public.

2. Persistent data

The SQLite database is stored in /pb_data. Mount a volume to persist data:

-v $(pwd)/pb_data:/pb_data

⚠️ Data Persistence

Always mount a volume for production use to prevent data loss when the container restarts.

Environment Variables

This version requires no environment variables. The application runs fully self-contained.

Frontend Environment Variables

For development, the frontend reads from web/.env:

Variable Default Description
VITE_APP_TITLE - Browser tab title
VITE_API_URL http://127.0.0.1:8090 PocketBase API base URL
BASE_URL / App base path

↑ Back to Top