Skip to content

LopeWale/dev_ignition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

530 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ignition Dev Control Plane

Overview

A full-stack application for provisioning and managing Ignition development environments. It provides a web-based interface for version control, environment management, automation gateway configuration, device management, Vision client testing with QF-Test automation, gateway health monitoring, and real-time terminal access to containers via WebSocket-based PTY sessions.

The platform also includes MCP (Model Context Protocol) integration for AI agent-driven automation with 50+ tools spanning environment management, version control, device configuration, and testing workflows.

Architecture

Frontend (React + Vite)

  • Location: frontend/
  • Port: 5000 (development)
  • Technologies: React 18, TypeScript, Vite, React Router, TanStack Query
  • Features: WebSocket reconnection with exponential backoff, clickable environment cards
  • Build command: npm run build

Backend (Python FastAPI)

  • Location: src/
  • Port: 8000 (development)
  • Technologies: FastAPI, Uvicorn, Pydantic
  • Main entry: src/api/server.py
  • Features: Real PTY terminal sessions, WebSocket log streaming, input validation, thread-safe operations

Additional Components

  • Automation Gateway (Kotlin/Gradle): automation_gateway/source/
  • Testing Framework: src/vision_automation/ (Vision Client launcher, QF-Test runner, MCP tools)
  • Tests: tests/ (Python pytest)
  • Git Watcher: git-watcher/

Running the Application

Development

Both workflows start automatically:

  1. Backend API: python -m uvicorn src.api.server:app --host localhost --port 8000 --reload
  2. Frontend: cd frontend && npm run dev

The frontend proxies /api requests to the backend.

API Endpoints

REST Endpoints

  • /api/environments - Environment management (list, create, start, stop, delete)
  • /api/automation-gateway - Automation gateway configuration and template management
  • /api/version-control - Git version control operations (status, commit, push, pull, branch, merge)
  • /api/devices - Device management (OPC UA, MQTT, Modbus)
  • /api/health - Health checks
  • /healthz - Liveness probe

WebSocket Endpoints

  • /ws/sandbox/{service_name}/logs - Real-time log streaming from Docker containers
  • /ws/sandbox/{service_name}/terminal - Interactive PTY terminal session with bidirectional I/O

Key Features

PTY Terminal Access

Real pseudo-terminal support for interactive shell access to Docker containers:

  • Full PTY implementation using pty.openpty() on Unix systems
  • UTF-8 incremental decoding for multi-byte character handling
  • Terminal resize support with SIGWINCH signal handling
  • Heartbeat mechanism for connection health monitoring
  • Thread-safe cleanup with race condition prevention

MCP Integration

50+ MCP tools organized by category for AI agent automation:

  • Environment Tools (8): List, create, start, stop, delete environments
  • Automation Gateway Tools (8): Template management, secret audit, key rotation
  • Version Control Tools (16): Git operations (status, diff, branch, commit, merge, push/pull)
  • Device Tools (3): OPC UA, MQTT, Modbus device management
  • Testing Tools (26): Test suite execution, Vision client control, template-based testing
  • Health Tools (1): API health checking

Vision Testing with QF-Test

  • Vision Client Launcher: Manages Vision Client process lifecycle with cross-platform support
  • QF-Test Runner: Executes GUI automation suites in batch mode with JUnit XML parsing
  • Screenshot collection and report generation
  • Template-based component testing

Security Hardening

  • Input validation with regex patterns for service names and container IDs
  • Log injection prevention via sanitization
  • Thread-safe state management with proper locking
  • Queue size limits to prevent memory exhaustion
  • DNS pinning and TOCTOU fixes

Project Structure

├── frontend/                    # React SPA
│   ├── src/
│   │   ├── components/          # React components
│   │   ├── pages/               # Page components
│   │   ├── utils/               # API utilities
│   │   └── App.tsx              # Main app
│   └── vite.config.ts           # Vite configuration
├── src/
│   ├── api/                     # FastAPI routes
│   │   ├── routes/              # API route handlers
│   │   │   └── sandbox_console.py  # PTY terminal & WebSocket endpoints
│   │   ├── middleware/          # Auth and security middleware
│   │   └── server.py            # FastAPI app
│   ├── services/                # Business logic services
│   ├── vision_automation/   # Testing framework
│   │   ├── runners/
│   │   │   ├── vision_launcher.py  # Vision Client process management
│   │   │   └── qftest_runner.py    # QF-Test execution and parsing
│   │   ├── mcp/
│   │   │   ├── tools.py         # MCP tool definitions (50+ tools)
│   │   │   └── handlers.py      # MCP tool execution handlers
│   │   └── test_suites/vision/  # Vision test suite templates
│   ├── docker_manager.py        # Docker Compose lifecycle management
│   └── compose_generator.py     # docker-compose.yml generation
├── templates/
│   └── docker-compose.yml.j2    # Compose template (Jinja2)
├── tests/                       # Python tests
└── automation_gateway/          # Kotlin automation gateway

User Preferences

(None documented yet)

Recent Changes

  • January 2026: Production hardening and PTY terminal implementation

    • Implemented real PTY terminal support with bidirectional WebSocket communication
    • Fixed race conditions and double-close bugs in terminal sessions
    • Added comprehensive input validation and log sanitization
    • Replaced silent exception passes with proper logging
    • Added queue size limits to prevent memory exhaustion
  • January 2026: Security hardening

    • DNS pinning and per-URL locking for external requests
    • TOCTOU (Time-of-check to time-of-use) fixes
    • Thread-safe state management with proper locking
  • January 2026: Vision testing and QF-Test integration

    • Added Vision Client launcher with cross-platform support
    • Implemented QF-Test runner with JUnit XML parsing
    • Added comprehensive Vision component templates for automation
    • Template validation based on official Ignition documentation
  • January 2026: MCP testing tools

    • Implemented 50+ MCP tools for AI agent automation
    • Categories: Environment, Automation Gateway, Version Control, Device, Testing, Health
  • January 2026: Frontend improvements

    • WebSocket reconnection with exponential backoff and manual retry
    • Clickable environment cards for improved UX
    • Docker Compose service name validation and sanitization
  • December 27, 2025: Initial Replit environment setup

    • Configured Vite for port 5000 with allowedHosts enabled
    • Set up Python 3.11 with FastAPI dependencies
    • Created workflows for frontend and backend

About

full-stack application for provisioning and managing Ignition development environments. It provides a web-based interface for version control, environment management, automation gateway configuration, device management, Vision client testing with QF-Test automation, gateway health monitoring, and real-time terminal access to containers via WebSkt

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors