A Go-based API for randomly selecting Valorant maps with customizable bans and preferences.
- ✅ Random map selection from Valorant's official map pool
- ✅ Map banning/exclusion support
- ✅ RESTful API with Swagger documentation
- ✅ Structured logging and request tracing
- ✅ Configuration via environment variables or YAML file
- ✅ Graceful shutdown and error handling
- ✅ Health check and monitoring endpoints
- Go 1.19 or higher
- Make (optional, for using the Makefile)
- Clone the repository:
git clone https://github.com/jungtechou/valomap.git
cd valomap
- Install dependencies:
go mod download
- Run the application:
go run backend/cmd/main.go
Configuration can be provided in several ways:
- Environment variables (prefixed with
VALOMAP_
) - Configuration file (
config.yaml
) - Command line flags (if implemented)
Example configuration:
server:
port: 3000
read_timeout: 10s
write_timeout: 10s
shutdown_timeout: 5s
logging:
level: info
format: text
report_caller: false
GET /api/v1/map/roulette
Returns a randomly selected map from the Valorant map pool.
GET /api/v1/health
Provides system health information.
Swagger documentation is available at:
GET /swagger/index.html
├── backend/
│ ├── api/ # API layer (handlers, router, engine)
│ ├── cmd/ # Application entrypoints
│ ├── config/ # Configuration management
│ ├── di/ # Dependency injection
│ ├── domain/ # Domain models
│ ├── docs/ # API documentation
│ ├── pkg/ # Reusable packages
│ └── service/ # Business logic
├── frontend/ # (To be implemented)
- Gin - Web framework
- Wire - Dependency injection
- Logrus - Structured logging
- Viper - Configuration management
If you modify the dependency injection setup, regenerate the wire_gen.go file:
go generate ./backend/di
This project is licensed under the MIT License - see the LICENSE file for details.