Skip to content

Mr-Process/t-rex-claw

Repository files navigation

T-Rex Claw OS

Cyberpunk Production Deployment System - Self-healing Docker orchestration with 7 containers, AI-powered multi-agent routing, vector memory, and a neon-green glassmorphism UI.

License Docker Status


Quick Start

git clone https://github.com/Mr-Process/t-rex-claw.git
cd t-rex-claw
sudo bash install.sh

That is it. The installer handles Docker, containers, AI models, SSL, and the self-healing daemon.


Architecture

                    Internet
                       |
                  [ Traefik ]  :80 / :443 / :8080
                   /    |    \
     Landing Page  API   Control   N8N
       :3000     :8000   :8081   :5678
                   |
              [ Syve Core ]
              /           \
        [ Ollama ]    [ Qdrant ]
         :11434        :6333

7 Containers

Service Container Port Description
Traefik trex-traefik 80, 443, 8080 Reverse proxy, SSL, rate limiting
OpenClaw-Syve trex-syve 8000 Core AI engine (FastAPI)
OpenClaw-Landing trex-landing 3000 Cyberpunk landing page
OpenClaw-Control trex-control 8081 Control center dashboard
Ollama trex-ollama 11434 Local LLM engine
Qdrant trex-qdrant 6333 Vector database
N8N trex-n8n 5678 Workflow automation

Features

Self-Healing Engine (Autolife)

The scripts/autolife.sh daemon runs every minute via cron, monitoring all 7 containers. If any container stops or becomes unhealthy, it auto-restarts it, cleans up disk when usage exceeds 90%, and rotates logs.

AI Multi-Agent Router

Four specialized agents powered by local Ollama models:

Agent Model Purpose
Messaging qwen2.5:7b Natural language conversations
Code deepseek-coder-v2 Code generation and analysis
Research llama3:8b Research and knowledge tasks
Task mistral-nemo Task planning and execution

Dual Vector Memory

  • LanceDB - Local embedded vector store
  • Qdrant - High-performance similarity search

Traefik Reverse Proxy

  • Automatic SSL via Let's Encrypt
  • HTTP to HTTPS redirect
  • Security headers (XSS, HSTS, CSP)
  • Rate limiting (100 req/min)
  • Gzip compression

Cyberpunk UI

Glassmorphism design with neon green (#00ff88) theming, matrix rain animations, and real-time system monitoring dashboards.


Prerequisites

  • OS: Ubuntu 20.04+ / Debian 11+ / CentOS 8+ (any Linux with systemd)
  • RAM: 16 GB minimum (32 GB recommended for all LLM models)
  • Disk: 50 GB free space
  • GPU: NVIDIA GPU recommended for Ollama (optional, CPU works too)

Docker and Docker Compose are installed automatically by the installer.


Installation

One-Command Install

git clone https://github.com/Mr-Process/t-rex-claw.git && cd t-rex-claw && sudo bash install.sh

Step-by-Step

  1. Clone the repo

    git clone https://github.com/Mr-Process/t-rex-claw.git
    cd t-rex-claw
  2. Configure environment (optional, defaults work for localhost)

    cp .env.template .env
    nano .env
  3. Run the installer

    sudo bash install.sh

The installer will:

  • Install Docker and Docker Compose (if not present)
  • Create .env from template (if not exists)
  • Build and start all 7 containers
  • Pull Ollama AI models
  • Set up the Autolife cron job

Configuration

All settings are in .env (copy from .env.template):

Variable Default Description
DOMAIN localhost Your domain for SSL/routing
ACME_EMAIL admin@example.com Email for Let's Encrypt
OLLAMA_MODEL qwen2.5:7b Default Ollama model
SYVE_PORT 8000 API engine port
LANDING_PORT 3000 Landing page port
CONTROL_PORT 8081 Control center port
N8N_PORT 5678 N8N workflow port
QDRANT_PORT 6333 Vector database port
N8N_BASIC_AUTH_USER admin N8N login username
N8N_BASIC_AUTH_PASSWORD changeme N8N login password
AUTOLIFE_INTERVAL 30 Health check interval (sec)
BACKUP_RETENTION_DAYS 7 Days to keep backups

Management

sudo bash install.sh status      # Show container status
sudo bash install.sh restart     # Restart all services
sudo bash install.sh stop        # Stop all services
sudo bash install.sh logs        # Follow container logs
sudo bash install.sh uninstall   # Remove everything

Scripts

sudo bash scripts/health-check.sh   # Quick health verification
sudo bash scripts/backup.sh         # Manual backup
sudo bash scripts/autolife.sh       # Run self-healing check

Project Structure

t-rex-claw/
|-- install.sh                      # Master installer
|-- docker-compose.production.yml   # All 7 services
|-- .env.template                   # Environment config template
|-- .gitignore
|-- LICENSE
|-- README.md
|-- CONTRIBUTING.md
|-- CHANGELOG.md
|-- traefik/
|   |-- traefik.yml                 # Traefik static config
|   +-- dynamic/
|       +-- security.yml            # Security middleware
|-- services/
|   |-- syve/                       # Core AI engine
|   |   |-- Dockerfile
|   |   |-- main.py                 # FastAPI application
|   |   |-- requirements.txt
|   |   |-- core/
|   |   |   |-- __init__.py
|   |   |   |-- agents.py           # Multi-agent router
|   |   |   +-- memory.py           # Vector memory system
|   |   +-- public/
|   |       +-- index.html          # Dashboard UI
|   |-- landing/
|   |   |-- nginx.conf
|   |   +-- html/
|   |       +-- index.html          # Landing page
|   +-- control/
|       |-- nginx.conf
|       +-- html/
|           +-- index.html          # Control center
|-- scripts/
|   |-- autolife.sh                 # Self-healing daemon
|   |-- health-check.sh             # Health verification
|   +-- backup.sh                   # Backup automation
+-- data/                           # Runtime data (gitignored)
    +-- acme/                       # SSL certificates

API Endpoints

Method Endpoint Description
GET /api/v1/health Health check
GET /api/v1/system/stats CPU, memory, disk, uptime
GET /api/v1/agents List AI agents
GET /api/v1/memory/stats Vector memory status
POST /api/v1/chat Chat with AI agents

Troubleshooting

Containers not starting?

sudo bash install.sh logs
docker ps -a

Port conflicts? Edit .env to change port assignments, then sudo bash install.sh restart.

Ollama models not loading?

docker exec trex-ollama ollama list
docker exec trex-ollama ollama pull qwen2.5:7b

SSL not working? Ensure your domain DNS points to the server and ports 80/443 are open.


Contributing

See CONTRIBUTING.md for guidelines.

License

MIT License. See LICENSE for details.


Built by Mr-Process

About

T-Rex Claw OS - Cyberpunk Production Deployment System. Self-healing Docker orchestration with 7 containers, AI-powered multi-agent routing, vector memory, and neon-green glassmorphism UI.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors