What is Justina?
Justina is an advanced surgical simulation platform designed to revolutionize surgical training through immersive 3D simulations and real-time AI-powered analysis. The platform captures surgical movements, tracks instrument trajectories, and provides immediate feedback to help surgeons improve their skills in a risk-free environment.Immersive 3D Simulation
High-fidelity surgical simulations powered by Babylon.js with realistic physics and instrument interactions
Real-time Telemetry
Capture every movement during surgical procedures via WebSocket streaming for instant data analysis
AI-Powered Analysis
Advanced 5-step pipeline analyzing surgical dexterity, precision, risk patterns, and providing actionable feedback
Comprehensive Tracking
Complete trajectory recording with movement patterns, event detection, and performance metrics
Who Is It For?
Surgical Trainees
Practice complex procedures in a safe environment with immediate feedback on technique, precision, and decision-making. Track improvement over time with detailed performance metrics.Medical Educators
Monitor student progress, identify areas requiring additional training, and provide evidence-based guidance using comprehensive surgical data and AI-generated reports.Healthcare Institutions
Standardize surgical training programs, ensure competency before live procedures, and maintain objective performance records for certification and continuous improvement.Key Benefits
Risk-Free Learning: Practice complex surgical maneuvers without patient risk, allowing trainees to make mistakes and learn from them in a controlled environment.
Objective Performance Evaluation
Unlike subjective human observation, Justina provides quantitative metrics:- Movement Economy: Measures efficiency of instrument paths (optimal < 1.2x direct distance)
- Surgical Precision: Deviation analysis from optimal trajectories
- Dexterity Metrics: Velocity, acceleration, and jerk (smoothness) analysis
- Risk Assessment: Automatic detection of critical events (hemorrhages, tumor contacts)
- Time Analysis: Procedure duration and phase timing
Real-time Feedback
The AI analysis pipeline processes completed surgeries immediately, providing:- Performance scores (0-100 scale)
- Critical alerts for dangerous actions
- Specific improvement recommendations
- Quadrant-based risk mapping
- Comparison against ideal surgical patterns
Scalable Architecture
Built with modern technologies and architectural patterns to ensure reliability:- Spring Boot 4.0.2 backend with Java 21
- Next.js 16 frontend with React 19
- Python-based AI pipeline with pandas/numpy
- WebSocket real-time communication
- PostgreSQL/H2 database support
System Architecture Overview
Justina consists of three main components working together:Frontend Layer
Built with Next.js 16 and TypeScript, the frontend provides:- Interactive 3D surgical environment using Babylon.js 8.51
- Real-time WebSocket connection for telemetry streaming
- User authentication and session management
- Dashboard for viewing past surgeries and analysis reports
- Responsive UI with Tailwind CSS and Radix UI components
Backend Layer
The backend is built using Spring Boot 4.0.2 following Clean/Hexagonal Architecture:- Presentation Layer: REST controllers and WebSocket handlers
- Application Layer: Business logic services (AuthService, SurgeryService)
- Domain Layer: Core business entities and repository interfaces
- Infrastructure Layer: JPA persistence, JWT security, WebSocket configuration
AI Analysis Layer
The AI service is a Python application that:- Listens for new surgery notifications via WebSocket
- Fetches trajectory data from the backend REST API
- Processes data through a 5-step analysis pipeline
- Sends results back to the backend
- Data Ingestion: Clean and normalize trajectory coordinates
- Dexterity Metrics: Calculate velocity, acceleration, jerk, and movement economy
- Benchmarking: Compare against ideal straight-line paths
- Risk Analysis: Detect critical events and map problem areas
- Feedback Generation: Create actionable recommendations and scores
Use Cases
Basic Surgical Training
Trainees perform simulated procedures like tumor resection, practicing fundamental movements:Performance Analytics
Instructors review detailed metrics to identify improvement areas:Competency Certification
Institutions use objective scores to certify surgical competency:- Minimum score thresholds (e.g., 75/100 for certification)
- Zero critical events required (no hemorrhages)
- Movement economy below 1.5x
- Completion within time limits
Communication Flow
Justina uses a hybrid REST + WebSocket architecture:Real-time Telemetry (WebSocket)
Data Exchange (REST API)
Security
Justina implements enterprise-grade security:- JWT Authentication: Stateless token-based auth with BCrypt password hashing
- Role-Based Access Control: Separate roles for surgeons (ROLE_SURGEON) and AI system (ROLE_IA)
- WebSocket Security: Token validation via query parameters
- CORS Protection: Configured origins for frontend access
- HttpOnly Cookies: Secure token storage for web clients
Database Schema
Key entities:- User: Surgeon accounts with credentials and roles
- SurgerySession: Surgery metadata (surgeon, start/end times, status)
- Movement: Individual trajectory points with coordinates and events
- SurgeryEvent: Critical events during procedures (hemorrhages, tumor contacts)
Next Steps
Quick Start Guide
Get Justina running locally in under 10 minutes
Architecture Deep Dive
Understand the technical implementation details
API Reference
Explore REST endpoints and WebSocket protocols
Deployment Guide
Deploy Justina to production environments