Skip to content

Latest commit

 

History

395 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prisma Decision Web

A decision quality assessment tool for Equinor that helps teams structure and evaluate decisions using influence diagrams, decision trees, and strategy comparison tables.

Features

  • Influence Diagrams — Visual graph-based modeling of decision relationships using React Flow and ELK layout
  • Decision & Solution Trees — Expandable tree structures for exploring decision options and outcomes
  • Strategy Management — Create, edit, and compare strategies with icon-based identification
  • Strategy Table — Side-by-side comparison of how strategies select different options
  • Decision Quality Assessment — Structured assessment forms for evaluating decision quality
  • Project Import/Export and Duplication — Import and export project data,also duplicates the project;
  • Issue view — Reorder issues with dnd-kit.
  • Authentication — Azure AD (MSAL) integration for Equinor SSO

Related repos

Tech Stack

  • Framework: React 19 + TypeScript
  • Build: Vite 8
  • Styling: Tailwind CSS v4
  • UI Components: Equinor EDS (eds-core-react)
  • Graph Visualization: @xyflow/react (React Flow)
  • Layout: ELK.js (elkjs)
  • State Management: Jotai, @tanstack/react-query
  • Forms: react-hook-form + Zod v4
  • Auth: @azure/msal-react
  • Drag & Drop: @dnd-kit

Prerequisites

  • Node.js 20+
  • npm

Installation

git clone https://github.com/equinor/prisma-decision-web.git
cd prisma-decision-web
npm install

Configuration

The app uses environment-specific .env files:

Variable Description
VITE_APP_CLIENT_ID Azure AD application client ID
VITE_APP_REDIRECT_URI OAuth redirect URI
VITE_APP_PRISMA_API_URL Backend API base URL
VITE_APP_PRISMA_API_SCOPE API scope for token acquisition

Environment files: .env.development, .env.test, .env.production

Usage

Start the development server:

npm run dev

The application runs at http://localhost:5004

Other commands

npm run build          # Type-check + production build
npm run build:dev      # Development build
npm run build:test     # Test environment build
npm run build:prod     # Production build
npm run lint           # ESLint
npm run tsc            # TypeScript type-check
npm run prettier       # Check formatting

Project Structure

src/
├── auth/           # MSAL authentication config
├── components/     # React components
│   ├── common/     # Shared components (cards, dialogs, drag & drop)
│   ├── CreateProjectPage/
│   ├── Homepage/
│   └── ProjectPage/
│       ├── InfluenceDiagram/
│       ├── Strategies/
│       └── ...
├── config/         # Tree configuration (compact, decision, solution)
├── hooks/          # Custom hooks + API hooks
│   └── api/        # react-query mutation/query hooks
└── utils/          # Utility functions (layout, conversion, validation)

Deployment

Deployed via Docker on Radix (Equinor's Kubernetes platform). See the CI/CD section for details.

Security

This repository uses GitHub Advanced Security (GHAS) features:

  • Dependabot — Automated dependency vulnerability alerts and update PRs
  • Secret scanning — Detects accidentally committed secrets and credentials
  • Code scanning — Static analysis via GitHub's security tooling

For vulnerability reporting, see SECURITY.md.

CI/CD

CI — Pull Request Checks

Pull requests to main trigger GitHub Actions (.github/workflows/run-eslint.yml):

  • ESLint (npm run lint)
  • TypeScript type-check (npm run tsc)
  • Prettier formatting (npm run prettier)

CD — Radix Deployment

Deployments are managed via Radix using tag-based triggers defined in radixconfig.yaml:

Environment Trigger DNS Alias
dev Push to main prisma-dev.radix.equinor.com
test TEST tag prisma-test.radix.equinor.com
prod PROD tag prisma.radix.equinor.com

Release commands:

npm run release:test   # Tag and push TEST release
npm run release:prod   # Tag and push PROD release

The app is built via Docker (Dockerfile), served on port 3000 via a Node.js Express server (deployment/).

Running Locally with Docker Compose (Research Mode)

This repository is currently configured to run Docker Compose in research mode.

Current setup:

Important:

  • VITE_APP_PRISMA_API_URL is baked into the frontend at build time.
  • For research mode, update .env.research before building.

1. Set research API URL

Edit .env.research :

VITE_APP_PRISMA_API_URL="http://localhost:7075/"

2. Build and run

docker compose build --no-cache
docker compose up

App URL:

3. Research login requirement

Research auth uses a username stored in browser local storage. If username is missing, the app redirects to login.html.

Expected flow:

  1. Open http://localhost:5004
  2. If redirected, open http://localhost:5004/login.html
  3. Submit username
  4. Return to influence diagram page

4. Troubleshooting

If Docker build fails at npm ci:

If Docker fails with no space left on device:

docker builder prune -af
docker system prune -af --volumes

To check Docker disk usage:

docker system df -v

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages