How kpdata-sci/pokeplan works
Pokeplan is a Pokémon API data-engineering project: it lands a static API snapshot, models it in Postgres, tests and serves the results, then exposes them through a dashboard. It also provides an API reference and domain notes, plus an unapplied AWS/Terraform design. The README documents the main pipeline sequence; sampled source confirms the dashboard and reference-generation behavior. AWS details beyond the sampled event publisher are represented at subsystem level because implementation wiring was not inspected.
Main entry points: run_pipeline.sh Pipeline runner · handler.py Commit checker · build_dashboard.py Dashboard builder · 05_load.sql Mart loader
Components 26
Ingestion
- Pipeline runner
pipeline/run_pipeline.sh - CSV lander
schema/tools/dump_to_csv.py
Postgres warehouse
- Raw landing
schema/01_raw.sql - Reference data
schema/02_reference.sql - Staging views
schema/03_staging.sql - Facts and dimensions
schema/04_marts.sql - Mart loader
schema/05_load.sql - Data tests
schema/06_tests.sql - Serving views
schema/08_serve.sql
Data products
- Dashboard export query
dashboard/export_dashboard.sql - Dashboard builder
dashboard/build_dashboard.py - Pokédex dashboard
dashboard/dashboard_template.html - API reference catalog
reference/build_reference.py - Reference page
reference/build_page.py - Pokémon domain notes
domain/pokemon_domain_notes.md - Schema design page
schema/design_page/build_schema_page.py
AWS design
- Commit checker
architecture/terraform/lambdas/check_commit/handler.py - Event bus
architecture/terraform/modules/events - AWS data stack
architecture/terraform - Network
architecture/terraform/modules/network - Storage
architecture/terraform/modules/storage - Compute
architecture/terraform/modules/compute - Governance
architecture/terraform/modules/governance
Other components
- Static API data
- EventBridge Scheduler
- GitHub API
Connections 15
- Pipeline runner → Static API data: clones endpoints
README.md - Pipeline runner → Raw landing: lands responses
README.md - CSV lander → Raw landing: formats raw rows
schema/tools/dump_to_csv.py - Pipeline runner → Mart loader: calls load
README.md - Mart loader → Facts and dimensions: builds marts
README.md - Pipeline runner → Data tests: runs tests
README.md - Pipeline runner → Serving views: creates views
README.md - Pipeline runner → Dashboard export query: exports data
README.md - Dashboard builder → Dashboard export query: reads export
dashboard/build_dashboard.py - Dashboard builder → Pokédex dashboard: fills template
dashboard/build_dashboard.py - API reference catalog → Reference page: provides catalog
reference/build_page.py - Reference page → Pokémon domain notes: loads notes
reference/build_page.py - EventBridge Scheduler → Commit checker: invokes nightly
architecture/terraform/lambdas/check_commit/handler.py - Commit checker → GitHub API: fetches commit
architecture/terraform/lambdas/check_commit/handler.py - Commit checker → Event bus: publishes event
architecture/terraform/lambdas/check_commit/handler.py