Devarno Cloud — Family Hub Infrastructure
Private cloud platform for the Devarno family with centralized authentication, real-time chat, media management, gaming features, and comprehensive admin tools.Platform Overview
Devarno Cloud (*.devarno.cloud) is a microservices-based family platform providing single sign-on (SSO), social features, and administrative capabilities across the entire devarno.cloud domain ecosystem.
Core Architecture
Service Catalog
| Service | Purpose | Technology | Status |
|---|---|---|---|
| family-hub | Central auth server, admin panel, social platform | Next.js 15, BetterAuth, shadcn/ui | Production |
| api-gateway | Edge gateway, TLS termination, subdomain routing | Go, TLS, JWT | Production |
| auth-service | JWT issuance, token validation, RBAC, user management | Go | Production |
| chat-service | WebSocket messaging, presence tracking, concurrent connections | Go, WebSocket | Production |
| media-service | File upload/download, ClamAV scanning, SHA256 dedup, thumbnails | Go, ClamAV | Production |
| gaming-service | XP system, achievements, leaderboards, Elo ratings, challenges | Go | Production |
| config-service | User preferences, system prompts, model selection, Redis pub/sub | Go, Redis | Production |
| ollama-proxy | LLM inference gateway, SSE streaming, prompt caching | Go, Ollama | Production |
| audit-service | Immutable event sink, Redis Streams, batch persistence, 365-day retention | Go, Redis Streams | Production |
Technology Stack
Backend Services:- Language: Go 1.21+
- Framework: Standard library + middleware
- Database: PostgreSQL 16
- Cache: Redis 7+ (Streams, Pub/Sub)
- WebSocket: gorilla/websocket
- Virus Scanning: ClamAV
- Framework: Next.js 15 (App Router)
- Language: TypeScript 5+
- Auth: BetterAuth + plugins
- UI: shadcn/ui + Tailwind CSS 4
- Charts: Recharts
- Orchestration: Kubernetes (Flux CD GitOps)
- Gateway: Custom Go TLS gateway
- Monitoring: Prometheus, Grafana, structured logging
- Development: Docker Compose
- CI/CD: Shared GitHub Actions workflows
Key Features
1. Identity & Authentication
- BetterAuth integration for modern auth flows
- Cross-subdomain SSO with JWT tokens
- Email verification with
@devarno.clouddomain restriction - Role-based access control (RBAC)
- Session management and token refresh
2. Family Social Platform
- User profiles and family directory
- Real-time WebSocket chat with presence tracking
- Activity feeds and notifications
- Media upload and sharing (virus scanning)
- Profile pictures and avatars
3. Gaming & Engagement
- XP/leveling system
- Achievements and badges
- Leaderboards with Elo ratings
- Weekly challenges
- Progress tracking
4. Admin & Operations
- User management dashboard
- System health monitoring
- Audit log viewer (365-day retention)
- Configuration management
- CLI tools for automation
5. AI Integration
- Ollama proxy for LLM inference
- SSE streaming responses
- Prompt caching and optimization
- Model selection per user
- System prompt management
Infrastructure Components
Production (Kubernetes)
- GitOps: Flux CD for declarative deployment
- Environment Overlays: dev, staging, production
- Helm Charts: Templated service deployments
- Secrets Management: Sealed secrets / external-secrets
- Ingress: TLS termination at API gateway
Development (Docker Compose)
- Local environment with all services
- PostgreSQL + Redis containers
- Hot reload for Go services
- Next.js dev server with HMR
- Shared network for inter-service communication
CI/CD
- Shared Workflows: Reusable GitHub Actions
- Security Scanning: Trivy, gosec, npm audit
- Build Automation: Multi-stage Docker builds
- Testing: Unit tests, integration tests
- Deployment: Automatic to staging, manual to prod
Runbooks
Operational procedures and infrastructure guides:- Remote Access - SSH, file transfer, remote desktop setup
- Tailscale VPN - Private network setup and management
- Kubernetes Operations - Deployment, scaling, troubleshooting
- Docker Compose - Local development environment
- CI/CD Workflows - Pipeline configuration and automation
Documentation
- Software Requirements Specification (SRS) - Comprehensive requirements document
- Integration Matrix - Service dependencies and API contracts
- Infrastructure Guides - Kubernetes, Docker, CI/CD setup
- Operational Runbooks - Step-by-step procedures
Getting Started
Prerequisites
- Go 1.21+
- Node.js 20+ (for family-hub frontend)
- Docker & Docker Compose
- kubectl (for Kubernetes deployments)
- Tailscale (for VPN access)
Local Development
Deployment
Monitoring & Observability
- Metrics: Prometheus exporters on all Go services
- Logging: Structured JSON logs with context
- Tracing: Request ID propagation across services
- Health Checks:
/healthand/readyendpoints - Dashboards: Grafana dashboards for each service
Security
- Email Domain Restriction: Only
@devarno.cloudemails - JWT Authentication: Short-lived access tokens
- TLS Everywhere: mTLS between services in production
- Virus Scanning: ClamAV on all media uploads
- Audit Logging: Immutable event log with 365-day retention
- RBAC: Fine-grained permission system
- Redis Pub/Sub: Secure config propagation
Service Templates
The organization provides standardized templates:- template-go-service - Go microservice with middleware stack
- template-rust-service - Rust service with Cargo workspace
SDKs
Shared libraries for consistent development:- sdk-go - Go SDK with models, middleware, utilities, Redis helpers
- sdk-js - TypeScript SDK with API client types, WebSocket manager, auth helpers
Repository Structure
devarno-cloud/family-hub- Main web application (Next.js)devarno-cloud/api-gateway- Edge gateway servicedevarno-cloud/auth-service- Authentication servicedevarno-cloud/chat-service- Real-time messagingdevarno-cloud/media-service- File managementdevarno-cloud/gaming-service- XP and achievementsdevarno-cloud/config-service- User preferencesdevarno-cloud/ollama-proxy- LLM inferencedevarno-cloud/audit-service- Event loggingdevarno-cloud/infra-kubernetes- K8s manifests and Helmdevarno-cloud/infra-docker- Docker Compose setupdevarno-cloud/infra-ci- Shared CI/CD workflowsdevarno-cloud/sdk-go- Go shared librarydevarno-cloud/sdk-js- TypeScript shared librarydevarno-cloud/proto-contracts- Event schemas and contractsdevarno-cloud/cli-tool- Admin CLI
Organization: devarno-cloud
Domain:
*.devarno.cloudPrimary Stack: Go, Next.js, PostgreSQL, Redis, Kubernetes
Status: Production (Private Family Platform)