How 0jk6/freight works
Main Components
a) Frontend Layer:
• React/TypeScript application (found in ui/freight)
• As a web interface component
b) Backend Components:
• Backend API Service (cmd/backend)
• Processing Service (cmd/service)
• As separate microservices
c) Kubernetes Infrastructure:
• K8s Jobs for code execution
• Orchestration layer
• Pod isolation
d) Database Layer:
• Represented by the internal/db component
• As a persistent storage component
Component Relationships
• Frontend → Backend API (HTTP/REST)
• Backend API → Database (data persistence)
• Backend API → Orchestrator (job management)
• Orchestrator → K8s Jobs (code execution)
• Service → K8s Jobs (processing)
Architectural Patterns to Highlight
• Microservices Architecture (separate backend and service)
• Job Processing Pattern (for code execution)
• API Gateway Pattern (backend serving as the entry point)
Specific Implementation Details
• Handlers (internal/handlers)
• Models (internal/models)
• Jobs (internal/jobs)
• Orchestrator (internal/orchestrator)
• Middlewares (internal/middlewares)
Additional Elements
• Security boundaries
• CORS middleware
• Logging components
• Docker container boundaries