Skip to content

techiekamal21/otn-simulator

Repository files navigation

🌐 OTN Simulator

An interactive Optical Transport Network (OTN) simulator for learning and visualizing telecommunications protocols


πŸ“‹ Table of Contents


🎯 About

The OTN Simulator is an educational tool designed to help network engineers, students, and telecommunications professionals understand the complex processes involved in Optical Transport Networks. It provides interactive visualizations of:

  • OTN Frame Structure (OPU, ODU, OTU layers)
  • Forward Error Correction (FEC) mechanisms
  • Network Topology and signal flow
  • Multiplexing and demultiplexing operations
  • Real-time simulation of data transmission

This simulator was built to bridge the gap between theoretical knowledge and practical understanding of OTN protocols.


✨ Features

πŸ”¬ Interactive Simulations

  • Step-by-step visualization of OTN frame construction
  • Real-time monitoring of signal processing stages
  • Configurable parameters for different OTN scenarios

πŸ“Š Visual Components

  • Frame Visualizer: See OPU, ODU, OTU, and FEC layers
  • Network Topology: Interactive network diagram with signal flow
  • FEC Visualizer: Understand error correction in action
  • Internal Flow: Deep dive into multiplexing operations

πŸŽ“ Learning Hub

  • Built-in educational content
  • Explanations of OTN concepts
  • Interactive tutorials

βš™οΈ Customization

  • Multiple ODU levels (ODU0, ODU1, ODU2, ODU3, ODU4)
  • Configurable tributary signals
  • FEC enable/disable options
  • Adjustable simulation speed

🎬 Demo

Screenshots

Main Simulation Interface Simulation Interface

Network Topology View Network Topology

FEC Visualization FEC Visualizer

Note: Add screenshots to docs/screenshots/ folder


πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v18.0.0 or higher)
  • npm (v8.0.0 or higher) or yarn

Check your versions:

node --version  # Should be v18+
npm --version   # Should be v8+

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/otn-simulator.git
    cd otn-simulator
  2. Install dependencies

    npm install

Running Locally

Development Mode

npm run dev

The application will be available at:

Production Build

npm run build
npm run preview

🌐 Deployment

Automated Deployment with GitHub Actions

This project includes automated deployment workflows for popular platforms.

Deploy to GitHub Pages

  1. Enable GitHub Pages in your repository settings
  2. Push to main branch - deployment happens automatically
  3. Access your site at https://yourusername.github.io/otn-simulator/

Deploy to Vercel

Deploy with Vercel

  1. Click the button above or push to main branch
  2. Vercel will automatically detect Vite and deploy

Deploy to Netlify

Deploy to Netlify

  1. Click the button above
  2. Connect your GitHub repository
  3. Netlify will auto-deploy on every push

Manual Deployment

Build for production:

npm run build

The dist/ folder contains your production-ready files. Upload to any static hosting service:

  • GitHub Pages
  • Vercel
  • Netlify
  • AWS S3
  • Azure Static Web Apps
  • Google Cloud Storage

πŸ“ Project Structure

otn-simulator/
β”œβ”€β”€ components/              # React components
β”‚   β”œβ”€β”€ FecVisualizer.tsx   # FEC visualization component
β”‚   β”œβ”€β”€ FrameVisualizer.tsx # OTN frame structure display
β”‚   β”œβ”€β”€ InternalFlowVisualizer.tsx # Multiplexing flow
β”‚   β”œβ”€β”€ LearningHub.tsx     # Educational content
β”‚   β”œβ”€β”€ NetworkTopology.tsx # Network diagram
β”‚   └── Simulation.tsx      # Main simulation controller
β”œβ”€β”€ .github/
β”‚   └── workflows/          # CI/CD automation
β”‚       β”œβ”€β”€ deploy-pages.yml
β”‚       β”œβ”€β”€ deploy-vercel.yml
β”‚       └── deploy-netlify.yml
β”œβ”€β”€ docs/                   # Documentation (gitignored)
β”œβ”€β”€ dist/                   # Build output (gitignored)
β”œβ”€β”€ App.tsx                 # Root application component
β”œβ”€β”€ constants.ts            # Application constants
β”œβ”€β”€ types.ts                # TypeScript type definitions
β”œβ”€β”€ index.tsx               # Application entry point
β”œβ”€β”€ vite.config.ts          # Vite configuration
β”œβ”€β”€ tsconfig.json           # TypeScript configuration
β”œβ”€β”€ package.json            # Dependencies and scripts
β”œβ”€β”€ .env.local              # Environment variables (gitignored)
β”œβ”€β”€ .gitignore              # Git ignore rules
β”œβ”€β”€ LICENSE                 # MIT License
└── README.md               # This file

πŸ› οΈ Technologies Used

Frontend

Development Tools

Deployment

  • GitHub Actions - CI/CD automation
  • Vercel / Netlify / GitHub Pages - Hosting platforms

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/AmazingFeature
  3. Commit your changes
    git commit -m 'Add some AmazingFeature'
  4. Push to the branch
    git push origin feature/AmazingFeature
  5. Open a Pull Request

Development Guidelines

  • Follow the existing code style
  • Add comments for complex logic
  • Update documentation as needed
  • Test your changes thoroughly
  • Ensure no sensitive data is committed

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License Summary

Copyright (c) 2025 OTN Simulator Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

πŸ™ Acknowledgments

  • Lucide Icons - For the beautiful icon set
  • React Community - For the amazing ecosystem
  • Vite Team - For the blazing fast build tool
  • OTN Standards - ITU-T G.709 specifications

πŸ“ž Support


πŸ—ΊοΈ Roadmap

  • Add more OTN protocol simulations
  • Implement ODUflex support
  • Add performance metrics dashboard
  • Create mobile-responsive design
  • Add export/import configuration feature
  • Implement collaborative simulation mode

Made with ❀️ by the OTN Simulator Team

⭐ Star this repository if you find it helpful!

Releases

No releases published

Packages

No packages published