blackmichael / f1-pickem Goto Github PK
View Code? Open in Web Editor NEWA website for making Formula 1 picks with your friends. Free to sign up, available to everyone.
Home Page: https://www.f1pickem.com
A website for making Formula 1 picks with your friends. Free to sign up, available to everyone.
Home Page: https://www.f1pickem.com
When a user loads the picks page, the frontend should attempt to get that user's picks for the league/race. If the picks exist, order the top 10 driver cards using the picks. If they don't, randomize the driver cards.
Frontend also needs to implement a "submit picks" button that will submit the picks. Ideally we'd have the user information implicitly passed along by cognito/auth handlers, but since that's not a thing we need to do a hack. Provide a text box for the user's email address. That email address will get mapped to a user ID on the backend, and unrecognized emails will be rejected.
The Ergast API has been a great API for fetching Formula 1 data that is also free of charge, but one of the downsides to it is the lag between the race ending and the results being published. This removes some of the potential instant gratification that happens when the race ends, and is confusing when it takes potentially hours for results to render.
Explore different APIs/options for Formula 1 results. Premium options are potentially acceptable. Web scraping could be a feasible option.
CloudFormation is fine but the lack of comprehensive documentation makes it very difficult to learn and do new things with, hampering any sort of infrastructure development efforts. Terraform is better for these reasons, and there's appeal behind the popularity across the industry with it.
Replace the existing CF files with Terraform files (perhaps an /infra
folder would be good here), achieving "infrastructure parity" with what currently exists. There are more AWS resources that are not currently captured by CF, but migrating what currently exists now will make it easier to port those existing "untracked" resources over
We need a lambda to invoke for getting race results. The most straightforward way of uniquely identifying a race seems to be by date. The only source I'm aware of is the F1 website. Maybe there's an API?
This lambda will eventually be used by another lambda to get the race results and save them into Dynamo
A race date in YYYYMMDD
format
JSON with the race name and the results of all drivers
Lambda is deployed to AWS
User auth is a lot of work. Gather emails, map them to static user IDs, reject unknown emails.
Right now it is impossible to determine who has submitted picks until the race is over and results are in. Modify the results view so that users who have submitted picks have an icon indicating so
Fetch pending race results from the backend (the race results endpoint is probably good to modify for this), change the rendering logic to indicate pending results
If a user has submitted picks for a race then load those picks into the driver order
When fetching race data from the backend check for picks submitted. If they exist, use that order
It would be convenient if there were race reminders sent out (via Email) to remind people to submit picks after qualifying and before race start. But CRM is potentially expensive, so this may not be feasible.
Explore options.
Data must be updated to ensure that the latest season and drivers set is being used. This process should be automated to ensure that there is no maintenance necessary
Create facades, if they don't already exist, for fetching the drivers list and the season schedule. Each facade should check the DB for data and return it if available. If not available, it should request the data from the Ergast API and persist it in the db. We may want to use a TTL of 1 week on the race data to inform refreshes (mid-season changes to drivers/races)
Add meta tags and related functionality so that URL previews provide meaningful content
Not sure
As of now, picks can be modified after the race has started. This is fine for people playing in good faith, but it would be ideal if picks were locked after the race start time.
Modify the frontend to "lock" the race picks page after the start time.
Modify the backend to reject picks submitted after race start time
Most people will use this website on their phone, so it's important to make the UI responsive for smaller screens.
As it stands now, linking to a specific race brings you to the picks page (the default page). It would be nice if you could link directly to the results tab. Add support for URL fragments so that we can do so
do the thing
When pulling up a race to submit picks, the default order should be the qualifying order (if available).
When hitting the backend for race data, check the db for qualifying results and use them if they exist. If they don't exist, attempt to fetch them from the Ergast API and update the db
Lambda that takes in a user's top 10 picks and saves them in Dynamo by league-race-user
We need a lambda to get a user's picks for a race. When a user loads the picks page, we should try to get the user's existing picks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.