Skip to main content

Overview

Orphelix is built with modern, production-ready technologies chosen for performance, developer experience, and scalability.

Frontend

React 19, Next.js 15, Material-UI v7, TypeScript 5.7

Backend

Next.js API Routes, Kubernetes Client Node, better-sqlite3

State & Data

TanStack Query, Zustand, SQLite, Server-Sent Events

Development

Vitest, Playwright, ESLint, Prettier, TypeScript

Core Technologies

Frontend Framework

Version: 19.0.0Why React 19:
  • New concurrent features for better performance
  • Automatic batching of state updates
  • Improved Server Components support
  • Better TypeScript integration
  • Server Actions for data mutations
Key Features Used:
  • React Server Components (RSC)
  • Suspense boundaries for loading states
  • useTransition for non-blocking updates
  • useDeferredValue for expensive computations
  • memo and useMemo for performance optimization
Example:
Version: 16.0.3 (latest)Why Next.js 15:
  • App Router with React Server Components
  • Built-in API routes (serverless functions)
  • Automatic code splitting and optimization
  • Edge runtime support
  • Turbopack for faster development builds
App Router Features:
  • File-based routing (app/ directory)
  • Nested layouts with shared UI
  • Loading UI with Suspense
  • Error boundaries for graceful errors
  • Server and Client Components separation
API Routes:
  • RESTful endpoints in app/api/
  • Server-side Kubernetes API calls
  • SSE endpoint for real-time updates
  • GitHub API integration
Configuration:
Version: 7.3.5Why Material-UI v7:
  • Comprehensive component library
  • Built-in theming system
  • Responsive design utilities
  • Accessibility compliant (WCAG)
  • CSS-in-JS with Emotion
Components Used:
  • Layout: Container, Grid, Stack, Box
  • Navigation: Drawer, AppBar, Tabs
  • Data Display: Table, Card, Chip, Badge
  • Inputs: TextField, Select, Switch, Button
  • Feedback: Alert, Snackbar, Skeleton, CircularProgress
  • Overlay: Dialog, Menu, Tooltip, Popover
Theming:
Custom Styles:
  • Liquid Glass visual preset (glassmorphism)
  • Classic flat design preset
  • Dark/light mode support
  • Custom color gradients
Version: 5.7.2Why TypeScript:
  • Type safety prevents runtime errors
  • Better IDE autocomplete and IntelliSense
  • Self-documenting code with type definitions
  • Easier refactoring with compile-time checks
Configuration:
Strict Mode Features:
  • strictNullChecks - no implicit undefined
  • noImplicitAny - all types must be defined
  • strictFunctionTypes - strict function type checking
  • noUncheckedIndexedAccess - safe array/object access

State Management

Version: 5.90.10Why TanStack Query:
  • Declarative data fetching
  • Automatic caching and invalidation
  • Background refetching
  • Optimistic updates
  • Request deduplication
Key Features:
  • useQuery for GET requests
  • useMutation for POST/PUT/DELETE
  • queryClient for cache manipulation
  • Query invalidation on mutations
  • Prefetching for better UX
Configuration:
DevTools:
  • React Query DevTools for debugging
  • Cache inspection
  • Query timeline
  • Network request tracking
Version: 5.0.8Why Zustand:
  • Minimal boilerplate (vs Redux)
  • No Provider wrapper needed
  • Built-in TypeScript support
  • Middleware for persistence
  • Small bundle size (~1KB)
Stores:
  • useModeStore - App mode, context, namespace
  • useGitHubStore - GitHub repo, PRs, edit basket
  • useClusterAliases - Cluster friendly names
  • useCriticalIssuesSettings - Critical issue preferences
  • useSidebarPins - Sidebar navigation state
Middleware:
Version: 12.4.6Why SQLite:
  • Embedded database (no server needed)
  • Zero configuration
  • ACID compliant
  • Fast for read-heavy workloads
  • Single file database
Database File: orphelix.db in project rootTables:
  • user_settings - App preferences
  • github_settings - GitHub integration
  • github_pending_prs - Pending pull requests
  • github_edit_basket - Multi-file PR staging
  • cluster_aliases - Cluster friendly names
  • critical_issues_settings - Monitoring preferences
  • sidebar_pins - Navigation pins
