5 min read

Building a Top 14 Rugby iCal Feed

I’ve been following Top 14 Rugby for a while now, and one thing that’s always been a bit of a pain is keeping track of fixtures. While there are plenty of sources for match schedules, they don’t always make it easy to add matches to your calendar.

For years I’ve been using this public Google calendar to track World Cup, 6 Nations and other international matches. I wanted to do something similar for Top14 and put it somewhere for others to use too.

How to Get the Feed

The Top 14 Rugby iCal feed is now available at therugbyfixture.com. You can subscribe to it in any calendar application that supports iCal feeds (Google Calendar, Apple Calendar, Outlook, etc.). The feed automatically updates when match times change, so you’ll always have the most current schedule.

Top 14 Rugby fixtures displayed in Google Calendar

Above: A screenshot of the Top 14 Rugby fixtures displayed in Google Calendar’s schedule view. The feed automatically updates when match times change or new matches are announced.

Finding the Right Data Source

My initial approach was to scrape the BBC Sport website for fixtures. While this worked well for personal use, sharing the data publicly required a legitimate source. That’s when I discovered TheSportsDB, which offers both free and paid APIs for sports fixtures across multiple sports. Their pro plan was an easy decision. The pricing is fair, and I now had a reliable, approved source of data.

The Architecture

The system is built around three AWS Lambda functions, each with a specific role:

  1. Fetch Lambda

    • Retrieves JSON data from TheSportsDB for the three most recent Top 14 fixtures
    • Stores the raw data in S3
  2. Parse Lambda

    • Triggered by new or updated S3 objects
    • Processes the JSON data, extracting only the necessary information for the iCal feed
    • Applies required transformations
    • This separation will prove valuable as I expand to cover more competitions (Premiership, URC, and Champions Cup are planned)
  3. Build Lambda

    • Activated by changes to the parsed JSON files in S3
    • Generates the final iCal feed
    • Stores the result back in S3

Infrastructure

The stack is intentionally simple:

  • S3 for data storage
  • Cloudflare in front of S3 for caching and usage tracking
  • AWS Lambda for serverless compute

This architecture keeps costs extremely low while maintaining reliability. While I might introduce a database for storing parsed data as the platform grows, the current approach has been refreshingly straightforward.

Building with Cursor

This project gave me the perfect opportunity to try out Cursor, an AI-powered code editor that many of my friends and colleagues have been raving about. While it hasn’t been approved for use at work yet, this personal project was the ideal testing ground.

The initial setup was remarkably fast, I had a working prototype running locally within 30 minutes. Cursor was particularly helpful when it came to scaffolding the infrastructure code and deploying the Lambda functions. The time savings were significant, especially in the early stages of development.

The more challenging parts came during the refactoring phase, particularly when switching from the BBC scraping approach to the more robust TheSportsDB integration. While Cursor helped with the boilerplate, some of the more nuanced changes required a mix of AI assistance and traditional coding. And yes, I had to write some code manually, imagine that!

As many developers have discovered, Cursor excels at handling the “crud” work, the repetitive, boilerplate tasks that we all know how to do but would rather not spend time on. It’s still crucial to understand what you’re building and why, but the time savings in the initial development phase are substantial.

I’m excited to see how tools like Cursor (and AI development in general) continue to evolve. For now, I’m reassured that human engineers still have a vital role to play in the development process. After all, someone needs to know what to ask the AI to build!

What next?

The Top 14 Rugby iCal feed is working well for me, and I’m hoping others will stumble across it and get use out of it too. If you do end up using it, please send me a message, and if there are any fixtures you’d like to track and can’t find online, reach out and I may be able to add them to therugbyfixture.com.

In the next few months I hope to add some additional tournaments as separate iCal feeds, and update the site to show a live example of the fixtures. With more fixtures and data on the site hopefully the site will do better in search results too!