Inspiration

The idea for ShadeFinder came from a pretty miserable experience at a baseball game with my wife and our 6-month-old baby. We were so excited for our first game as a family. While we had a great time, we ended up sitting in blazing heat for the entire game. I kept trying to shield our baby from the sun while my wife and I took turns holding a little electric fan that was just blowing the hot air around. The game was great, but we were absolutely roasting.

Walking back to the car, sweaty and exhausted, I couldn't stop thinking: "There has to be a better way to figure out where the shade will be." I knew I could solve this problem. Why should families like mine have to suffer through games in the sun when we could predict exactly where shade will be throughout any MLB game?

That's when I realized this wasn't just about my family. It's about every parent with young kids, every elderly fan, and honestly, anyone who just wants to enjoy baseball without getting cooked by the sun.

What it does

ShadeFinder is the solution I built to that problem - a web app that helps baseball fans find the perfect shaded seats for any MLB game. It's super simple to use: pick your game date, choose your game, and boom...you can see exactly where the shade will be throughout the entire game.

Here's what makes it special:

  • Easy Date Picking: Just click on a calendar to see what games are coming up
  • Real Game Data: I pull actual MLB schedules so you're always seeing real games
  • Smart Shade Math: The app does some pretty complex calculations to figure out exactly where the sun will be and what that means for each section
  • Weather Smarts: It even checks the weather...cloudy days mean more shade everywhere!
  • Mobile Friendly: Because let's be honest, you're probably planning this while you're out and about

How we built it

Frontend Stack:

  • Next.js 15 with App Router for server-side rendering and optimal performance
  • TypeScript for type safety and better developer experience
  • Tailwind CSS for responsive, utility-first styling
  • Radix UI + shadcn/ui for accessible, customizable components

Backend & Database:

  • Prisma ORM with PostgreSQL for robust data management
  • Server Actions for seamless client-server communication
  • Vercel for deployment and hosting

Core Algorithms:

  • Custom Solar Position Calculations: Implemented astronomical algorithms to calculate precise sun position based on date, time, and geographic coordinates
  • Stadium Orientation Mapping: Each stadium's unique orientation and architectural features are factored into shade calculations
  • Weather API Integration: Real-time weather data from OpenMeteo API for cloud cover and temperature
  • Automated Cron Jobs: Background processes that pre-calculate shade data for upcoming games

Data Sources:

  • MLB API: Official game schedules and stadium information
  • OpenMeteo Weather API: Hourly weather forecasts and historical data
  • Custom Stadium Database: Detailed section mappings and architectural data for MLB stadiums

Challenges I ran into

Every Stadium is a Snowflake: I naively thought "a stadium is a stadium," but boy was I wrong. Each one faces a different direction, has different architectural quirks, and unique section layouts. Mapping all 30 MLB stadiums accurately was like solving 30 different puzzles.

Time Zones Are Evil: Managing game times across different time zones while keeping the sun calculations accurate nearly drove me insane. Turns out 7 PM in New York is not the same sun position as 7 PM in Los Angeles. Who knew?

Making It Fast: Pre-calculating shade data for thousands of sections across multiple games without melting my database required some serious optimization. I learned a lot about efficient database queries the hard way.

Accomplishments that we're proud of

It Actually Works: I'm genuinely proud that the shade predictions are accurate. The astronomy math was brutal, but now the app can tell you where the sun will be within a few degrees of reality.

All 30 Stadiums: I mapped every MLB stadium with their unique quirks - roofs, overhangs, weird architectural features that affect shade. It was tedious but worth it.

Simple Despite the Complexity: Even though there's crazy math happening behind the scenes, using the app feels as easy as booking a movie ticket. That was really important to me after my frustrating ballpark experience.

Weather That Actually Matters: The app checks real weather and adjusts predictions accordingly. Cloudy day? More shade for everyone!

Phone-Friendly: Since I know people plan outings on their phones, I made sure it works great on mobile. No pinching and zooming required.

What we learned

Sports Data is Messy: Working with real MLB data taught me that the real world doesn't follow neat patterns. Games get postponed, schedules change, and APIs sometimes just...don't work. Building resilience into the system was crucial.

Simple UI, Complex Backend: The biggest lesson was that all the fancy math means nothing if people can't figure out how to use your app. I spent as much time on the user experience as I did on the calculations.

Weather is Complicated: I gained a new appreciation for meteorologists. Integrating weather data taught me how much atmospheric conditions affect outdoor experiences in ways I never considered.

Database Performance is an Art: Optimizing queries for time-series data with complex relationships was like solving a puzzle. Every index and query structure mattered.

What's next for ShadeFinder

Beyond Baseball: The same technology could work for NFL games, soccer matches, outdoor concerts. Basically anywhere people sit outside and don't want to get roasted by the sun.

Advanced Features:

  • Seat-Level Precision: Provide shade predictions down to individual seat numbers rather than just sections
  • Price Integration: Partner with ticketing platforms to highlight shaded seats and their premium value

Native Mobile Apps: Push notifications for "Hey, that section you're looking at will be in full sun by the 7th inning" would be pretty cool.

Team Partnerships: My dream is to work with MLB teams to integrate this directly into their ticketing sites. Imagine seeing shade predictions right when you're buying tickets!

Go Global: Baseball isn't just American. There are leagues worldwide that could benefit from this.

ShadeFinder started from a simple frustration of sitting in the blazing sun with my baby and turned into something that could help millions of families enjoy baseball more comfortably. Sometimes the best solutions come from the most personal problems!

Built With

  • apis
  • bolt
  • nextjs
  • prisma
  • supabase
  • tailwindcss
  • vercel
Share this project:

Updates