Back to Projects

Brian Claudman

Fantasy Baseball Analytics Platform

A data-driven fantasy baseball management tool for a 10-team ESPN points league. Integrates ESPN's hidden fantasy APIs with MLB Stats API data to deliver predictive scoring, trade valuation, and AI-powered roster analysis — turning guesswork into informed decisions.

Next.js 16 Supabase Claude AI ESPN API MLB Stats API Tailwind CSS 4 TypeScript
Brian Claudman Fantasy Baseball Analytics Interface

Project Overview

Brian Claudman is a full-stack analytics platform built for competitive fantasy baseball. The core innovation is the Daily Context Score (DCS) — a predictive engine that calculates expected fantasy points for every rostered player by blending season stats, platoon splits, opposing pitcher quality, venue factors, and real-time weather data.

The architecture uses a dual-fetch strategy to work around ESPN's Akamai CDN blocking: Supabase Edge Functions handle public MLB data while Next.js API routes handle ESPN requests that require TLS-compatible auth cookies. A typed client library unifies both backends with SWR for intelligent caching.

Claude AI powers several analysis features including waiver wire recommendations, roster news impact summaries, and weekly DCS accuracy reports that identify model weaknesses and suggest formula adjustments — creating a self-improving prediction feedback loop.

Key Features

Advanced analytics tools designed for competitive fantasy baseball

Daily Context Score

A multi-factor predictive engine that calculates expected fantasy points per player. Blends season stats with 30-day rolling averages, platoon splits, opposing pitcher ERA+, career head-to-head matchups, park factors, and weather risk into a single actionable score.

Claude AI Analysis

AI-powered features including ranked waiver wire recommendations with priority levels, roster news filtered to your players with fantasy impact summaries, and weekly DCS accuracy reports that identify formula weaknesses for continuous improvement.

Trade Central

Composite trade value scoring (0–100) weighing performance, salary surplus, cheap keeper years, and positional scarcity. Includes a trade package builder with value delta calculator and positional need analysis across all league teams.

Player Deep Dive

Detailed player pages with splits (vs LHP/RHP, home/away), head-to-head vs specific pitchers, 30-game logs with rolling averages, Statcast metrics (exit velocity, barrel rate), and pitch arsenal breakdowns with usage and velocity data.

Weather & Schedule

Real-time game schedule with probable pitchers, Open-Meteo weather forecasts, and rainout risk assessment. Weather data feeds directly into DCS predictions, adjusting expected playing time based on precipitation probability.

DCS Accuracy Tracking

All predictions are logged with actual results reconciled post-game. A dedicated dashboard visualizes prediction accuracy over time, and weekly Claude-generated reports analyze factor contributions and recommend formula adjustments.

Technology Deep Dive

The tools and libraries that power Brian Claudman

Frontend

Next.js 16 (App Router)

Server components, API routes, and ISR for dashboard pages

Recharts + shadcn/ui

Performance visualizations and a polished component library built on Radix UI

SWR

Intelligent client-side caching with configurable revalidation intervals per data type

Backend & Data

Supabase (Postgres + Edge Functions)

Player ID cache, splits cache with 6-hour TTL, DCS prediction logs, and Deno edge functions for MLB data

ESPN Fantasy API + MLB Stats API

Dual-fetch architecture: Next.js routes for ESPN auth cookies, edge functions for public MLB data

Open-Meteo

Weather forecasting for game-day precipitation risk and rainout probability

AI & Developer Experience

Claude AI (Anthropic SDK)

Waiver recommendations, roster news summaries, and weekly DCS accuracy analysis with formula suggestions

TypeScript

End-to-end type safety from Supabase edge functions through API routes to React components

Vitest + Playwright

Unit and end-to-end testing with mocked API responses and coverage reporting

Interested in Learning More?

Feel free to reach out if you'd like to discuss the predictive scoring algorithm, multi-API architecture, or AI integration behind Brian Claudman.