Building a Sports Calendar Service
TLDR: Try it out here: https://sport.tesiptv.com/
Building a sports calendar service has been a fun project.
Leveraging the latest Angular framework, S3 + Cloudfront for hosting, and a single NestJS Lambda function for processing calendar subscriptions, this has turned into a robust and ridiculously cost-effective solution (less than €1 hosting charges - could become €5 with 10,000s of users).
Additionally, I utilized AI tools to assist in various aspects of the development process, enhancing efficiency and accuracy. Even the logo was generated with AI. This post will provide an overview of the process and highlight some unique features of the service.
The Architecture
The core of the service is built on several key technologies:
Angular
Angular provides a powerful framework for building dynamic, single-page applications. Its strengths include:
- Component-based architecture
- Reactive forms and state management
- Comprehensive CLI for scaffolding and building projects
- Strong community support and extensive documentation
- AI helped me to use the full features of Angular and its ecosystem better than with my own knowledge and learning process alone.
Screenshots
AWS S3 + Cloudfront
For hosting, I chose AWS S3 and Cloudfront, which offer:
- Scalable and secure storage
- Fast content delivery with low latency
- Cost-effective pricing
- Easy integration with other AWS services
- AI made it absurdly easy to generate CI/CD pipelines for the Angular app and the NestJS lambda that auto-deployed changes to Amazon:
- Zipping and uploading projects to S3
- Creating invalidations
- Updating CORS HTTP response headers and associated SHA hashes for my static assets
NestJS Lambda Functions
To handle calendar subscriptions, I use NestJS Lambda functions. This setup provides:
- Serverless architecture for scalability
- Efficient processing of calendar data
- Integration with AWS services
- Minimal operational costs
- AI assisted in designing an optimized NestJS Lambda architecture
- Automated deployment pipelines using GitLab CI/CD were created for Lambda functions with AI guidance
- AI helped refactor the NestJS service for Lambda compatibility & creating a minimal package that works great as a lambda (approx 1 sec cold start - and this never blocks UX)
- Intelligent suggestions were provided for API Gateway configuration updates - something I had never done ‘hands-on’ before
- AI-powered code analysis ensured smooth integration between NestJS and AWS Lambda, including suggesting libraries that sped up development
Unique Features
One unique aspect of the service is the use of static JSON files on S3 instead of a traditional API to serve fixtures. This approach offers several benefits:
- Cost Efficiency: The entire service costs about a euro to run.
- Simplicity: Static files reduce complexity and potential points of failure.
- Performance: Serving static files from S3 + Cloudfront ensures fast and reliable access.
- PWA: This service is a Progressive Web App (PWA) and works great when added to your desktop dock or homescreen.
- No Signup Needed: No signup is required to use this service.
Contact me if you want to know more about the details of this project.
Try it out here: https://sport.tesiptv.com/