展示HN:我在3天内使用Claude AI构建了一个幻想NHL应用程序
我不是来自北美,几年前才搬到那里的。在被邀请参加第一个幻想联赛并看到他们使用的平台后,我发现自己无法每天去查看。相比之下,使用一个Excel表格会更吸引我。
于是我决定自己创建一个。但单靠自己?这会花费很长时间。我对Rust和JavaScript非常自信,但要构建这样的东西仍然需要很长时间。
经过一些好的提示和几个漫长的夜晚,我终于能够创建出一个有趣且易于使用的东西。
请看这里:
<a href="https://fantasy-frontend.fly.dev/" rel="nofollow">https://fantasy-frontend.fly.dev/</a>
前端使用React,后端使用Rust。我通过fly.io部署了这两个部分。这个过程简单快捷,令人震惊。
部署完成后,我花了2-3天时间重构了一切,使其整洁有序,这样我就可以考虑开放给公众使用,包括账户等功能。
这是我第一次在AI的帮助下构建一个不仅仅是为我自己服务的项目。
最大的帮助无疑是用户界面和样式设计。我从来不擅长这一点。第一版看起来很粗糙。我给它提供了一些来自NHL.com的截图,并告诉模型“让它看起来更好”。你看到的这是应用程序的第20个迭代,逐渐改进,修复了bug等。但90%的工作都是在AI的帮助下完成的。
我本可以自己完成98%的工作(除了样式部分)。在每次工作迭代后,我花了相当多的时间进行清理,以便在此基础上继续构建。
美妙之处在于,更加整洁和模块化的代码库节省了资源,并使模型更容易进行重构和理解。严格的类型定义(前端使用TypeScript,后端使用Rust)也起到了很大帮助!
查看原文
I am not from North America, and moved there a couple years ago. After being invited to the first fantasy league and seeing the platform they were using, I couldn't bring myself to check it every day. An excel sheet would have been more appealing to use than this.<p>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.<p>Good prompts, and a few long nights later, and I could create something fun and easy to use.<p>Have a look:
<a href="https://fantasy-frontend.fly.dev/" rel="nofollow">https://fantasy-frontend.fly.dev/</a><p>The frontend is in React, the backend in Rust. I deployed both via fly.io. It was so simple and fast, it was shocking.<p>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.<p>The first time I built something with the help of AI not just for me.<p>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.<p>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.<p>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!