Skip to content

πŸš€ BlackRoad OS - Complete unified monorepo with all services, infrastructure, and tooling

License

Notifications You must be signed in to change notification settings

blackboxprogramming/blackroad-os-monorepo

Repository files navigation

BlackRoad OS Monorepo

πŸš€ Complete unified monorepo for BlackRoad OS - Browser-native operating system with AI agent orchestration.

πŸ“Š Scale

  • 15+ GitHub organizations
  • 1000+ AI agents (targeting 30K β†’ 1M users β†’ 30B users)
  • 19 domains across infrastructure
  • 24+ services deployed across multiple platforms

πŸ—οΈ Architecture

Monorepo Structure

blackroad-os-monorepo/
β”œβ”€β”€ apps/                    # End-user applications
β”‚   β”œβ”€β”€ web/                # Main marketing site (Next.js)
β”‚   β”œβ”€β”€ console/            # Prism Console (Next.js)
β”‚   β”œβ”€β”€ dashboard/          # Admin dashboard (Next.js)
β”‚   └── mobile/             # React Native mobile app
β”‚
β”œβ”€β”€ services/               # Backend microservices
β”‚   β”œβ”€β”€ api/               # API Gateway (Node.js)
β”‚   β”œβ”€β”€ auth/              # Authentication service
β”‚   β”œβ”€β”€ billing/           # Billing & subscriptions
β”‚   β”œβ”€β”€ analytics/         # Analytics pipeline
β”‚   └── gateway/           # APISIX configuration
β”‚
β”œβ”€β”€ packages/              # Shared packages
β”‚   β”œβ”€β”€ shared/           # Common utilities
β”‚   β”œβ”€β”€ ui/               # Design system components
β”‚   β”œβ”€β”€ config/           # Shared configurations
β”‚   β”œβ”€β”€ types/            # TypeScript definitions
β”‚   └── agent-sdk/        # SDK for agent development
β”‚
β”œβ”€β”€ agents/                # AI Agent ecosystem
β”‚   β”œβ”€β”€ definitions/      # 1000+ agent configs (YAML/JSON)
β”‚   β”œβ”€β”€ orchestration/    # LangGraph + CrewAI orchestrators
β”‚   β”œβ”€β”€ memory/           # PS-SHA∞ memory system
β”‚   └── communication/    # NATS event bus integration
β”‚
β”œβ”€β”€ infrastructure/        # Infrastructure as Code
β”‚   β”œβ”€β”€ cloudflare/       # Workers, KV, R2, D1
β”‚   β”œβ”€β”€ railway/          # Railway service configs
β”‚   β”œβ”€β”€ kubernetes/       # K3s manifests (Alice/Octavia)
β”‚   └── raspberry-pi/     # Local LLM deployment configs
β”‚
└── tooling/              # Developer tools
    β”œβ”€β”€ cli/             # BlackRoad CLI
    β”œβ”€β”€ scripts/         # Automation scripts
    β”œβ”€β”€ deployment/      # CI/CD configurations
    └── monitoring/      # Observability setup

πŸ› οΈ Tech Stack

Core Technologies

  • Agents: LangGraph + CrewAI
  • LLM: vLLM + llama.cpp
  • Vectors: Milvus
  • Messaging: NATS (pub/sub event bus)
  • MLOps: Kubeflow + Langfuse
  • API Gateway: APISIX
  • Blockchain: Besu (RoadChain)
  • Metaverse: Ethereal Engine

Frontend

  • Framework: Next.js 14 (App Router)
  • UI: Browser-native OS (web-based)
  • Mobile: React Native

Infrastructure

  • Edge: Cloudflare (Workers, KV, R2, D1)
  • Compute: Railway, DigitalOcean Droplets
  • Local: Raspberry Pis, Jetson Orin Nano
  • Orchestration: K3s (Alice/Octavia cluster)

