Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Industrial IoT Digital Twin with AI Co-Pilot. High-fidelity marine vessel simulation connecting a C++ physics engine, Go telemetry broker, and React dashboard with Voice Command & Generative AI analytics.

License

Notifications You must be signed in to change notification settings

Nibir1/Poseidon-Link

Repository files navigation

Poseidon Link | AI-Powered Industrial IoT Digital Twin

🌊 A next-generation Marine Control System connecting High-Fidelity C++ Physics with GenAI Orchestration.

Poseidon Link Demo

📺 Watch the full end-to-end demo featuring core functionalities.


Status C++ Go React OpenAI Docker Tests

Poseidon Link is a full-stack Industrial IoT (IIoT) simulation platform. It bridges the gap between raw hardware telemetry and cognitive operations, simulating a marine vessel's azimuth thruster with real-time physics, voice control, and predictive maintenance.

Why this exists

Modern industrial control systems are often rigid and disconnected from modern AI capabilities. Poseidon Link solves this by demonstrating a unified architecture:

  1. High-Fidelity Physics Engine: Instead of simple animations, it runs a 60Hz C++ simulation loop to model thermodynamics, fluid resistance, and RPM acceleration curves.
  2. Low-Latency Concurrency: Uses a Go (Golang) broker to handle high-throughput WebSocket telemetry, ensuring the dashboard reflects the "physical" state in milliseconds.
  3. Context-Aware AI Co-Pilot: Integrates OpenAI GPT-4o to translate natural language voice commands into machine code and automatically generate formatted "Captain's Logs" from telemetry buffers.

System Architecture

The application is built on a polyglot microservices architecture:

  1. Vessel Simulation (C++17): A standalone container running the physics calculations. It simulates the engine load, fuel flow, and mechanical stress based on environmental conditions.
  2. Telemetry Broker (Go): The central nervous system. It manages WebSocket connections, broadcasts state updates, and sanitizes AI JSON responses.
  3. Command Dashboard (React + TypeScript): An immersive frontend using Vite and Tailwind CSS for real-time visualization and control.
  4. AI Layer (OpenAI API): Processes unstructured inputs (Speech/Text) into structured commands and analyzes data patterns for anomaly detection.

Key Features

  • Dynamic Weather Simulation: "Storm Mode" alters the physics constants in the C++ engine, increasing load factors and fuel consumption in real-time.
  • Predictive Maintenance: AI algorithms analyze vibration and oil temperature history to generate "Health Scores" and maintenance warnings.
  • Voice Command Interface: Hands-free vessel control using Speech-to-Text, allowing commands like "Set thrusters to 80% power and rotate North."
  • Automated Reporting: Generates maritime-standard "Captain's Logs" automatically, summarizing event history into professional logs.

Tech Stack

Core & Physics

  • Engine: C++17 (Standard Library)
  • Build System: CMake, Multi-Stage Docker Builds
  • Networking: WebSocket++ (ASIO)
  • Data: Nlohmann JSON

Broker & Data

  • Language: Go (Golang 1.21)
  • Concurrency: Goroutines & Channels
  • Protocol: WebSockets (Gorilla)

Frontend

  • Framework: React 18, Vite, TypeScript
  • Styling: Tailwind CSS
  • Visualization: Custom SVG Gauges, Lucide Icons
  • Effects: CSS Animations (Rain/Lightning)

DevOps

  • Containerization: Docker, Docker Compose
  • Automation: Makefiles for cross-platform build & test orchestration.

Getting Started

Prerequisites

  • Docker Desktop installed
  • OpenAI API Key
  • Node.js (Optional, for local UI testing)

Installation

  1. Clone the repository

    git clone https://github.com/Nibir1/Poseidon-Link.git
    cd Poseidon-Link
  2. Set Environment Variables Create a .env file in the root directory:

    OPENAI_API_KEY=sk-proj-xxxx...
  3. Build and Run

    make build

The make command automates the Docker Compose build process. Once complete:

Testing & Validation

This project maintains 100% Test Coverage across all three languages. We use a unified Makefile to run tests in isolated containers (for Go/C++) and locally (for React).

The testing suite includes:

  • Physics Verification: Ensures RPM acceleration and fuel curves match mathematical models.
  • Integration Tests: Verifies WebSocket message broadcasting and JSON cleaning logic.
  • Component Tests: Validates UI rendering and prop handling.

To run the full test suite with clean, "demo-ready" output:

make tests

How It Works

The Physics Loop (thruster.cpp) The C++ engine runs a continuous update(dt) loop 60 times per second.

  • Thermodynamics: Oil temperature rises based on RPM squared ($RPM^2$) and cools via ambient dissipation.
  • Fluid Dynamics: Fuel flow is calculated as a function of Torque + Weather Load Factor (0.0 for Calm, 0.8 for Storm).

The AI Workflow (main.go)

  • Ingestion: User speaks a command via the React UI.
  • Translation: Go Broker sends the text to OpenAI with a system prompt defining the vessel's API.
  • Execution: AI returns a raw JSON payload (e.g., {"targetRPM": 850}).
  • Sanitization: The Broker strips Markdown formatting and forwards the clean command to the C++ Engine.

Project Structure

Poseidon-Link/
├── docker-compose.yml       # Orchestration
├── Makefile                 # Automation Scripts
├── remote-dashboard/        # React Frontend
│   ├── src/
│   │   ├── components/      # Gauges, Weather Overlay, AI Pilot
│   │   ├── hooks/           # WebSocket Logic
│   │   └── App.tsx          # Main Layout
│   └── package.json
├── telemetry-broker/        # Go Backend
│   ├── main.go              # WebSocket Hub & AI Handler
│   └── main_test.go         # Unit Tests
├── vessel-sim/              # C++ Physics Engine
│   ├── src/
│   │   ├── thruster.cpp     # Physics Logic
│   │   └── test_suite.cpp   # Physics Verification
│   └── Dockerfile           # Multi-Stage Build
└── README.md

Roadmap

  • Core Physics Engine (60Hz Loop)
  • AI Voice Control & JSON Parsing
  • Weather Simulation (Physics + Visuals)
  • Automated Captain's Logs
  • Digital Twin Replay System
  • Fleet Management (Multi-Vessel Support)

License

Poseidon Link is released under the MIT License (see LICENSE).
OpenAI Cloud model weight have their own licenses — please review them before use.


Developer Spotlight

Nahasat Nibir — Building intelligent, high‑performance developer tools and AI‑powered systems in Go and Python.


Poseidon Link | AI-Powered Industrial IoT Digital Twin
🐞 Report Bug · 💡 Request Feature · ⭐ Star the project

About

Industrial IoT Digital Twin with AI Co-Pilot. High-fidelity marine vessel simulation connecting a C++ physics engine, Go telemetry broker, and React dashboard with Voice Command & Generative AI analytics.

Topics

Resources

License

Stars

Watchers

Forks