๐Ÿš€ OpenNSNAP

Open Nuclear System Network Analysis Platform

Phase 3 MVP - Active Development

๐Ÿ“‹ Project Overview

OpenNSNAP is an open-source platform for importing, visualizing, and managing TRACE thermal-hydraulic models. Built with modern web technologies, it provides a visual editor for nuclear system analysis workflows.

๐ŸŽ‰ Latest Updates

February 12, 2026

Framework-Agnostic Core Package

OpenNSNAP now features a framework-agnostic TypeScript core (packages/core) that separates all domain logic from UI frameworks:

  • โœ… Canonical Graph Model - Single source of truth for model data (OpenNSNAPNode, OpenNSNAPEdge, OpenNSNAPGraph)
  • โœ… Command Pattern - All mutations via commands with full undo/redo support
  • โœ… Plugin System - Extensible architecture for analysis codes (TRACE plugin implemented)
  • โœ… Zod Validation - Type-safe data validation at runtime
  • โœ… Pure Transforms - Deterministic, testable business logic (junction mapping)
  • โœ… Zero UI Dependencies - No React, Svelte, or DOM imports in core

Benefits: UI frameworks are now thin visualization layers that can be replaced without touching domain logic. The same core powers React, Svelte, or CLI interfaces. Testing is pure TypeScript without DOM mocking.

โœจ Current Status - Phase 3 MVP

Completed Fully Functional Docker Ready

๐Ÿ”ง Backend API

  • FastAPI + PostgreSQL
  • TOML parser & validator
  • RESTful API endpoints
  • Database migrations

๐ŸŽจ Visual Editor

  • React + TypeScript
  • ReactFlow canvas
  • Drag & drop components
  • Auto-connection rendering

๐Ÿ“ฆ TRACE Components

  • Pipe, Vessel, Pump, Valve
  • Break, Fill
  • Heat Structure
  • Power, Control

๐Ÿ“„ Format Support

  • Native TRACE TOML
  • SNAP export format
  • HydroConnection parsing
  • Component validation

๐Ÿš€ Quick Start

Run the full application locally with Docker:

# Clone the repository
git clone https://gitlab.com/enkiEng/opennsnap.git
cd opennsnap

# Start all services
docker-compose up --build

# Access the application
# Frontend: http://localhost:5173
# Backend API: http://localhost:8000
# API Docs: http://localhost:8000/docs

๐Ÿ“š Documentation

  • TOML_IMPORT_GUIDE.md - Comprehensive guide for importing TRACE models
  • PHASE3_PROGRESS.md - Detailed development progress and features
  • README.md - Project overview and setup instructions

๐Ÿงช Tested Models

Native TRACE Format

  • simple_loop.toml - Basic example (included in repo)
  • l-2pip-a.toml - 2 Pipes, 2 Fills, 1 Break

SNAP Export Format

  • Standpipe.toml - Complex model with HydroConnections

๐Ÿ› ๏ธ Technology Stack

Backend

  • Python 3.11
  • FastAPI
  • SQLAlchemy
  • PostgreSQL
  • Alembic

Frontend

  • React 18
  • TypeScript
  • Vite
  • Material-UI
  • ReactFlow

Frontend Alternative โœจ

  • Svelte 5 (svelte-fe branch)
  • @xyflow/svelte
  • Fully functional
  • Same features as React
  • Port 3001 (Docker)

DevOps

  • Docker
  • Docker Compose
  • GitLab CI/CD
  • Git

๐ŸŽฏ Key Features

  • โœ… Import TRACE models from TOML files (native & SNAP formats)
  • โœ… Visual component editor with drag-and-drop
  • โœ… Automatic connection rendering based on junction numbers
  • โœ… Component property inspection
  • โœ… Model management (create, import, delete)
  • โœ… RESTful API for model operations
  • โœ… PostgreSQL database with migrations
  • โœ… Docker containerization for easy deployment

๐Ÿ“ˆ Development Roadmap

Phase 3 MVP โœ… (Current)

  • โœ… TOML model import and parsing
  • โœ… Visual editor with ReactFlow
  • โœ… 9 TRACE component types
  • โœ… SNAP format support

Future Phases ๐Ÿ”ฎ

  • ๐Ÿ”„ Component editing and property modification
  • ๐Ÿ”„ TOML export functionality
  • ๐Ÿ”„ Model validation and error checking
  • ๐Ÿ”„ TRACE simulation integration
  • ๐Ÿ”„ Results visualization
  • ๐Ÿ”„ Multi-user collaboration