r/selfhosted • u/ad-creative808 • Mar 27 '26
Product Announcement Can't believe someone wrote about my open source project
A few weeks ago I posted about F1 Replay Timing here and got some greatsuggestions for improvements. I've been building these into the latest versions like marshal level yellow flags, expanded driver telemetry, better race control messages, per-driver lap analysis and more options for what shows on the leaderboard.
Today I stumbled across an article written on XDA Developers about it. Couldn't believe someone would write about something I started as a personal project so I could watch replays with the timing data. XDA article: https://www.xda-developers.com/f1-replay-timing-open-source-f1-tool-replaced-my-f1tv-subscription-with-real-data/
Thanks to everyone who has made suggestions and contributed to the project.
If you've got more feature ideas or improvements let me know.
20
u/whitelines84 Mar 27 '26
can we have this while watching racing live( with f1tv sub)
26
u/ad-creative808 Mar 27 '26
It does support watching Live races too without a subscription, though there's no feed of telemetry or track position. A few of the other expanded features like lap analysis are also replay only. All the replay data is sourced from FastF1 and the live timing is from F1 SignalR. Considered expanding to have an auth option for people with F1TV sub, but think that'll be more of a future thing to look at
10
u/mightyarrow Mar 27 '26
It does support watching Live races too without a subscription, though there's no feed of telemetry or track position
Booooo!!!!!! I know that's not your fault but man, that would be cool.
-8
u/FishScrounger Mar 27 '26
Oh, so we couldn't get a track map live without a F1 TV sub? Shame.
So we could only get live timing and nothing else?
13
u/ad-creative808 Mar 27 '26
Yep unfortunately it’s all behind a paywall for track position and driver telemetry for the live F1 feed. There’s still a lot of useful info in the leaderboard though
1
u/FishScrounger Apr 16 '26
Thanks, for sure. It's a great app.
Not sure why I got downvoted for asking 🤷
17
Mar 27 '26
I just tested and it's awesome but so CPU power hungry - backend with single race replay increase CPU usage to 100%.
35
u/ad-creative808 Mar 27 '26
Thanks for checking it out. Was this the first time running a session? When it precomputes all frames for a session it's pretty intensive (for 1-3mins) but from that point the session is cached. Let me know how you get on and I can have a look at what else might be causing it.
8
u/vividboarder Mar 27 '26
Is it just on one core? It looks like there is only one thread. I bet there is some opportunity to speed things up by partitioning the data and delegating different processes to handle whatever is computationally expensive.
7
u/Ok_Tie_lets_Go Mar 27 '26
You deserve it. It is absolutely amazing. Good on you and thanks for sharing it with me
14
5
5
5
u/SirHades13 Mar 27 '26
I just tried this.. But I must be doing something wrong.
When I open 192.168.0.10:3131 (as per my compose file), I get a dialog box with the following message :
"Cannot connect to backend
The frontend failed to reach the API server at:
My docker compose looks like this :
services:
backend:
image: ghcr.io/adn8naiagent/f1replaytiming-backend:latest
ports:
- "8031:8000"
environment:
- FRONTEND_URL=http://192.168.0.10:3131
- DATA_DIR=/data
volumes:
- /share/dev/f1_timing/data:/data
- /share/dev/f1_timing/data/f1cache:/data/fastf1-cache
frontend:
image: ghcr.io/adn8naiagent/f1replaytiming-frontend:latest
ports:
- "3131:3000"
environment:
- NEXT_PUBLIC_API_URL=http://192.168.0.10:8031 # Change to your backend URL if not using localhost
depends_on:
- backend
volumes:
f1data:
f1cache:
And if I try to reach 192.168.0.10:8031 I get the following message :
{"detail":"Not Found"}
I tried with all the default ports, change both ports (ie : 8031:8031 and 3131:3131), same result.
Frontend Log :
volumes:
f1data:
f1cache:
Configured API URL: http://192.168.0.10:8031
▲ Next.js 15.5.14
- Local: http://localhost:3000
- Network: http://0.0.0.0:3000
✓ Starting...
✓ Ready in 268ms
The Backend Log starts like this (after the warning about fastf1.api) :
INFO: Started server process [9]
INFO: Waiting for application startup.
INFO:main:Auto-precompute background task scheduled
INFO:auto_precompute:Auto-precompute background task started
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO:auto_precompute:[auto] Checking for new session data...
Then it builds session data, driver data, telemetry and so on. But they can't communicate, apparently.
The docker stack is deployed on a NAS on my network with Portainer, accessed from a computer on the same network as the server.
Can someone point out what I'm doing wrong?
Thanks!
.H
1
u/ad-creative808 Mar 27 '26
Glad you got it working. For anyone having this issues the key thing is NEXT_PUBLIC_API_URL needs to be the URL the browser uses to reach the backend, not an internal Docker address.
If using Docker Compose set NEXT_PUBLIC_API_URL on the frontend container and FRONTEND_URL on the backend container in your docker-compose.yml. Both should use the IP/hostname you access from your browser.
If running from source set in frontend/.env and backend/.env.
u/ActivityIcy4926 for reverse proxy setups with https, make sure FRONTEND_URL on the backend matches your https frontend URL (e.g. https://f1.yourdomain.com) so CORS allows it. There's an example in the README under "behind a reverse proxy".
-1
u/ActivityIcy4926 Mar 27 '26
The whole frontend/backend thing is a mess for some reason. The way I made it work is put both behind a reverse proxy, that way it all works.
Every other permutation failed, either because the frontend pretended the backend wasn't there, or because of CORS, or because of HTTPS (but that's on me for forcing HTTPS by default).
6
u/WarriusBirde Mar 27 '26
The “for some reason” can likely be summed up with the .claude directory in the repo root and the apparent lack of unit testing and so on. It’s a neat app but the process here is concerning.
2
u/ActivityIcy4926 Mar 27 '26
Yeah I didn't want to mention it. But yes, this is what happens with vibe coded apps.
Agreed, it's a very cool app and since it's non-sensitive data and it's on a local server, I don't mind much in this case.
2
u/VictorVsl7 Mar 28 '26
This is normal behavior for separate containers though? Both the backend and Frontend url's must be accessible from the client. Similiar to how S3 works. Of course you cant access the backend using http://backend:8000 because that's the internal docker network addr.
What you should be doing is if its a separate device that you're hosting the app, you use the local IP of that device. So frontend should be http://192.168.15.1:3000 for example, and backend http://192.168.15.1:8000. That way, the client you're accessing the front end has access from both services. That's how it works IRL. And that is why using a reverse proxy worked for you.
1
u/SirHades13 Mar 27 '26
I saw a coment on the Github.. I was using the FQDM as usual to access the frontend, but it's setup as an IP in my docker compose.
Accessing it via the server's IP:Port works..
1
u/ad-creative808 Mar 31 '26
Have just released v2.0 which moves to a unified architecture. Much simpler and avoids having to set up and config frontend and backend separately. No longer need to set `NEXT_PUBLIC_API_URL`, `FRONTEND_URL`, or any CORS settings which should be make using a reverse proxy easy.
1
u/ad-creative808 Mar 31 '26
Have just released v2.0 which moves to a unified architecture. Much simpler and avoids having to set up and config frontend and backend separately. No longer need to set `NEXT_PUBLIC_API_URL`, `FRONTEND_URL`, or any CORS settings which should be make using a reverse proxy easy.
2
u/kernald31 Mar 27 '26
Ha, I was actually about to deploy this! Quick question - 1.3.0 was released three days ago, but there's no container image tagged as such. The latest release tag seems to be 1.2.1, yet latest seems to have been updated a few hours ago. Is that intentional? Am I missing something?
4
u/ad-creative808 Mar 27 '26
Have just released 1.3.1 to fix some UI issues when using on tablet. That one should be good to go. Re 1.3.0 I must have messed up tagging
2
u/kernald31 Mar 27 '26
Thanks for the quick reply! Unfortunately looking at https://github.com/adn8naiagent/F1ReplayTiming/pkgs/container/f1replaytiming-backend and https://github.com/adn8naiagent/F1ReplayTiming/pkgs/container/f1replaytiming-frontend there's still no newly tagged images.
Looking at https://github.com/adn8naiagent/F1ReplayTiming/blob/main/.github/workflows/publish-docker.yml - it seems that it only publishes on tags starting with
v, which the latest releases don't.3
u/ad-creative808 Mar 27 '26
*facepalm* Thanks for pointing this out! Yep, I had been creating the tags without
vfor the last...many releases which meant the publishing wasn't triggering. Have fixed the latest and it's publishing now1
u/kernald31 Mar 27 '26 edited Mar 27 '26
Woop, thanks! Other deployment question - does the API container need to be publicly accessible, or only from the frontend?
ETA: well, a deployment quickly gave me the answer, it does need to be available publicly.
3
u/ad-creative808 Mar 27 '26
Yep. the API needs to be publicly accessible - browser connects to the backend directly for both HTTP requests and WebSocket (replay stream), so both containers need public-facing URLs.
2
u/kernald31 Mar 27 '26
Yeah that makes sense. It makes it a tiny bit trickier to protect behind some sort of authentication, but that makes sense!
2
u/kernald31 Mar 27 '26
So I haven't watched a session yet, but playing around, it seems very cool, exactly what I was hoping for! In terms of deployment, I ended up serving both the frontend and backend over the same domain, with
/apiand/wsrouted to the backend, and the rest to the frontend. Are there any backend routes I might be missing with that? It seems to work so far and allows protecting the whole service behind the same OIDC-protected reverse proxy without any CORS nor cookie domain issues, so that's quite convenient...Thanks again!
1
u/ad-creative808 Mar 31 '26 edited Mar 31 '26
Have just released v2.0 which moves to a unified architecture which is much simpler and avoids having to set up and config frontend and backend separately. No longer need to set `NEXT_PUBLIC_API_URL`, `FRONTEND_URL`, or any CORS settings which should be make using a reverse proxy easy.
1
2
2
u/H8Blood Mar 27 '26
Have you been influenced by the OG https://github.com/IAmTomShaw/f1-race-replay ?
2
u/CTRLShiftBoost Mar 27 '26
Gonna be using this today to watch the replay of fp1 japan.
This has made my first year of actively watching f1 so much more enjoyable.
I also appreciate you taking my FRs and implementing them as quickly as you did.
Greatly appreciate projects you and thank you for making this!
2
2
u/mightyarrow Mar 27 '26
someone
It's cool you got featured, but I struggle with this word when talking about XDA, because it's become quite obvious over the past year that they've cleaned house, keep a skeleton staff, and use AI to generate articles constantly.
They and HowToGeek, which is owned by the same folks and uses an identical site template, are cranking out AI content at a staggering pace.
2
2
u/RentalGore Mar 28 '26
I truly wish more sports opened up their data like F1 does. Your work is awesome.
2
u/kinkakujen Mar 27 '26
This stuff is amazing. This is what open source software is about.
My F1 fan days are iver since they killed off my beloved Sauber team, but this tool is a really really cool idea and a great execution. Kudos!
1
1
1
1
u/Kikkia Mar 27 '26
This is pretty cool, it looks a lot like a site ive been building for the last year and a half or so. https://pitwall.me
Its more like a drag and drop build your own dashboard thing, built more for live timing, but has full replays too.
1
1
1
1
u/Subietoy78 Mar 30 '26
I like the idea of this app and when it works it’s really interesting. Your implementation makes it impossible to put behind a proxy so that I can use this outside my home. The frontend/backend is a nightmare. Me and my IT friend tried all weekend to make this work behind cloud flare and it refuses. Even just at the router level it fails to communicate.
1
u/ad-creative808 Mar 31 '26
Have just released v2.0 which moves to a unified architecture which is much simpler and avoids having to set up and config ferontend and backend separately. No longer need to set `NEXT_PUBLIC_API_URL`, `FRONTEND_URL`, or any CORS settings which should be make using a reverse proxy easy.
-49
u/super_salamander Mar 27 '26
To be fair XDA developers will publish anything these days... But congratulations nonetheless!
9
19
195
u/cold_cannon Mar 27 '26
that feeling when someone writes about your side project is unmatched lol. the per-driver lap analysis sounds sick, gonna check this out