How gaesty/pokedex works
Project type and purpose
• This is a .NET 9 Web API (“PokeDex API”) built with ASP.NET Core and Entity Framework Core.
• It exposes REST endpoints for Pokémon data (abilities, species, moves, types, teams, media, weather) and authentication (JWT).
• It uses a PostgreSQL database for persistence, calls two external services (PokeAPI and a Weather API), and is containerized via Docker and Docker Compose.
• It emits Prometheus-style metrics (via prometheus-net) and is monitored by a Prometheus + Grafana stack.
File structure
• Top-level solution file (PokeDex.sln), Docker assets (Dockerfile, docker-compose.yml, docker_resources folder), Prometheus config, Postman test run, SQL scripts.
• Inside BourgPalette/:
• Controllers/ – REST controllers by domain
• Services/ – business-logic services (WeatherService, CachedWeatherService, PokeApiImporter, ITokenService)
• Data/ – EF Core DbContext, migrations, DbSeeder
• Middleware/ – global error handler
• Program.cs – pipeline setup (middleware, DI, health/metrics endpoints)
• appsettings.json – configuration (including JWT secret, connection strings)
• Monitoring and metrics code under metrics/metrics.cs.
Key architectural insights from README
• The system is deployed as three Docker containers:
1) the API
2) PostgreSQL
3) the Prometheus + Grafana monitoring stack (defined in docker-compose).
• Prometheus scrapes /metrics on the API; Grafana reads from Prometheus.
• External integrations: PokeAPI and Weather API over HTTP.
• Authentication is JWT-based.
• EF Core handles migrations and seeding at startup.
Detail level
• Middleware pipeline explicitly.
• Don’t shy away from showing both migrations and DbSeeder in the data layer.