TRex is Red Hat's Trusted Rest EXample - a production-ready microservice template for rapid API development.
TRex provides a complete foundation for building enterprise-grade REST APIs with built-in best practices:
- 🚀 Rapid Development - Generate complete CRUD APIs in minutes
- 🏗️ Plugin Architecture - Self-contained entities with auto-registration
- 🔒 Production Ready - OIDC auth, metrics, logging, error handling
- 📊 OpenAPI First - Auto-generated docs and client SDKs
- 🧪 Testing Built-in - Unit and integration test frameworks
- 📦 Container Ready - Docker and OpenShift deployment
Goal: Get from zero to production-ready API in minutes, not days.
Clone TRex into a new project with your business domain:
go run ./scripts/clone/main.go --name my-service --destination ~/projects/my-service
Generate complete CRUD operations for new business objects:
go run ./scripts/generate/main.go --kind Product
Run TRex locally to understand how it works:
make db/setup && make run
# Visit http://localhost:8000/api/rh-trex/v1/dinosaurs
📚 Full Documentation - Organized by user workflow:
- Getting Started - Choose your path and understand TRex
- Template Cloning - Create new microservices
- Entity Development - Add entities to existing projects
- Operations - Deploy and run services
- Reference - Technical specifications and APIs
- Troubleshooting - Common problems and solutions
- Framework Development - Contributing to TRex
TRex uses a plugin-based architecture where each business entity is self-contained:
- API Layer - RESTful endpoints with authentication
- Service Layer - Business logic with transaction management
- DAO Layer - Database operations with GORM
- Plugin System - Auto-registration, no manual framework edits
See Architecture Diagrams for detailed technical overview.