Skip to content

uwon0625/nxNews

Repository files navigation

Introduction

NtNews is a sample Angular v19 web app to pull stories from Hacker News API via dotnet(SDK v8) Restful API, deployed to Azure.

Features

  • Pagination(with @angular/material/paginator)
  • Caching
  • Automated end-to-end testing (with Playwright)
  • Integrated Unit Testing

Screenshots

App View Swagger Api Doc

Notes

Hacker News API is very flexible and gives different data fields for different types. This app only pulls for story type("type" : "story") and skip other type like comment, job, poll, etc. Furthermore, we only list the stories with a Url so our users can follow up the link to read more. When we need to fetch for more stories, we have to check each item to check its type, which means pagination and caching are important to keep the app up running.

For a quicker startup, we load latest 20 story ids from https://hacker-news.firebaseio.com/v0/newstories.json, then query each of the story by its id to get the title and Url at https://hacker-news.firebaseio.com/v0/item/{story-id}.json.

How to use the app

To run it locally:

What's next?

We will continue to make improvements for:

  • refine the UX and styling
  • adding more tests
  • refactor to make the code better
  • containerization for scalability
  • persist some of the data locally(between cache and Hacker News API)
  • authorization(with jwt) to make the app secure and meaningful to our users
  • and more to come