TECH STACK

Architecture deep dive into this production web application

Request Flow

How a request reaches this page and returns a response

  Client Browser
       |
       v
  Cloudflare CDN ── DDoS protection, WAF, SSL termination
       |
       v
  Cloudflare Tunnel ── Encrypted tunnel, zero exposed ports
       |
       v
  Traefik Proxy ── Reverse proxy, routing, middleware
       |
       v
  Nginx ── Static files, FastCGI proxy to PHP-FPM
       |
       v
  PHP-FPM 8.3 ── MVC routing, controller dispatch
       |
    ┌──┴──┐
    v     v
 MariaDB  Redis ── Persistent storage / Cache layer
Frontend Technologies

Three.js r128

3D infrastructure visualization with interactive WebGL scenes

JavaScript ES6 ES2020+

Modular architecture with native browser modules

CSS3 Custom Properties

Dark theme with CSS variables, animations, and responsive grid

HTML5 Semantic

Accessible markup with ARIA labels and semantic structure

JavaScript Module Architecture

// ES6 Module Structure public/assets/js/ ├── app.js // Entry point, orchestrates all modules └── modules/ ├── NetworkTopology3D.js // Three.js 3D visualization (20KB) ├── HomelabTopology3D.js // Full infrastructure 3D scene ├── Navigation.js // Dropdown menu & mobile nav ├── DigitalRain.js // Matrix-style background effect ├── BrowserOptimizer.js // Cross-browser compatibility └── StickyButtonBar.js // 3D scene controls
Backend Architecture

PHP 8.3-FPM

MVC framework with autoloading, services, and template rendering

MariaDB 10.11

Relational database with PDO, prepared statements, and connection pooling

Redis 7-alpine

In-memory cache for API responses and session data

Nginx 1.24

Reverse proxy, static file serving, and PHP-FPM gateway

// MVC Directory Structure src/ ├── Core/ │ ├── Autoloader.php // PSR-4 style class loading │ ├── Database.php // PDO connection singleton │ ├── View.php // Template rendering engine │ └── Cache.php // Redis caching layer ├── Controllers/ │ ├── DashboardController.php │ ├── StackController.php │ └── HomelabController.php ├── Services/ │ └── DashboardService.php // Stats, messages, DB status ├── Models/ │ ├── Guestbook.php // Message CRUD operations │ ├── Upload.php // File upload management │ └── SystemLog.php // Activity logging ├── Config/ │ └── InfrastructureData.php // 3D topology data source └── API/ └── Controllers/ └── InfrastructureController.php
Kubernetes Deployment Architecture

Kubernetes Talos Linux

3-node cluster on immutable OS for container orchestration

Proxmox VE HA Cluster

3-node HA cluster virtualizing all infrastructure

Flannel CNI

Container network interface for pod-to-pod communication

Flux CD GitOps

Continuous deployment with automatic Git-based reconciliation

Pod Architecture

  Kubernetes Pod (lemp namespace)
  ┌─────────────────────────────────────────────────────────┐
  │                                                         │
  │  initContainer: copy-files                             │
  │  └─ Copies application code to shared volume            │
  │                                                         │
  │  ┌─────────────┐  ┌─────────────┐                      │
  │  │   Nginx     │  │  PHP-FPM   │                      │
  │  │  HTTP       │──│  FastCGI    │                      │
  │  │  Static +   │  │  MVC App    │                      │
  │  │  FastCGI    │  │  Autoload   │                      │
  │  └──────┬──────┘  └──────┬──────┘                      │
  │         │                │                              │
  │    shared-files (emptyDir)                             │
  │                                                         │
  └───────────────────────┬─────────────────────────────────┘
                          │
            ┌─────────────┼─────────────┐
            v             v             v
     MariaDB Pod    Redis Pod    PVC Storage
GitOps CI/CD Pipeline - Production Workflow

Automated deployment pipeline: Code → Build → Test → Deploy (1-2 minutes end-to-end)

💻
Code Push
Git commit to
testing-dashboard
repository
~1s
🪝
GitHub Webhook
Triggers Jenkins
build pipeline
automatically
<1s
🏗️
Jenkins Build
Reads Jenkinsfile
Spawns K8s pod
Runs pipeline
~5s
📦
Kaniko Build
Builds container
No privileged mode
Tags with commit
~20-30s
🗄️
Registry Push
Push to local
container registry
Tagged with commit
~5-10s
📝
Update Manifest
Jenkins updates
image tag in Git
thales-kubernetes
~2s
🔄
Flux Reconcile
Flux detects change
Pulls manifest
1-min sync interval
~1-60s
☸️
K8s Deploy
Rolling update
Zero downtime
Health checks
~10-20s
Live Production
New version live
Changes visible
Pipeline complete
DONE
Complete Pipeline: ~1-2 minutes (Code to Production)
Flow: git push → GitHub → Jenkins (webhook) → Kaniko (build) → Local Registry → Manifest Update → Flux CD → Kubernetes → Production
Security Architecture

Cloudflare Tunnel

Zero exposed ports, encrypted tunnel to edge network

Traefik

Reverse proxy with automatic TLS and middleware

Network Policies

Pod-to-pod isolation and VLAN segmentation

Authentik

SSO portal (rebuild pending)

Performance Metrics

Page Load Times

Initial Load (cached)
~200ms
Initial Load (cold)
~800ms
3D Scene Init
~1.2s
API Response (avg)
~50ms

Asset Sizes

dashboard.css
~33KB
Three.js Library
~600KB
NetworkTopology3D.js
~20KB
app.js + modules
~25KB

Infrastructure Performance

Docker Build (cached)
~30s
Docker Build (cold)
~2-3min
Deploy (commit to live)
~1-2min
Redis Cache Hit Rate
~95%
Current System Status

Runtime

Container: web-app-fffc757cf-nxtjp
PHP Version: 8.3.30
Memory: 2 MB
Load Average: 0.04

Database

Status: Connected
Engine: MariaDB 10.11.14-MariaDB-ubu2204
Host: K8s Service