hexabase-ai

module
v0.0.0-...-b05e726 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2025 License: Apache-2.0

README ΒΆ

Hexabase.AI - KaaS Platform with AIOps -

An open-source, multi-tenant Kubernetes as a Service platform built on K3s and vCluster.

πŸš€ Overview

Hexabase AI provides a user-friendly abstraction layer over Kubernetes, enabling developers to deploy and manage applications without dealing with Kubernetes complexity directly. It offers isolated Kubernetes environments with enterprise-grade security, monitoring, and resource quota management capabilities.

πŸ“š Documentation

Documentation Structure
docs/
β”œβ”€β”€ getting-started/        # Introduction and concepts
β”œβ”€β”€ architecture/          # System design and architecture
β”œβ”€β”€ development/           # Developer guides
β”œβ”€β”€ operations/           # Deployment and operations
β”œβ”€β”€ api-reference/        # API documentation
β”œβ”€β”€ testing/              # Testing guides ONLY (no results)
β”œβ”€β”€ implementation-summaries/ # Implementation notes
└── project-management/   # Project status and roadmap

api/
β”œβ”€β”€ testresults/          # ALL test results and reports
β”‚   β”œβ”€β”€ coverage/        # Coverage data
β”‚   β”œβ”€β”€ unit/            # Unit test results
β”‚   └── coverage-reports/ # Test coverage reports

ci/                       # CI/CD configurations
β”œβ”€β”€ github-actions/       # GitHub Actions workflows
β”œβ”€β”€ gitlab-ci/           # GitLab CI pipelines
└── tekton/              # Tekton pipeline definitions

deployments/
β”œβ”€β”€ gitops/              # GitOps configurations
β”‚   β”œβ”€β”€ flux/           # Flux CD configurations
β”‚   └── argocd/         # ArgoCD applications
β”œβ”€β”€ policies/            # Security policies
β”‚   └── kyverno/        # Kyverno policies
β”œβ”€β”€ monitoring/          # Monitoring configurations
β”‚   └── prometheus/     # Prometheus rules
└── canary/             # Progressive delivery
    └── flagger/        # Flagger configurations

🎯 Key Features

Multi-Tenant Kubernetes
  • vCluster Isolation: Each workspace gets its own virtual Kubernetes cluster
  • Resource Quotas: Fine-grained resource limits and quotas
  • Network Policies: Secure tenant isolation at the network level
Enterprise Security
  • OAuth2/OIDC: Support for Google, GitHub, Azure AD, and custom providers
  • PKCE Flow: Enhanced security for public clients
  • JWT Fingerprinting: Token binding to prevent replay attacks
  • Audit Logging: Comprehensive security event tracking
Developer Experience
  • Simple Abstractions: Organizations β†’ Workspaces β†’ Projects
  • Self-Service: Create and manage Kubernetes environments via UI/API
  • Real-time Updates: WebSocket notifications for provisioning status
Operations & Monitoring
  • Prometheus Metrics: Built-in metrics collection
  • Grafana Dashboards: Pre-configured visualization
  • Health Checks: Automated cluster health monitoring
  • Alert Management: Configurable alerting rules
Billing & Subscriptions
  • Stripe Integration: Automated billing and invoicing
  • Usage Tracking: Resource consumption monitoring
  • Flexible Plans: Multiple subscription tiers

πŸ—οΈ Architecture

Core Components
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Next.js UI    │────▢│    Go API       │────▢│   PostgreSQL    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
                               β”œβ”€β”€β–Ά Redis (Cache & Sessions)
                               β”œβ”€β”€β–Ά NATS (Message Queue)
                               β”œβ”€β”€β–Ά ClickHouse (Logs)
                               └──▢ Kubernetes API
                                         β”‚
                                   β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”
                                   β”‚ vClusters β”‚
                                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Python AIOps   │────▢│     Ollama      │────▢│    Langfuse     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Technology Stack
  • Backend: Go 1.24+, Gin, GORM, Wire
  • Frontend: Next.js 14+, TypeScript, Tailwind CSS
  • Infrastructure: Kubernetes, vCluster, Helm
  • Database: PostgreSQL 14+
  • Cache: Redis 6+
  • Message Queue: NATS JetStream
  • Monitoring: Prometheus, Grafana, Loki
  • Logging Stack: ClickHouse (structured logs), Logrus/Zap (application logging)
  • LLMOps Stack: Ollama (LLM serving), Langfuse (LLM observability), OpenAI API

🚦 Getting Started

Prerequisites
  • Go 1.21+
  • Node.js 18+
  • Docker (with Docker Compose)
  • kubectl, kind, helm (auto-installed by setup script)
  • PostgreSQL 14+ (provided via Docker)
  • Redis 6+ (provided via Docker)
Quick Start
# Clone the repository
git clone https://github.com/hexabase/hexabase-ai.git
cd hexabase-ai

# Run the setup script (installs missing dependencies)
./scripts/dev-setup.sh

# Start development
make dev  # Runs both API and UI in tmux
# OR run separately:
make dev-api  # Terminal 1
make dev-ui   # Terminal 2

The setup script will:

  • βœ… Automatically install kubectl, kind, and helm if missing
  • βœ… Create a local Kubernetes cluster
  • βœ… Start PostgreSQL, Redis, and NATS services
  • βœ… Configure the development environment
  • βœ… Generate JWT keys and configuration files
Option 2: Manual Setup
# Clone the repository
git clone https://github.com/hexabase/hexabase-ai.git
cd hexabase-ai

# Copy .env.example to .env (if needed)
cp .env.example .env

# Start infrastructure
docker compose up -d  # or docker-compose up -d

# Run the API
cd api && go run cmd/api/main.go

# Run the UI (new terminal)
cd ui && npm install && npm run dev

Access the application at:

Note: Services use non-standard ports to avoid conflicts:

  • PostgreSQL: 5433 (instead of 5432)
  • Redis: 6380 (instead of 6379)
  • NATS: 4223 (instead of 4222)

For detailed setup instructions, see the Development Environment Setup.

πŸ§ͺ Testing

# API tests
cd api
go test ./...

# UI tests
cd ui
npm test
npm run test:e2e

See the Testing Guide for comprehensive testing strategies.

πŸš€ Deployment

# Add Hexabase Helm repository
helm repo add hexabase https://charts.hexabase.ai
helm repo update

# Install Hexabase KaaS with production values
helm install hexabase-ai hexabase/hexabase-ai \
  --namespace hexabase-system \
  --create-namespace \
  --values deployments/helm/values-production.yaml

For detailed deployment options, see the Kubernetes Deployment Guide.

πŸ”„ CI/CD & GitOps

Hexabase KaaS supports multiple CI/CD platforms and GitOps workflows:

CI/CD Platforms
GitOps Tools
  • Flux - Automated Git-to-Kubernetes sync
  • ArgoCD - Declarative GitOps with UI
Security & Policies

For architecture details, see the CI/CD Architecture Guide.

🀝 Contributing

We welcome contributions! Please read our:

Development Workflow
  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“‹ Project Status

See Project Management for current development status and roadmap.

πŸ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

For the business and technical rationale behind choosing Apache 2.0, see Why Apache License 2.0?

πŸ™ Acknowledgments

  • vCluster for virtual Kubernetes clusters
  • K3s for lightweight Kubernetes
  • All our contributors and supporters

πŸ“ž Support


Built with ❀️ by the Hexabase team

Directories ΒΆ

Path Synopsis
cli
auth-plugin command
scripts
test command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL