How tayfundo/ranksf2ce works
Round One is a mobile-friendly Street Fighter II Champion Edition ranking lookup. A visitor opens the search page, loads rankings, searches player nicknames, and views a selected player’s rank, tier, Fightcade rank, match count, playtime, and country. The page prefers the rankings API and falls back to bundled ranking data; it also displays a visit counter. Separate server routes expose search logging and counter operations. The excerpts show the rankings API reading Cloudflare KV and the logging route using GitHub Gists; unsampled wiring is omitted.
Main entry points: PlayerSearch.tsx Player search · index.tsx Home route · rankings.ts Rankings API · visit-counter.ts Visit counter API
Components 11
Search experience
- App router
src/router.tsx - Home route
src/routes/index.tsx - Player search
src/components/PlayerSearch.tsx
Ranking data
- Rankings KV
- Fallback rankings
public/data/sf2ce-rankings.json
Server routes
- Rankings API
src/routes/api/rankings.ts - Visit counter API
src/routes/api/visit-counter.ts - Search log API
src/routes/api/log-search.ts
Telemetry storage
- Counter KV
- GitHub Gist
Other components
- Visitor
Connections 9
- Visitor → Home route: opens
README.md - Home route → Player search: renders
src/routes/index.tsx - Player search → Rankings API: fetches rankings
src/components/PlayerSearch.tsx - Player search → Fallback rankings: loads on failure
src/components/PlayerSearch.tsx - Rankings API → Rankings KV: reads
src/routes/api/rankings.ts - Player search → Visit counter API: requests count
src/components/PlayerSearch.tsx - Visit counter API → Counter KV: reads and updates
src/routes/api/visit-counter.ts - Visitor → Search log API: submits search log
- Search log API → GitHub Gist: reads and writes
src/routes/api/log-search.ts