Skip to content

szilagyib/RAMSey

Repository files navigation

RAMSey

A modern, web-based, collaborative tool for creating, analyzing, and exporting RAMS (Reliability, Availability, Maintainability, Safety) diagrams.

RAMSey replaces legacy desktop tools with a real-time collaborative environment featuring AI-assisted diagram generation, integrated analysis engines, and publication-quality export including LaTeX/TikZ.

Features

Diagram Types

  • Markov Chains — State-transition diagrams with probability validation
  • Fault Tree Analysis (FTA) — Logic gates, minimal cut sets, importance measures
  • Event Tree Analysis (ETA) — Branching outcome probability analysis
  • Reliability Block Diagrams (RBD) — Series/parallel/k-out-of-n system modeling
  • Bow-Tie Diagrams — Combined FTA + ETA with barrier management
  • FMEA — Tabular failure mode analysis with RPN and criticality scoring

Real-Time Collaboration

  • Multi-user simultaneous editing (Google Docs-style)
  • Live cursor and selection awareness
  • Offline-first with automatic sync on reconnect
  • Version history with named snapshots

Integrated Analysis Engine

  • Markov chain solvers (steady-state, transient, MTTF, availability)
  • Fault tree analysis (BDD-based cut sets, importance measures)
  • Hybrid computation: small models run client-side, large models on server
  • Explainable results with assumptions, warnings, and audit trails
  • Reproducible: every result stores solver version, method, and tolerances

AI Assistance

  • Natural language to diagram generation
  • Context-aware Q&A about your model
  • AI-powered validation and error detection
  • Integrated chat panel with diagram manipulation tools

Export

  • LaTeX/TikZ — Publication-ready code for scientific papers
  • SVG — Scalable vector graphics
  • PNG / JPEG — Configurable resolution
  • PDF — Server-rendered with exact styling

Projects & Teams

  • Project-based organization with multiple diagrams per project
  • Team workspaces with role-based access (admin / member)
  • Per-project sharing with owner / editor / viewer roles
  • Link sharing (anyone with the link)

Tech Stack

Layer Technology
Frontend React, TypeScript, Vite, React Flow, Zustand, Tailwind CSS, shadcn/ui
Backend Node.js, Fastify, TypeScript, Prisma
Database PostgreSQL
Cache & Queue Redis, BullMQ
Collaboration Yjs, y-websocket
Auth Better Auth (OAuth: Google, GitHub, Microsoft)
AI Vercel AI SDK, Claude (Anthropic)
Analysis Shared engine package (client Web Worker + server Solver Worker)
Export html-to-image, Puppeteer, custom TikZ serializers
Infrastructure Docker, Docker Compose, GitHub Actions, Vercel

Getting Started

Prerequisites

  • Node.js 20+
  • Docker & Docker Compose
  • Git

Setup

# Clone the repository
git clone https://github.com/szilagyib/RAMSey.git
cd RAMSey

# Copy environment variables
cp .env.example .env

# Start services
docker compose up -d

# Install dependencies
npm install

# Run database migrations
npx prisma migrate dev

# Start development
npm run dev

Environment Variables

See .env.example for all required configuration.

Project Structure

RAMSey/
├── packages/
│   ├── frontend/          # Vite + React SPA
│   ├── backend/           # Fastify API + y-websocket + Better Auth
│   ├── engine/            # Shared analysis engine (ModelIR, solvers)
│   └── export-service/    # Headless Chromium PDF export
├── docker-compose.yml
├── RAMSEY_MASTER_PLAN.md  # Full architecture & design document
└── README.md

Architecture

Browser (Vite SPA)
  ├── React Flow canvas (diagram editing)
  ├── Zustand (state management)
  ├── Yjs (CRDT real-time sync)
  ├── AI Chat Panel (Vercel AI SDK)
  └── Client Analysis Engine (Web Worker)
          │
          │ WebSocket + REST
          ▼
Server
  ├── Fastify API (orchestrator)
  ├── y-websocket (collaboration sync)
  ├── Better Auth (OAuth, sessions, teams)
  ├── BullMQ Job Queue → Solver Worker (separate process)
  ├── PostgreSQL (data, audit log, snapshots)
  ├── Redis (sessions, cache, pub/sub, job queue)
  └── Export Service (Puppeteer)

Key architectural principle: the API server never performs heavy computation. Analysis runs in isolated Solver Workers via a job queue, designed for future migration to Rust/Python/WASM.

Documentation

See RAMSEY_MASTER_PLAN.md for the full architecture document covering:

  • Detailed database schema
  • ModelIR specification
  • Analysis engine contracts
  • Authentication & authorization design
  • Deployment strategy
  • Phased implementation roadmap

License

TBD

About

A web application for creating and analyzing RAMS diagrams (eg. Markov chains, FMEA, FTA)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors