A Go & Fiber backend application for managing Pokémon and their battles, suitable for educational projects or small game APIs.
- Pokémon Management
- Fetch Pokémon data and store it in PostgreSQL
- Search for Pokémon and fetch from an external API if not found
- Pokémon Battles
- Store battle results in the database
- Battle winner calculation algorithm:
score = HP + (Attack - OpponentDefense) + Speed
- Logging & Monitoring
- JSON-formatted logs for production use in external tools
- Expose API metrics for monitoring with Grafana at
/metrics - Use APM to monitor listeners and endpoints
- Programming Language: Go
- Web Framework: Fiber
- ORM: GORM
- Database: PostgreSQL
- Monitoring & Metrics: Prometheus + Grafana
- APM: Any Go-compatible APM tool
-
git clone https://github.com/rezsbt/pokemon-battle cd pokemon-battle-api docker compose --env-file .env.local up -- build