HarchOS Server — Carbon-Aware GPU Orchestration Platform | Sovereign AI Infrastructure, 30+ API Endpoints, FastAPI, Morocco
# HarchOS Server
The **carbon-aware, sovereignty-first** GPU orchestration platform by HarchCorp.
Built on Morocco's renewable energy advantage to deliver the greenest AI compute on the planet.
**30+ API endpoints** across 10 endpoint groups.
## ✨ Feature Highlights
| Feature | Description |
|---------|-------------|
| 🌍 **Carbon-Aware Scheduling** | Automatically routes workloads to the greenest GPU hub based on real-time carbon intensity data |
| 🔒 **Data Sovereignty** | Strict data residency controls with local-only storage policies and sovereign cloud compliance |
| 🌐 **Multi-Region** | 5 Moroccan GPU hubs optimized for carbon intensity, with Pan-African expansion planned |
| 💰 **Tiered Pricing** | Enterprise, Performance, and Standard tiers with transparent billing in USD, MAD, and EUR |
| ⚡ **1,798 GPUs** | Carbon-optimized distribution: Ouarzazate (800) → Dakhla (400) → Benguerir (350) → Tanger (200) → Casablanca (48) |
| 🌱 **~47 gCO2/kWh Avg** | Average grid carbon intensity across all hubs (vs 91 before optimization) |
## Quick Start (Local/SQLite)
```bash
# Install dependencies
pip install -r requirements.txt
# Start the server
uvicorn app.main:app --host 0.0.0.0 --port 8000
# In another terminal, seed the database
python -m app.seed
# Test endpoints
curl
localhost
curl
localhost
curl
localhost
curl
localhost
curl
localhost
curl -H "X-API-Key: hsk_test_development_key_12345"
localhost
```
## Docker Compose (PostgreSQL)
### Development
```bash
docker compose up -d
```
### Production
```bash
docker compose -f docker-compose.production.yml up -d
```
See docker-compose.production.yml for PostgreSQL 16 + Redis 7 setup.
## API Overview
| Endpoint | Method | Description |
|----------|--------|-------------|
| **Health** | | |
| `/v1/health` | GET | Health check |
| `/v1/monitoring/metrics` | …