A high-performance Go backend framework built with modern technologies for scalable web applications and microservices.
- High Performance: Built with Go 1.23 and Fiber web framework
- Multi-Database Support: MongoDB, PostgreSQL, and Redis integration
- Message Queue: Kafka integration for event-driven architecture
- Monitoring: Elastic APM integration for application performance monitoring
- Authentication: JWT-based authentication system
- API Documentation: Swagger/OpenAPI documentation
- Container Ready: Docker support with multi-stage builds
- Blockchain Integration: Ethereum smart contract support
- Modular Architecture: Clean separation of concerns with modular design
- Language: Go 1.23
- Web Framework: Fiber v2
- Databases:
- MongoDB (via mongo-driver)
- PostgreSQL (via GORM)
- Redis (for caching and pub/sub)
- Message Queue: Apache Kafka
- Monitoring: Elastic APM
- Authentication: JWT
- Documentation: Swagger
- Container: Docker
- Go 1.23 or higher
- Docker (optional)
- MongoDB
- PostgreSQL
- Redis
- Apache Kafka
git clone https://github.com/Rivalz-ai/framework-be.git
cd framework-bego mod downloadCreate a .env file in the root directory with your configuration:
# Hashicorp Vault Configuration
KEY_STORE_HOST =https://vault.rivalz.ai
KEY_STORE_PORT =8200
KEY_STORE_USER =
KEY_STORE_PASSWORD =
KEY_STORE_DIR =go run main.goair# Build the image
docker build -t rivalz-framework-be .
# Run the container
docker run -p 30000:30000 rivalz-framework-beOnce the application is running, you can access the Swagger documentation at:
http://localhost:30000/swagger/
framework-be/
βββ acl/ # Access Control Layer
βββ define/ # Contract definitions and ABIs
β βββ abi/ # Ethereum smart contract ABIs
βββ middleware/ # HTTP middleware
βββ models/ # Data models
βββ modules/ # Business logic modules
β βββ agent/ # Agent management
β βββ project/ # Project management
β βββ user/ # User management
β βββ x/ # Extended functionality
βββ routes/ # API route definitions
βββ server/ # Server configuration
βββ types/ # Type definitions
βββ main.go # Application entry point
βββ go.mod # Go module file
βββ go.sum # Go module checksums
βββ Dockerfile # Docker configuration
βββ air.toml # Air hot reload configuration
The application supports multiple configuration sources:
- Environment variables
- Configuration files
- Vault integration for secrets management
- Database: MongoDB, PostgreSQL, and Redis connections
- Kafka: Message broker configuration
- APM: Elastic APM monitoring setup
- JWT: Authentication secret keys
- HTTP: Server port and middleware settings
# Run all tests
go test ./...
# Run tests with coverage
go test -cover ./...
# Run specific module tests
go test ./modules/agent/...# Build production image
docker build -t rivalz-framework-be:latest .
# Run with environment variables
docker run -d \
-p 30000:30000 \
-e MONGODB_URI=mongodb://your-mongo:27017 \
-e POSTGRES_URI=postgres://user:pass@your-postgres:5432/db \
-e REDIS_URI=redis://your-redis:6379 \
rivalz-framework-be:latestapiVersion: apps/v1
kind: Deployment
metadata:
name: rivalz-framework-be
spec:
replicas: 3
selector:
matchLabels:
app: rivalz-framework-be
template:
metadata:
labels:
app: rivalz-framework-be
spec:
containers:
- name: rivalz-framework-be
image: rivalz-framework-be:latest
ports:
- containerPort: 30000
env:
- name: MONGODB_URI
valueFrom:
secretKeyRef:
name: db-secrets
key: mongodb-uri
- name: POSTGRES_URI
valueFrom:
secretKeyRef:
name: db-secrets
key: postgres-uriThe application integrates with Elastic APM for monitoring:
- Application performance metrics
- Request tracing
- Error tracking
- Database query monitoring
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
For support and questions:
- Create an issue in the GitHub repository
- Contact the development team
- Check the API documentation at
/swagger/
- v1.0.0: Initial release with core framework features
- Support for MongoDB, PostgreSQL, and Redis
- Kafka integration for event-driven architecture
- Elastic APM monitoring
- JWT authentication
- Swagger API documentation
Built with β€οΈ by the Rivalz Team