Show HN: I build a Fantasy NHL app in 3 days with Claude AI
So I decided to create my own. But on the side? This would take ages. I am very confident with Rust and JavaScript, but it still takes ages to build something like that.
Good prompts, and a few long nights later, and I could create something fun and easy to use.
Have a look: https://fantasy-frontend.fly.dev/
The frontend is in React, the backend in Rust. I deployed both via fly.io. It was so simple and fast, it was shocking.
After it was deployed, I took 2-3 days to refactor everything and made it neat and tidy, so I could possibly open it up for general use with accounts etc.
The first time I built something with the help of AI not just for me.
The biggest help was certainly the UI and styling. I was never good at that. The first draft looked rough. I fed it some screenshots from NHL.com and told the model to "make it look nicer". What you see is I think the 20th iteration of the app, slowly improving, fixing bugs etc. But 90% with the help of AI.
I could have done 98% myself (except the styling part). And after each working iteration, I spend quite some time cleaning up so I can build on top of that.
The beauty? The cleaner, more modular code base saved tokens and made it easier for the model to refactor and understand. Strictly typed (TypeScritp in the frontend, Rust in the backend) helped as well!
However, my favorite player is not in your app, and I am slightly offended (I'm kidding of course).
Do you plan to add real-time updating of stats? I thought of rolling my own app at one time, and last I checked, the NHL is very particular about their data.
I haven't encountered any rate limiting. I find it quite fascinating how fast the API is. Sometimes my live stream is lacking a few seconds behind, and my website already has the new score before the stream.
Probably about ten hours, all in.
I am using Axum, Tokio, Tracing, SQLX. I am an experienced Rust programmer, so I could always judge what code I am getting, and how to refactor it after. But it saved me writing lots of boiler plate SQL queries etc.
I thought about server side rendering, but have no experience doing it with Rust. So I sticked to the stack I am used to, to ship a bit faster.
Any recommendations on server side rendering crates?
a. which llm/IDE do you use?
> The biggest help was certainly the UI and styling
b. the styling seems to be v"stripped down"?!
Did you explicitly prompt for this? Whenever i prompt from some web app i get an initially visually richer style - which becomes difficult to maintain later
I specifically prompted the UI to be simplistic, component based etc. I also prompted tailwind, so that the LLM doesn't go crazy on hundreds of lines of CSS. Everything generated I can understand and change.