AI-Native Developer Platform - A self-hosted developer platform with AI-assisted workflows for code review, documentation generation, test creation, and code migration. Built with GitOps principles for ephemeral preview environments.
- GitOps Preview Environments: Create ephemeral environments on every PR like Vercel/Netlify but self-hosted
- AI-Assisted Workflows:
- Automated PR code review with configurable focus areas
- Documentation generation (README, API docs, architecture)
- Test generation with target coverage goals
- Code migration between languages (JSβTS, PythonβGo, etc.)
- Multi-Project Management: Organize projects, environments, and deployments
- Real-time Updates: WebSocket-based live deployment logs and status
- Full Observability: OpenTelemetry + Prometheus + Grafana + Tempo + Loki
- Kubernetes Native: Deploy with kustomize, GitOps via ArgoCD
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Frontend ββββββΆβ Control ββββββΆβ PostgreSQL β
β (Next.js) β β Plane β β (Primary) β
βββββββββββββββ β (Go/Gin) β βββββββββββββββ
ββββββββ¬βββββββ
β
ββββββββββββββββββΌβββββββββββββββββ
βΌ βΌ βΌ
βββββββββββββ βββββββββββββ βββββββββββββ
β NATS β β Redis β β Workers β
β (Queue) β β (Cache/ β β (Async β
β β β Logs) β β Jobs) β
βββββββββββββ βββββββββββββ βββββββββββββ
β
ββββββββββββββββββΌβββββββββββββββββ
βΌ βΌ βΌ
βββββββββββββ βββββββββββββ βββββββββββββ
β Prometheusβ β Tempo β β Loki β
β (Metrics) β β (Traces) β β (Logs) β
βββββββββββββ βββββββββββββ βββββββββββββ
β
βΌ
βββββββββββββ
β Grafana β
β(Dashboards)β
βββββββββββββ
- Docker & Docker Compose
- Go 1.22+ (for local development)
- Node.js 20+ (for frontend development)
- kubectl & kustomize (for Kubernetes deployment)
# Clone and enter
git clone https://github.com/atlur/devplatform.git
cd devplatform
# Start all services (PostgreSQL, NATS, Redis, Control Plane, Worker, Frontend, Observability)
make dev
# Or manually with docker-compose
docker-compose up -d
# Access points:
# Frontend: http://localhost:3000
# API: http://localhost:8080
# Grafana: http://localhost:3001 (admin/admin)
# Prometheus: http://localhost:9090
# NATS Monitor: http://localhost:8222Copy .env.example to .env and configure:
# Server
SERVER_ADDR=:8080
# Database
DATABASE_URL=postgres://devplatform:devplatform@localhost:5432/devplatform?sslmode=disable
# Message Queue
NATS_URL=nats://localhost:4222
# Cache & Logs
REDIS_ADDR=localhost:6379
# Authentication
JWT_SECRET=your-secure-random-secret
# AI Provider (openai, anthropic, ollama, mock)
AI_PROVIDER=mock
AI_API_KEY=your-api-key
# Observability
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317devplatform/
βββ cmd/
β βββ control-plane/ # API server entry point
β βββ worker/ # Async job worker entry point
βββ internal/
β βββ ai/ # AI client (OpenAI, Anthropic, Ollama)
β βββ auth/ # JWT authentication
β βββ gitops/ # GitOps manager (kustomize, ArgoCD)
β βββ platform/ # Core platform logic
β βββ worker/ # Job processor
βββ pkg/
β βββ models/ # Domain models
β βββ telemetry/ # OpenTelemetry + Prometheus
βββ frontend/ # Next.js 14 + React + TypeScript
β βββ src/
β β βββ app/ # App Router pages
β β βββ components/ # React components
β β βββ hooks/ # Custom hooks
β β βββ services/ # API client
β β βββ lib/ # Utilities
βββ deploy/
β βββ docker/ # Dockerfiles
β βββ k8s/ # Kubernetes manifests (kustomize)
β β βββ base/ # Base configuration
β β βββ overlays/ # Environment overlays
β βββ observability/ # Prometheus, Tempo, Loki, Grafana configs
βββ docs/
β βββ adr/ # Architecture Decision Records
β βββ api/ # OpenAPI specifications
β βββ runbooks/ # Operational runbooks
βββ .github/
β βββ workflows/ # CI/CD pipelines
β βββ dependabot.yml # Dependency updates
βββ docker-compose.yml # Local development stack
βββ Makefile # Common commands
βββ go.mod / go.sum # Go dependencies
βββ README.md
# Development
make dev # Start all services
make dev-logs # Follow logs
make dev-stop # Stop services
# Building
make build # Build all binaries
make build-docker # Build Docker images
# Testing
make test # Run all tests
make test-unit # Unit tests only
make test-integration # Integration tests
make test-coverage # Coverage report
# Code Quality
make lint # All linters
make fmt # Format all code
make vet # Go vet
# Database
make migrate-up # Run migrations
make migrate-create NAME=add_table # Create migration
# Documentation
make adr-new TITLE="Use Redis" # Create ADR
make docs-serve # Serve docs locallyThe control plane exposes a REST API with OpenAPI documentation:
# Health checks
curl http://localhost:8080/health
curl http://localhost:8080/ready
# Authentication
curl -X POST http://localhost:8080/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","password":"password"}'
# Projects
curl -H "Authorization: Bearer $TOKEN" http://localhost:8080/api/v1/projects
curl -X POST -H "Authorization: Bearer $TOKEN" http://localhost:8080/api/v1/projects \
-d '{"name":"my-project","description":"My project"}'Implement the AIClient interface in internal/ai/client.go:
type AIClient interface {
Chat(ctx context.Context, messages []Message) (string, error)
ChatStream(ctx context.Context, messages []Message) (<-chan string, error)
ReviewPR(ctx context.Context, req ReviewRequest) (*ReviewResult, error)
GenerateDocs(ctx context.Context, req DocsRequest) (*DocsResult, error)
GenerateTests(ctx context.Context, req TestsRequest) (*TestsResult, error)
MigrateCode(ctx context.Context, req MigrateRequest) (*MigrateResult, error)
}# Staging
kubectl apply -k deploy/k8s/overlays/staging
# Production
kubectl apply -k deploy/k8s/overlays/production
# Or with ArgoCD (recommended)
kubectl apply -f deploy/argocd/# Production-like with docker-compose
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d- Authentication: JWT HS256 with role-based access control
- Authorization: Project-scoped permissions
- Secrets: Kubernetes secrets / Docker secrets
- Network: mTLS via service mesh (optional)
- Scanning: Trivy, gosec, CodeQL in CI
- SBOM: Syft-generated, cosign-signed
- Dependency Updates: Dependabot weekly
See SECURITY.md for vulnerability reporting.
The platform includes a complete observability stack:
- Metrics: Prometheus + Grafana dashboards
- Traces: Tempo (OpenTelemetry)
- Logs: Loki + Grafana
- Alerting: Alertmanager (configured separately)
Key dashboards:
- DevPlatform Overview
- Deployment Pipeline
- AI Job Performance
- System Health
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
See CONTRIBUTING.md for guidelines.
Licensed under the Apache License, Version 2.0. See LICENSE.
- Gin - HTTP framework
- NATS - Message queue
- OpenTelemetry - Observability
- Next.js - React framework
- Tailwind CSS - Styling
- Zustand - State management
- TanStack Query - Server state