Why better-sqlite3:
  • Synchronous API (simpler than async)
  • 10x faster than node-sqlite3
  • Prepared statements
  • WAL mode for concurrency
  • Type-safe with TypeScript
Performance:

Backend Technologies

Version: 1.4.0Why @kubernetes/client-node:
  • Official Kubernetes JavaScript client
  • Full API coverage
  • TypeScript definitions included
  • Watch API for real-time updates
  • Multi-cloud authentication support
API Clients:
  • AppsV1Api - Deployments, StatefulSets, DaemonSets
  • CoreV1Api - Pods, Services, ConfigMaps, Secrets, Nodes
  • AutoscalingV2Api - Horizontal Pod Autoscalers
  • BatchV1Api - Jobs, CronJobs
  • NetworkingV1Api - Ingress
  • EventsV1Api - Kubernetes Events
Authentication: Supports all kubeconfig auth methods:
  • Client certificates (x509)
  • Bearer tokens (service accounts)
  • Exec plugins (AWS, GCP, Azure)
  • OIDC authentication
Example:
Native Web APIWhy SSE:
  • Real-time updates without polling
  • Automatic reconnection
  • Lower latency than polling
  • Built into browsers (no library needed)
  • Server push (not request-response)
vs WebSockets:
  • Simpler protocol (HTTP)
  • One-way communication (server → client)
  • Better for read-only real-time data
  • No need for WebSocket server setup
Implementation:
Octokit v22 + GitHub AppPackages:
  • @octokit/rest (v22.0.1) - REST API client
  • @octokit/app (v16.1.2) - GitHub App auth
  • @octokit/auth-app (v8.1.2) - App authentication
  • next-auth (v5.0.0-beta.30) - OAuth flow
Why GitHub App:
  • Organization-level access
  • Fine-grained permissions
  • Higher rate limits (5000 req/hour)
  • Installation-based authentication
  • Works with private repos
Features:
  • Repository file browsing
  • File content reading/editing
  • Branch creation
  • Pull request creation
  • Multi-file commits
  • Kustomize structure detection
Configuration:
Vercel AI SDK v5Packages:
  • ai (v5.0.93) - Vercel AI SDK
  • @ai-sdk/openai (v2.0.65) - OpenAI provider
Why Vercel AI SDK:
  • Streaming responses support
  • Provider-agnostic (swap OpenAI for Anthropic)
  • Type-safe
  • Built-in error handling
  • React hooks for streaming UI
Features:
  • Smart file matching (GPT-4o-mini)
  • Issue troubleshooting explanations
  • Repository structure analysis
  • Deployment YAML suggestions
Model Used:
  • gpt-4o-mini - Fast, cost-effective ($0.15/1M tokens)
Example:

UI Libraries

Version: 0.54.0 (via @monaco-editor/react 4.7.0)Why Monaco:
  • Same editor as VS Code
  • Syntax highlighting for YAML
  • IntelliSense / autocomplete
  • Error detection
  • Diff view for changes
Features Used:
  • YAML language support
  • Dark/light themes
  • Read-only mode
  • Diff editor for PR preview
  • Custom keybindings
Configuration:
Version: 12.9.3Why ReactFlow:
  • Interactive node graphs
  • Custom node rendering
  • Zoom/pan controls
  • Edge routing
  • Layout algorithms
Use Case: Topology visualization showing:
  • Deployments → Pods → Nodes
  • Services → Endpoints
  • ConfigMaps/Secrets → Deployments
  • Ingress → Services
Example:
Version: 3.4.1Why Recharts:
  • React-first charting library
  • Responsive charts
  • Composable components
  • TypeScript support
  • Good documentation
Charts Used:
  • Line charts (resource usage over time)
  • Bar charts (pod status distribution)
  • Pie charts (namespace resource allocation)
  • Area charts (CPU/memory trends)
Example:
Version: 10.1.0Why react-markdown:
  • Safe markdown rendering
  • Customizable components
  • Syntax highlighting support
  • GitHub Flavored Markdown
Use Cases:
  • AI-generated explanations
  • Documentation rendering
  • PR descriptions
  • README preview
Example:

Development Tools

Version: 4.0.10Why Vitest:
  • Vite-native (faster than Jest)
  • ESM and TypeScript support
  • Compatible with Jest API
  • Built-in code coverage
  • Watch mode with HMR
Configuration:
Test Types:
  • Unit tests (lib/, components/)
  • Integration tests (API routes)
  • Component tests (React Testing Library)
Example:
Version: 1.56.0Why Playwright:
  • E2E testing in real browsers
  • Auto-wait for elements
  • Network interception
  • Screenshots/videos
  • Cross-browser support
Configuration:
Test Example:
ESLint: 9.39.1
Prettier: 3.6.2
Why ESLint:
  • Catch bugs before runtime
  • Enforce code style
  • TypeScript-aware linting
  • Auto-fix common issues
Configuration:
Why Prettier:
  • Consistent code formatting
  • No style debates
  • Editor integration
  • Pre-commit hook support
Configuration:
Version: 6.0.13Why PM2:
  • Process management for production
  • Auto-restart on crash
  • Log management
  • Cluster mode
  • Zero-downtime reload
CLI Features:
Process Configuration:

Utilities

Version: 4.1.0Why date-fns:
  • Modular (tree-shakeable)
  • Immutable
  • TypeScript support
  • Locale support
  • Smaller than Moment.js
Usage:
Version: 4.1.1Why js-yaml:
  • Parse YAML to JavaScript objects
  • Dump JavaScript to YAML
  • Safe loading (no code execution)
  • Schema validation
Usage:
Version: 8.0.2Why diff:
  • Text diffing algorithm
  • Line-by-line comparison
  • Patch generation
  • Unified diff format
Usage:
Version: 1.11.13Why html-to-image:
  • Export DOM to PNG/SVG
  • Topology graph export
  • Screenshot generation
  • Client-side only (no server)
Usage:
Version: 10.0.1Why node-notifier:
  • Desktop notifications
  • Cross-platform (macOS, Windows, Linux)
  • Native notification APIs
  • Custom icons and sounds
Usage:

Version Compatibility

Node.js

Required: Node.js 20.x or later

Package Manager

npm 10+ or pnpm 9+ or yarn 4+

Kubernetes

Kubernetes 1.25+ (for Watch API compatibility) Tested on:
  • AWS EKS 1.28, 1.29, 1.30
  • GCP GKE 1.28, 1.29
  • Azure AKS 1.28, 1.29
  • Minikube 1.32+
  • Kind 0.20+

kubectl

kubectl 1.25+ (must match cluster version ±1)

Dependencies Overview

Production Dependencies (36 packages)

Development Dependencies (18 packages)

Bundle Size

Client Bundle (Production)

  • Total: ~450 KB gzipped
  • React + Next.js: ~150 KB
  • Material-UI: ~120 KB
  • TanStack Query: ~25 KB
  • Monaco Editor: ~80 KB (lazy loaded)
  • ReactFlow: ~40 KB (lazy loaded)
  • Other libraries: ~35 KB

Server Bundle

  • Total: ~8 MB (includes node_modules)
  • better-sqlite3: Native binary (~2 MB)
  • @kubernetes/client-node: ~1.5 MB
  • Next.js runtime: ~3 MB
  • Other: ~1.5 MB

Optimization Strategies

  • Dynamic imports for heavy components
  • Tree shaking with ESM
  • Code splitting per route
  • Image optimization with Next.js
  • Compression (gzip/brotli)

Browser Support

Supported Browsers

  • Chrome: 90+
  • Firefox: 88+
  • Safari: 14+
  • Edge: 90+

Required Features

  • ES2022 support
  • EventSource API (SSE)
  • fetch API
  • localStorage / sessionStorage
  • CSS Grid & Flexbox
  • WebAssembly (for Monaco Editor)

Next Steps

Architecture

System architecture and design patterns

Project Structure

File organization and conventions

Getting Started

Set up development environment

Contributing

Contribution guidelines