How abhishek6353/gitwicket works
GitWicket turns a submitted GitHub username into a rated cricket card and scouting report: the landing flow validates and routes the username, the player view fetches profile data, the API obtains and caches GitHub stats, and the rating engine derives attributes, role, and tier for presentation. Sharing, image endpoints, leaderboard, and analytics/counting are additional product capabilities. Relationships are limited to README statements and source-index references or shown calls; unsampled image and leaderboard internals are not inferred.
Main entry points: player-detail-view.tsx Scouting report view · route.ts Profile API · player-page-client.tsx Player data client · landing-hero.tsx Landing scout form
Components 22
Discovery and Entry
- Landing scout form
features/landing/components/landing-hero.tsx - Player detail route
app/players/[username]/page.tsx
Profile and Scoring
- Profile API
app/api/github/[username]/route.ts - GitHub profile service
services/github/profile.ts - Rating engine
features/rating-engine/engine.ts - Detail data builder
features/player-detail/lib/player-detail-data.ts
Player Experience
- Player data client
features/player-detail/components/player-page-client.tsx - Scouting report view
features/player-detail/components/player-detail-view.tsx - Cricket player card
features/cards/components/cricket-player-card.tsx - Attribute panel
features/player-detail/components/attributes-panel.tsx - Playstyle panel
features/player-detail/components/playstyles-panel.tsx - Report formatting
features/player-detail/lib/report-format.ts
Sharing and Images
- Card image endpoint
app/api/card/[username]/image/route.tsx - Social preview endpoint
app/api/og/[username]/route.tsx - Share and download actions
features/image-generation/components/share-actions.tsx - Card image renderer
features/image-generation/lib/card-image-response.tsx - OG image renderer
features/image-generation/lib/og-image-response.tsx
Persistence and Metrics
- Firestore
- Leaderboard page
app/leaderboard/page.tsx - Analytics events
lib/config/analytics.ts
Other components
- GitWicket visitor
- GitHub GraphQL API
Connections 23
- GitWicket visitor → Landing scout form: enters username
features/landing/components/landing-hero.tsx - Landing scout form → Player detail route: routes to
features/landing/components/landing-hero.tsx - Player detail route → Player data client: renders
app/players/[username]/page.tsx - Player data client → Profile API: fetches profile
features/player-detail/components/player-page-client.tsx - Profile API → GitHub profile service: requests profile
app/api/github/[username]/route.ts - GitHub profile service → GitHub GraphQL API: queries profile
- Profile API → Firestore: reads and writes
app/api/github/[username]/route.ts - Profile API → Rating engine: scores profile
app/api/github/[username]/route.ts - Player data client → Rating engine: scores fetched stats
features/player-detail/components/player-page-client.tsx - Player data client → Scouting report view: renders report
features/player-detail/components/player-page-client.tsx - Scouting report view → Cricket player card: renders card
features/player-detail/components/player-detail-view.tsx - Scouting report view → Attribute panel: renders attributes
features/player-detail/components/player-detail-view.tsx - Scouting report view → Playstyle panel: renders playstyles
features/player-detail/components/player-detail-view.tsx - Scouting report view → Report formatting: formats report
features/player-detail/components/player-detail-view.tsx - Player detail route → Detail data builder: loads detail data
app/players/[username]/page.tsx - GitWicket visitor → Share and download actions: uses sharing
README.md - Scouting report view → Share and download actions: shows actions
features/player-detail/components/player-detail-view.tsx - Card image endpoint → Card image renderer: creates image
app/api/card/[username]/image/route.tsx - Social preview endpoint → OG image renderer: renders preview
app/api/og/[username]/route.tsx - Landing scout form → Firestore: reads scout count
features/landing/components/landing-hero.tsx - Profile API → Leaderboard page: updates leaderboard data
app/api/github/[username]/route.ts - Landing scout form → Analytics events: logs search
features/landing/components/landing-hero.tsx - Player data client → Analytics events: logs card events
features/player-detail/components/player-page-client.tsx