High-Performance Chess Scraper
FIDE Analytics is a modern dashboard and API designed to scrap, parse, index, and visualize rating histories, rankings, and game statistics of chess players directly from the official FIDE website.
Core Features & Goals
- Live Scraper Engine: Directly parses FIDE player profiles, game records, and rating logs using Cheerio.
- Smart Cache Layer: Integrates database queries to store cached copies of scraper responses, bypassing heavy network loads on repeat visits.
- Win-Draw-Loss statistics: Aggregates total game stats grouped by White/Black and time formats (Standard, Rapid, Blitz).
- Rating History Progress Charts: Visualizes standard, rapid, and blitz ratings over historical periods inside interactive graphs.
Technology Stack
- Framework: Next.js 16 (App Router) for high-performance React server components and dynamic API route handlers.
- Database Adapter: Prisma ORM for type-safe database querying and schema synchronization.
- HTML Scraping: Cheerio library for robust document object model traversal and reliable content extraction.
- Language: TypeScript 5 for type-safe schema integrity across the codebase.
Cloud Infrastructure
- Hosting & Runtime: Cloudflare Pages running in a modern Edge worker environment via
workerdand OpenNext. - Database State: Cloudflare D1 SQL database storing player records, charts, game profiles, and category top lists.
- Request Routing: Request-scoped database connections that connect to the local Wrangler state during development.
Developer Resources & Source
We provide clean, public REST API routes for lists, profiles, statistics, and history. Check our developer tools or explore the source code.
This system runs database migrations on cloud D1 tables on each push, ensuring schema synchronization and data persistency.