Add demo seed data and API fallback for portfolio mode#27
Merged
Conversation
The Activision stats API was shut down in April 2024. This adds: - SQL seed script with 5 demo players at varied skill levels (125 matches) - DB fallback in PlayerService when the CoD API is unavailable - Dismissible "Demo Mode" banner in the frontend - Demo Players section on HomeView with clickable sample players Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
migrations/seed.sql): 5 demo players at varied skill levels (Elite→Casual), full lifetime stats with mode breakdowns, and 125 matches with realistic placements/K-D/gulag resultsinternal/service/player.go):SearchPlayerandGetPlayerStatsnow fall back to the database when the CoD API is unavailable, serving seeded data transparentlyweb/src/App.vue): Dismissible warning alert explaining data is generated (persists per session via sessionStorage)web/src/views/HomeView.vue): Clickable buttons on the home page for all 5 demo players so visitors know what to searchContext
The Activision stats API (
papi-client) was fully shut down in April 2024. This change converts the app into a portfolio-ready demo that showcases the full stack without requiring a live API.Test plan
psql $DATABASE_URL -f migrations/seed.sqlto seed the databasego build ./...andgo vet ./...passcd web && npm run build-only && npm run type-checkpass🤖 Generated with Claude Code