|
1 | | -# voidrunner |
2 | | -The LLM-powered distributed task execution platform |
| 1 | +# VoidRunner |
| 2 | + |
| 3 | +The LLM-powered distributed task execution platform built with Go and Kubernetes. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +VoidRunner is a Kubernetes-based distributed task execution platform that provides secure, scalable code execution in containerized environments. The platform is designed with security-first principles and follows microservices architecture. |
| 8 | + |
| 9 | +## Features |
| 10 | + |
| 11 | +- **Secure Execution**: Container-based task execution with gVisor security |
| 12 | +- **RESTful API**: Clean HTTP API with structured logging and monitoring |
| 13 | +- **Kubernetes Native**: Designed for cloud-native deployments |
| 14 | +- **Authentication**: JWT-based authentication system |
| 15 | +- **Monitoring**: Built-in health checks and observability |
| 16 | + |
| 17 | +## Quick Start |
| 18 | + |
| 19 | +### Prerequisites |
| 20 | + |
| 21 | +- Go 1.24+ installed |
| 22 | +- PostgreSQL (for future database operations) |
| 23 | +- Docker (for containerization) |
| 24 | + |
| 25 | +### Setup |
| 26 | + |
| 27 | +1. **Clone the repository** |
| 28 | + ```bash |
| 29 | + git clone https://github.com/voidrunnerhq/voidrunner.git |
| 30 | + cd voidrunner |
| 31 | + ``` |
| 32 | + |
| 33 | +2. **Install dependencies** |
| 34 | + ```bash |
| 35 | + go mod download |
| 36 | + ``` |
| 37 | + |
| 38 | +3. **Configure environment** |
| 39 | + ```bash |
| 40 | + cp .env.example .env |
| 41 | + # Edit .env with your configuration |
| 42 | + ``` |
| 43 | + |
| 44 | +4. **Run the development server** |
| 45 | + ```bash |
| 46 | + go run cmd/api/main.go |
| 47 | + ``` |
| 48 | + |
| 49 | +The server will start on `http://localhost:8080` by default. |
| 50 | + |
| 51 | +### API Endpoints |
| 52 | + |
| 53 | +- `GET /health` - Health check endpoint |
| 54 | +- `GET /ready` - Readiness check endpoint |
| 55 | +- `GET /api/v1/ping` - Simple ping endpoint |
| 56 | + |
| 57 | +### Testing |
| 58 | + |
| 59 | +Run all tests: |
| 60 | +```bash |
| 61 | +go test ./... |
| 62 | +``` |
| 63 | + |
| 64 | +Run tests with coverage: |
| 65 | +```bash |
| 66 | +go test ./... -cover |
| 67 | +``` |
| 68 | + |
| 69 | +Run specific test suite: |
| 70 | +```bash |
| 71 | +go test ./internal/api/handlers/... -v |
| 72 | +``` |
| 73 | + |
| 74 | +### Build |
| 75 | + |
| 76 | +Build the application: |
| 77 | +```bash |
| 78 | +go build -o bin/api cmd/api/main.go |
| 79 | +``` |
| 80 | + |
| 81 | +Run the binary: |
| 82 | +```bash |
| 83 | +./bin/api |
| 84 | +``` |
| 85 | + |
| 86 | +## Architecture |
| 87 | + |
| 88 | +VoidRunner follows the standard Go project layout: |
| 89 | + |
| 90 | +``` |
| 91 | +voidrunner/ |
| 92 | +├── cmd/ # Application entrypoints |
| 93 | +│ └── api/ # API server main |
| 94 | +├── internal/ # Private application code |
| 95 | +│ ├── api/ # API handlers and routes |
| 96 | +│ │ ├── handlers/ # HTTP handlers |
| 97 | +│ │ ├── middleware/ # HTTP middleware |
| 98 | +│ │ └── routes/ # Route definitions |
| 99 | +│ ├── config/ # Configuration management |
| 100 | +│ ├── database/ # Database layer |
| 101 | +│ └── models/ # Data models |
| 102 | +├── pkg/ # Public libraries |
| 103 | +│ ├── logger/ # Structured logging |
| 104 | +│ ├── metrics/ # Prometheus metrics |
| 105 | +│ └── utils/ # Shared utilities |
| 106 | +├── migrations/ # Database migrations |
| 107 | +├── scripts/ # Build and deployment scripts |
| 108 | +└── docs/ # Documentation |
| 109 | +``` |
| 110 | + |
| 111 | +## Configuration |
| 112 | + |
| 113 | +The application uses environment variables for configuration. See `.env.example` for available options: |
| 114 | + |
| 115 | +- `SERVER_HOST`: Server bind address (default: localhost) |
| 116 | +- `SERVER_PORT`: Server port (default: 8080) |
| 117 | +- `SERVER_ENV`: Environment (development/production) |
| 118 | +- `LOG_LEVEL`: Logging level (debug/info/warn/error) |
| 119 | +- `LOG_FORMAT`: Log format (json/text) |
| 120 | +- `CORS_ALLOWED_ORIGINS`: Comma-separated list of allowed origins |
| 121 | + |
| 122 | +## Contributing |
| 123 | + |
| 124 | +1. Fork the repository |
| 125 | +2. Create your feature branch (`git checkout -b feature/amazing-feature`) |
| 126 | +3. Commit your changes (`git commit -m 'feat: add amazing feature'`) |
| 127 | +4. Push to the branch (`git push origin feature/amazing-feature`) |
| 128 | +5. Open a Pull Request |
| 129 | + |
| 130 | +## License |
| 131 | + |
| 132 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
0 commit comments