gstipi

gstipi

Hello All,

first time poster and very recent Elixir/Phoenix/LiveView fan here.

I present to you: HNLive, a Phoenix/LiveView web app showing the top 10 (by score or number of comments) newest HackerNews stories in “real time”.

You should find the app running on https://hntop10.gigalixirapp.com - please note that this is running on the free tier with limited memory and resources.

GitHub: GitHub - gstipi/hnlive: A Phoenix/LiveView web app showing the top 10 (by score or number of comments) newest HackerNews stories in "real time". · GitHub

My motivation for building HNLive was twofold:

  • I had read and heard many good things about Elixir, Phoenix and LiveView, and after watching Chris McCord`s demo “Build a real-time Twitter clone in 15 minutes with LiveView and Phoenix 1.5”, I finally said to myself: “That looks awesome, time to learn Elixir and Phoenix!” HNLive is the app I built over the last couple of days while on this learning journey, so don’t expect idiomatic or bug-free code - feel free to point out potential improvements!
  • I love browsing HackerNews, but for me the selection of stories on the front page, the “newest” page and the “best” page is not ideal if I want to see at a glance which new stories (say, submitted over the course of the last 12 hours) have received the most upvotes or are discussed particularly controversially (as judged by the number of comments). HNLive attempts to address this using data from the HackerNews API to provide the top 10 submissions, sorted by score or number of comments, taking into account only the last 500 submissions. I also wanted to see updates to the top 10 (and scores and number of comments) in real time, which was made easy by using LiveView.

Showing Posts 1 to 6

idi527

idi527

:waving_hand:

I love browsing HackerNews, but for me the selection of stories on the front page, the “newest” page and the “best” page is not ideal

Sorry for being off-topic, but you might find https://hckrnews.com useful.

Julio

Julio

Thank you for this demo. It’s very nice to see the potential of LiveView in concrete use-cases and not only graphical demos.

josefrichter

josefrichter

That’s great! Good example how to get people interested in Elixir/Phoenix/LiveView!

Although next time ask me for help with the front-end design :wink: Or throw in something like Tailwind or UIKit micro css frameworks.

Next step: sentiment analysis of the comments (to sort by “most heated” discussions) using python’s TextBlob TextBlob: Simplified Text Processing — TextBlob 0.19.0 documentation – any suggestions by more experienced colleagues how to plug this in? I assume very simple separate microservice via genserver or something? edit: here’s a repo of the sentiment analysis using twitter api, would be fairly easy to adapt: twitter_filter/6_flask at master · k2datascience/twitter_filter · GitHub

gstipi

gstipi OP

Thanks for the suggestion, I’ll explore the idea of adding sentiment analysis!

I think I could do a simple version without relying on an external dependency or API, there are many word lists available for that purpose, e.g. AFINN-165.

For the front-end design, I will gladly take you up on the offer, it’s certainly not my forte :wink:

josefrichter

josefrichter

I just sent you a pull request :wink:

gstipi

gstipi OP

Awesome, thank you very much! I really like the clean style and the Phoenix logo blends in perfectly!

I’ve merged the PR and deployed the new version to gigalixir.

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
AstonJ
Since we have deprecated our Erlang sections (as we have dedicated Erlang Forums now) let’s add this thread for those who’d like to post ...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews