{"id":30799063,"url":"https://github.com/titansolve/django-pokedex","last_synced_at":"2026-05-03T15:35:17.019Z","repository":{"id":312208196,"uuid":"1046687880","full_name":"TitanSolve/django-pokedex","owner":"TitanSolve","description":"Django Pokedex with animated UI and robust APIs. Features: name search, type \u0026 ability filters, Pokémon details with evolution chains, side-by-side comparison, average team stats, and defensive coverage analysis (PokeAPI).","archived":false,"fork":false,"pushed_at":"2025-08-29T04:38:29.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-29T08:32:54.912Z","etag":null,"topics":["api","bootstrap","django","docker","pokeapi","pokedex","python","webapp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TitanSolve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-29T04:26:53.000Z","updated_at":"2025-08-29T04:41:05.000Z","dependencies_parsed_at":"2025-08-29T08:43:02.845Z","dependency_job_id":null,"html_url":"https://github.com/TitanSolve/django-pokedex","commit_stats":null,"previous_names":["titansolve/django-pokedex"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/TitanSolve/django-pokedex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TitanSolve%2Fdjango-pokedex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TitanSolve%2Fdjango-pokedex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TitanSolve%2Fdjango-pokedex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TitanSolve%2Fdjango-pokedex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TitanSolve","download_url":"https://codeload.github.com/TitanSolve/django-pokedex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TitanSolve%2Fdjango-pokedex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273805658,"owners_count":25171560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bootstrap","django","docker","pokeapi","pokedex","python","webapp"],"created_at":"2025-09-05T19:03:34.864Z","updated_at":"2026-05-03T15:35:16.983Z","avatar_url":"https://github.com/TitanSolve.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Django Pokedex — Amazing Edition\n\nA modern, fully client-friendly Pokedex built with **Django 4.2** and **PokeAPI**.  \nIt ships with a sleek animated background, high-contrast buttons, and robust APIs. You can search Pokémon, filter by **type** or **ability** (dropdown), inspect details with **evolution chains**, **compare** any two Pokémon, compute **average stats** for a team, and analyze **defensive coverage**.\n\n---\n\n## ✨ Features\n\n- **List \u0026 search** Pokémon (name search, pagination)\n- **Filter by Type** and **Ability** (server-populated ability dropdown)\n- **Detail page** with base stats and **Evolution chain** links\n- **Compare** any two Pokémon (from a dedicated page or a *Compare with…* field on the detail page)\n- **Average Stats** for up to 6 Pokémon (UI + API)\n- **Team Coverage Analyzer** (defensive weaknesses/resistances by attack type) (UI + API)\n- **Graceful API error handling** — user-friendly messages; JSON errors like `{ \"error\": \"...\", \"hint\": \"...\" }`\n- **Stable image field** in API payloads (always includes an `image` URL)\n- **CORS enabled** for easy testing with other frontends\n- **Animated, responsive UI** (neon gradient + glassmorphism), optimized button contrast\n\n---\n\n## 🧱 Project Structure (high level)\n\n```\npokedex_project/           # Django project\npokedex/                   # App\n  ├─ services.py           # All PokeAPI calls + caching + helpers\n  ├─ api.py                # JSON API endpoints\n  ├─ views.py              # Server-rendered pages\n  ├─ templatetags/\n  │   └─ poke_extras.py    # Template helpers (e.g., sprite_url)\ntemplates/\n  └─ pokedex/              # Pages: list, detail, compare, average, coverage\nstatic/pokedex/            # CSS (animated background, buttons)\nDockerfile                 # Production container\ndocker-compose.yml         # Local dev container\nrequirements.txt\n```\n\n---\n\n## 🚀 Quick Start (Local)\n\n\u003e Requires Python 3.11+ (3.12 recommended)\n\n```bash\n# 1) Setup virtual env\npython -m venv .venv\n\n# 2) Activate it\n# Linux/macOS\nsource .venv/bin/activate\n# Windows PowerShell\n# .venv\\\\Scripts\\\\Activate.ps1\n\n# 3) Install deps\npip install -r requirements.txt\n\n# 4) Migrate (SQLite, no models to migrate but keeps Django happy)\npython manage.py migrate\n\n# 5) Run\npython manage.py runserver\n```\n\nOpen: **http://127.0.0.1:8000/pokemon/**\n\n---\n\n## 🐳 Run with Docker\n\n```bash\n# Build \u0026 run with docker compose\ndocker compose up --build\n# App will be available at http://127.0.0.1:8000\n```\n\n**Dockerfile** runs via `gunicorn` and serves static files with **whitenoise**.\n\n---\n\n## 🔧 Configuration (env vars)\n\n| Variable            | Default                      | Purpose                              |\n|--------------------|------------------------------|--------------------------------------|\n| `DEBUG`            | `1`                          | Django debug mode                    |\n| `ALLOWED_HOSTS`    | `*`                          | Comma-separated hostnames            |\n| `PAGE_SIZE`        | `24`                         | Cards per page                       |\n| `CACHE_TTL`        | `3600`                       | PokeAPI response cache (seconds)     |\n| `POKEAPI_BASE_URL` | `https://pokeapi.co/api/v2`  | Override PokeAPI (if self-hosting)   |\n\nWith Docker Compose, you can add these under `services.web.environment`.\n\n---\n\n## 🔗 API Endpoints\n\n- `GET /api/pokemon/?q=\u0026type=\u0026ability=\u0026page=\u0026page_size=`  \n  → `{ count, results:[{ id, name, image, types[], height, weight, stats{} }] }`\n- `GET /api/pokemon/\u003cid|name\u003e/`  \n  → `{ pokemon(card + abilities[]), species(flavor_text), evolution(names[]) }`\n- `GET /api/compare/?a=\u0026b=`  \n  → Compare two Pokémon, returns `{ a: card, b: card }`\n- `GET /api/types/` — PokeAPI passthrough\n- `GET /api/abilities/` — All ability names for dropdowns\n- `GET /api/evolution/\u003cid|name\u003e/` — Evolution names[]\n- `GET /api/coverage/?team=a,b,c` — Defensive coverage summary\n- `GET /api/average/?team=a,b,c` — Average base stats across team\n\nAll APIs return JSON errors with helpful hints on failures.\n\n---\n\n## 🖥️ UI Pages\n\n- **/pokemon/** — grid with search, **Type** dropdown, **Ability** dropdown, pagination\n- **/pokemon/name/** — details, base stats, evolution chips, *Compare with…* form\n- **/compare/** — compare any two Pokémon (`?a=pikachu\u0026b=gengar`)\n- **/average/** — average stats for a list (`?team=pikachu,bulbasaur,charizard`)\n- **/coverage/** — defensive coverage analysis for a list\n\n---\n\n## 🎨 Design Choices \u0026 Highlights\n\n- **Animated Background** — CSS keyframes for a shifting neon gradient + floating orbs for depth. No heavy JS; GPU-friendly effects.\n- **Glassmorphism Cards** — subtle blur + soft shadows to focus content, improve readability over the gradient.\n- **Accessible Contrast** — high-contrast primary buttons and outlines tuned for the dark background.\n- **Template Safety** — custom `sprite_url` templatetag to safely access `official-artwork` images (hyphenated keys).\n- **Resilience** — all API requests wrapped with caching and helpful error messages; UI never hard-fails on upstream hiccups.\n- **Discoverability** — detail pages link evolution stages; compare can be initiated from detail or direct URL.\n\n---\n\n## 🧪 Troubleshooting\n\n- **Images not loading?** Check your network or PokeAPI availability. The app falls back to basic sprites if official artwork is missing.\n- **Compare form errors?** Ensure you’re on `/compare/` and that both names are valid PokeAPI species names (lowercase).\n- **CORS testing with another frontend?** Enabled by default via `django-cors-headers` (dev-friendly).\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitansolve%2Fdjango-pokedex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftitansolve%2Fdjango-pokedex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitansolve%2Fdjango-pokedex/lists"}