Architecture

GAGOS is a single Go binary serving both the API and static web UI.

Project Structure

gagos/
├── cmd/gagos/           # Application entry point
│   └── main.go          # HTTP server, routes, handlers
├── internal/
│   ├── auth/            # Authentication middleware
│   ├── cicd/            # CI/CD pipeline engine
│   │   ├── executor.go  # Job execution
│   │   ├── pipeline.go  # Pipeline parsing
│   │   └── store.go     # SQLite storage
│   ├── database/        # Database clients
│   │   ├── postgres.go
│   │   ├── mysql.go
│   │   ├── redis.go
│   │   ├── elasticsearch.go
│   │   └── s3.go
│   ├── devtools/        # Developer utilities
│   ├── k8s/             # Kubernetes client
│   ├── network/         # Network diagnostic tools
│   └── terminal/        # PTY terminal
├── web/static/          # Frontend (HTML, CSS, JS)
│   ├── index.html
│   ├── css/
│   └── js/
├── deploy/
│   ├── docker/          # Dockerfile
│   └── kubernetes/      # K8s manifests
└── docs/                # Documentation

Technology Stack

Backend

Frontend

Component Overview

HTTP Server

Single Fiber application serving:

Authentication

Kubernetes Client

CI/CD Engine

Terminal

Data Flow

Browser (Web UI)
    │
    ▼
HTTP/WebSocket
    │
    ▼
Fiber Router
    │
    ├── Static Files (/*)
    │
    ├── Auth (/api/auth/*)
    │
    └── API (/api/v1/*)
         │
         ├── Network Tools → Local execution
         │
         ├── Kubernetes → client-go → K8s API
         │
         ├── CI/CD → SQLite + K8s Jobs/SSH
         │
         ├── Database → pg/mysql/redis clients
         │
         └── Terminal → PTY → Shell

Deployment

Container Image

Kubernetes