PP Race #
This was made for an event by TeddeMedT
Implementation Details #
In case you want to replicate a version of this for yourself (dont), here's how I did it:
I threw this together really quickly, so I didn't really want to make my own server & API from scratch. As a result, This implementation is very non-standard. I leveraged a few existing resources to make this as simple as possible. Obviously, there are better ways to do what I did, but this was the quickest (and cheapest) way I could think of.
Backend #
My backend is literally just redis. I have the database running locally, and I have a webdis layer also running so the frontend can access it without needing a server to relay the message.
To accomplish this, we need two ACL users in the database at the same time:
- An
adminuser, with full rights and a secure password - A
publicuser, which has no password, but is read-only
I did this by configuring ACL as follows:
user default off # I don't know if you need this, but I did it just to be safe
user admin on >SECUREPASSWORD ~* &* +@all
user public on nopass %R~public:* +@read -@dangerous
I then connected webdis to my public user so that I could expose a read-only "data api", that
is literally just redis.
Fetch Service #
Instead of constantly keeping a backend application running in the background, I decided to just make a CLI app that I could schedule on my PC with a cron job, since I didn't wanna pay for a server. This service's code & documentation is in this folder
Frontend #
The frontend in frontend/ is a dead-simple svelte application, that leverages the webdis API
we set up earlier. It just grabs the API data when it starts, does some manipulations to make it
make sense, then displays it in a dashboard.
Deployment #
Please don't, but if you do, figure it out for yourself from the description above
AI Statement #
All code and assets which appear in this project are hand-written. LLM usage is limited to one-off questions for technical advice, and for generating example data to help build the UI, none of which exists in the final product.
Made with ❓ by clxxiii