Skip to content

Streaming logs #80

Description

@dhaval-p-iqud

Feature: Dynamic Template Deployment System with Real-Time Deployment & Runtime Log Streaming

Summary

Implement a complete template deployment workflow inside the Server Templates section with dynamic YAML-driven deployment forms, real-time deployment/runtime log streaming, and professional terminal-based deployment experience.


Objectives

  • Integrate template listing API in Server Templates tab
  • Add dynamic Deploy workflow for templates
  • Parse deployment variables from YAML/docker-compose configuration
  • Generate dynamic frontend deployment forms
  • Support required/optional/default environment variables
  • Infer proper field types automatically
  • Deploy templates directly from UI
  • Stream deployment and runtime logs in real time over a single socket connection
  • Provide professional terminal UI experience

Requirements

1. Template Listing Integration

Tasks

  • Integrate templates listing API
  • Display all available templates inside Server Templates tab
  • Improve template cards/list UI

Expected Behavior

  • User can browse available templates
  • User can trigger deployment from template card

2. Dynamic Template Variable Parsing

Tasks

  • Integrate existing template variable parsing API if available
  • Otherwise implement backend YAML parsing logic
  • Parse variables/env definitions from template YAML/docker-compose configuration

Extracted Variable Metadata

Each variable should support:

  • key/name
  • label/title
  • description (if available)
  • required/optional state
  • default value
  • inferred value type

Supported Types

  • string
  • number
  • boolean
  • path values
  • port values

Expected Behavior

  • Optional variables with defaults are auto-filled
  • Required variables are validated
  • Types are inferred correctly

3. Dynamic Deployment Form Generation

Tasks

  • Generate frontend forms dynamically from parsed schema
  • Add proper validation handling
  • Ensure full frontend/backend type safety

Form Requirements

  • Required field indicators
  • Numeric input support
  • Boolean toggle/switch support
  • String/path text inputs
  • Validation messages
  • Default value prefilling
  • Responsive UI

Expected Behavior

  • No hardcoded deployment forms
  • All templates deploy dynamically from parsed schema

4. Deployment Flow Integration

Tasks

  • Submit deployment directly from generated form
  • Trigger deployment pipeline immediately
  • Open deployment terminal automatically after deployment starts

Expected Flow

  1. User selects template
  2. User clicks Deploy
  3. Dynamic form opens
  4. User fills variables
  5. Deployment starts
  6. Terminal/log streaming opens automatically

5. Unified Real-Time Log Streaming

Requirements

Use a single persistent WebSocket connection for all log streaming.

Stream Types

Pre-Deployment Logs

Stream:

  • docker compose up -d
  • image pulling
  • network creation
  • container creation
  • startup events
  • orchestration logs
  • health checks

Runtime Logs

After deployment success:

  • automatically stream docker logs -f

Architecture Requirements

  • One socket connection
  • Multiple logical log streams
  • Structured event metadata
  • Independent stream routing on frontend

Event Metadata

Each event should include:

  • stream type
  • deploymentId
  • optional containerId
  • log level
  • timestamp
  • message

6. Terminal UI Refactor

Tasks

Create a professional terminal experience similar to modern cloud/container platforms.

UI Features

  • Real terminal-style appearance

  • Terminal fonts and spacing

  • Smooth real-time streaming

  • Auto-scroll support

  • Manual scroll inspection

  • Fullscreen mode

  • Restore/minimize mode

  • Separate terminal tabs/views:

    • Deployment Logs
    • Runtime Logs
  • Preserve history while switching tabs

  • Responsive design

  • Efficient rendering for large logs

Expected Behavior

  • Initially show Deployment Logs
  • Automatically enable Runtime Logs after deployment success
  • User can switch terminals seamlessly

7. Frontend Cleanup

Tasks

  • Remove connect/disconnect server API usage from frontend
  • Keep backend implementation unchanged
  • Treat server connectivity as internally managed

Technical Goals

  • Schema-driven deployment system
  • Extensible template parsing architecture
  • Reusable deployment pipeline
  • Fully typed frontend/backend integration
  • Multiplexed socket event streaming
  • Production-grade deployment UX

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions