Inspiration
Fantasy sports leagues provide a great way to facilitate conversation about sports with friends, and make games and matchups more exciting. A fantasy system revolved around news posts makes the news more exciting and easy to talk about with the people around you and helps keep you up to date with what's going on in the world in an exciting way.
What it does
HSPN checks every incoming post and comment to the Hacker News site for keywords, categorizes the keywords, and has a ranking system based on their relevance in the recent posts. Players join a league, draft keywords to form a team, and compete against each other as more posts are uploaded to earn points.
How we built it
The frontend is built with Next.js, React, and tailwind for CSS. The backend uses Docker and is done through Next.js, with the keyword service in Python using YAKE. The database is PostgreSQL hosted on Neon with Drizzle ORM and uses the Hacker News Firebase API to provide consistent real-time updates.
Challenges we ran into
Keyword extraction had a significant amount of noise and duplication such as "Claude" and "Claude code" being separate categories, or words like "good" being keywords. Significant post-processing is used to prevent poor keyword selection, with a dynamic blacklist that the user can add to as well. Providing real time updates during scoring without overly calling the API too much. To avoid this, the website checks for the newest post id only, then requests any posts it is missing between the newest post available and the newest post in the database.
Accomplishments that we're proud of
Efficient data processing with over 100,000 posts and comments analyzed, real-time updates on rankings and points, accurate keyword extraction.
What we learned
Keyword extraction using YAKE. Database operations using Drizzle ORM. Building and utilizing Docker microservices.
What's next for HSPN
Server handling of leagues to allow longer timeframes. Additional keyword extraction from articles and links posted. Configuration with additional news sites.
Built With
- docker
- firebase
- nextjs
- postgresql
- python
- react
- tailwind
Log in or sign up for Devpost to join the conversation.