Skip to content

Conversation

@ddre54
Copy link

@ddre54 ddre54 commented Aug 17, 2024

[FEATURE]: Top News: Internal Team News Feed

  • Users should sign in and out. We have created a User model for you and pre-populated it with several users.
  • Users should come to a page and see a list of current top Hacker News stories.
  • This list does not necessarily need to be the current live list, but it should be a recent and continuously updated list.
  • The number of stories displayed is up to you.
  • The user should be able to star a story. The mechanism and display is up to you: flag, star, upvote, pick, etc. The UX is your choice.
  • The stories chosen by the team members should display. It can be a separate page or the same page, the choice is yours.
  • Each story should show the name of the team member or members who flagged it.
  • As an internal tool for a small team, performance optimization is not a requirement.
  • Be prepared to discuss known performance shortcomings of your solution and potential improvements.
  • UX design here is of little importance. The design can be minimal or it can have zero design at all.

Notes:

  • Users comes to the links for "TOP News" or "Team Articles".
  • Added Dockers and instructions on how to run the environments.
  • Focused on functionality and testing first over UX/UI. Once the functionality is there, UX/UI could be improved.
  • For now, just the Top 10 Stories are shown in "TOP News", till a caching is introduced for that page. They do refresh when Hacker News Top Stories updates.

ddre54 added 8 commits August 15, 2024 11:26
- Add "Know How" environment setup instructions
- Update `config/environments/test.rb` to use the new db connection
handling according to deprecation warnings
- Setup rspec to use factories with `factory_bot`
- Setup rspec to use devise helper methods with `devise`
- Introduce `spec/support` directory for gem configuration with rspec
- Introduce `spec/factories` directory for model factories in rspec
using `factory_bot`
- Implements "Users should sign in and out"
- Add lib/services directory to locate files that deal with
third-party integrations
- Implement HackerNews client to deal with the requests of the
stories
- Add tests to ensure they work in a predictable way
- Add models to stored the required created articles
- Add models to stored the favorited articles per user
- Add tests
- Add Articles controller to list top stories
- Add HackerNews conversion from stories to new Articles
- Add shared_context for rspec

TODO:
- [ ] Refactor shared_examples for `without sign in user` on request tests
- [ ] Add link to action to allow Users to pick articles
- [ ] Add Team Articles list view
- Allows to pick Articles from "Top News"
- Adds "Team Article" functionality with who picked it
- Refactors factories to be usable multiple times
- Add tests to new functionality

TODO:
- [ ]: Modify `article.external_id` column from string to int
- [ ]: Refactor some of the views into partials
- [ ]: Improve UX/UI to display the information. Improve user feedback on actions.
- [ ]: Add capability to remove "pick" article from "Team Articles"
- Change column external_id type in articles from string to integer

TODO:
- [ ]: Add Dockers to run environment
- [ ]: Add cache layer in articles#index for HackerNews stories
- Add Docker to run development environment
- Add Docker to run tests and test environment
- Add README.md instructions on how to use docker commands setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant