๐ 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, 2026Framework-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-febranch) - @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