k3s App Builder Platform

A self-contained platform for deploying apps with plain language and Claude, running entirely within k3s on a single EC2 instance.

https://github.com/davidbmar/2026-FEB-21-K3-App-Builder-Claude-proto  ·  public  ·  shipped

What it is

A local-first application development and deployment platform that allows users to describe an app in natural language, have Claude generate the code, build it into a container, and deploy it to a preview or production environment on a single-node Kubernetes cluster. It isolates apps using Kubernetes namespaces and manages traffic via Traefik.

Features

Quickstart

git clone https://github.com/davidbmar/2026-FEB-21-K3-App-Builder-Claude-proto
cd 2026-FEB-21-K3-App-Builder-Claude-proto
chmod +x scripts/*.sh
./scripts/install-k3s.sh
./scripts/setup-registry.sh
export ANTHROPIC_API_KEY=sk-ant-...
./scripts/bootstrap-cluster.sh

Architecture

flowchart TD
    User[User Browser] -->|HTTP Request| Traefik[Traefik Ingress Controller]
    Traefik -->|Route: builder.*| BuilderUI[Builder UI Service]
    Traefik -->|Route: app.*| AppNS[App Namespace Services]
    
    subgraph Builder System
        BuilderUI --> BuildOps[Build Operations]
        BuildOps -->|Generate Code| Claude[Claude API]
        BuildOps -->|Build Image| DockerHost[Docker Daemon]
        DockerHost -->|Push| LocalReg[Local Registry :5050]
        BuildOps -->|Apply Manifests| K8sAPI[k3s API Server]
    end
    
    subgraph App Namespace
        K8sAPI --> Deploy[Deployment]
        Deploy --> Pod[App Pod]
        AppNS --> Pod
    end
    
    LocalReg -->|Pull Image| Pod

How it's built

The platform is built with Python (FastAPI) for the backend logic, utilizing the Anthropic SDK for code generation. It uses k3s for container orchestration, Docker for image building, a local Docker registry for storage, and Traefik for ingress routing. Jinja2 templates are used to generate Kubernetes manifests dynamically.

How it runs

sequenceDiagram
    participant User
    participant UI as Builder UI
    participant Claude as Claude API
    participant Docker as Docker Daemon
    participant Reg as Local Registry
    participant K8s as k3s Cluster

    User->>UI: Describe App & Click Generate
    UI->>Claude: Stream Prompt with Context
    Claude-->>UI: Stream Generated Code Files
    UI->>User: Display Code Preview
    
    User->>UI: Click Build & Deploy Preview
    UI->>Docker: docker build .
    Docker->>Reg: Push Image (app:timestamp)
    UI->>K8s: Apply Preview Deployment Manifest
    K8s->>Reg: Pull Image
    K8s->>K8s: Start Preview Pod
    K8s-->>UI: Deployment Ready
    UI-->>User: Show Preview URL

How to apply & reuse

Clone the repository to an Ubuntu 24.04 EC2 instance, install dependencies via provided shell scripts, set the ANTHROPIC_API_KEY, and access the web UI via a nip.io domain pointing to the instance's public IP.

At a glance

CapabilitiesCode GenerationContainer BuildingKubernetes DeploymentTraffic RoutingVersion ManagementEnvironment Isolation
ComponentsBuilder UI (FastAPI)Build Ops ModuleClaude Ops ModuleK8s Ops ModuleTraefik IngressLocal Docker Registryk3s Control Plane
TechPythonFastAPIk3sDockerTraefikJinja2Anthropic SDK
Depends onUbuntu 24.04Docker EngineAnthropic API KeyPublic IP AddressPort 80 Access
Integrates withAnthropic Claude APInip.io DNS ServiceLocal Docker Registry
PatternsGitOps-like Manifest GenerationPreview/Production ParityNamespace IsolationStreaming AI ResponseSelf-hosted CI/CD
Reuse tagsk3sai-code-genself-hostedpythondevops-toolsingle-node

⚠ Needs attention