Domains (19 total)

  • blackroad.io - Main platform
  • lucidia.earth - AI system
  • roadchain.io - Blockchain
  • aliceqi.com - AI intelligence
  • +15 more specialized domains

πŸš€ Quick Start

Prerequisites

  • Node.js >= 20.0.0
  • pnpm >= 8.0.0
  • Docker (for local services)

Installation

# Install dependencies
pnpm install

# Run all services in dev mode
pnpm dev

# Build all packages
pnpm build

# Run tests
pnpm test

# Lint all code
pnpm lint

Development Workflow

# Work on specific app
cd apps/web
pnpm dev

# Work on specific service
cd services/api
pnpm dev

# Build specific package
pnpm build --filter=@blackroad/ui

# Run selective builds
turbo run build --filter=@blackroad/web...

πŸ“¦ Package Naming

All packages follow the @blackroad/<name> convention:

  • @blackroad/web - Web application
  • @blackroad/ui - UI components
  • @blackroad/shared - Shared utilities
  • @blackroad/agent-sdk - Agent development SDK

🚒 Deployment

Multi-Platform Deployment

# Deploy to Cloudflare
pnpm deploy:cloudflare

# Deploy to Railway
pnpm deploy:railway

# Deploy edge functions
pnpm deploy:edge

Environment-Specific Deploys

# Staging
turbo run deploy --filter='*' --env=staging

# Production
turbo run deploy --filter='*' --env=production

Platform-Specific Targets

  • Cloudflare Workers: Edge functions, API routes
  • Cloudflare Pages: Static sites, Next.js apps
  • Railway: Backend services, databases
  • K3s: Agent orchestration, memory systems
  • Raspberry Pi: Local LLM inference

πŸ€– Agent System

Event Bus Architecture

  • NATS for pub/sub messaging
  • PS-SHA∞ for memory persistence (append-only journals)
  • Milvus for vector storage

Agent Organization

agents/
β”œβ”€β”€ definitions/          # 1000+ agent YAML/JSON configs
β”‚   β”œβ”€β”€ tier-1/          # Core system agents
β”‚   β”œβ”€β”€ tier-2/          # Domain-specific agents
β”‚   └── tier-3/          # User-created agents
β”œβ”€β”€ orchestration/       # LangGraph + CrewAI workflows
β”œβ”€β”€ memory/              # Memory persistence system
└── communication/       # NATS integration

πŸ“ Independent Versioning

Each package can be versioned independently:

{
  "name": "@blackroad/ui",
  "version": "2.1.0"
}

Cross-package compatibility is managed through:

  • Semantic versioning
  • Dependency constraints
  • Integration tests

πŸ”„ CI/CD Strategy

Selective Builds

Turborepo only builds changed packages and their dependents:

# Only build affected packages
turbo run build --filter=[HEAD^1]

Multi-Environment Pipeline

- Build changed packages
- Run tests for affected packages
- Deploy to staging (auto)
- Deploy to production (manual approval)

Platform Detection

CI automatically detects target platform from package metadata:

  • Cloudflare Workers β†’ wrangler deploy
  • Railway β†’ railway up
  • K3s β†’ kubectl apply

πŸ“š Documentation

πŸ”‘ Key Features

βœ… Unified codebase - All services in one repo
βœ… Fast builds - Turborepo caching and parallelization
βœ… Independent versioning - Each package versions separately
βœ… Multi-platform - Deploy to Cloudflare, Railway, K3s, Pi
βœ… Type-safe - Shared TypeScript types across packages
βœ… Event-driven - NATS-based agent communication
βœ… Scalable - From 1K to 30K to 1M agents

πŸ“„ License

Proprietary - BlackRoad OS Inc.

🀝 Contributing

See CONTRIBUTING.md for development workflow.


Built with ❀️ by BlackRoad OS
Targeting: 30K agents β†’ 1M users β†’ 30B users

About

πŸš€ BlackRoad OS - Complete unified monorepo with all services, infrastructure, and tooling

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors