Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This Pull Request introduces a comprehensive news aggregation project with enhanced features, such as user authentication, story starring, and real-time updates. This application aggregates top stories from various sources and allows users to view, star, and manage their favorite stories.
Project Overview
TopNews, is a Ruby on Rails-based web application that collects and displays top news stories from various sources. Users can register, log in, view stories, and star their favorite stories for easier access in the future.
Key Features
Application Flow
Fetching Stories:
The StoryFetcherService fetches stories from various APIs.
Stories are stored in Redis for quick access and real-time updates.
File: app/services/story_fetcher_service.rb, config/initializers/sidekiq.rb
Displaying Stories:
Stories are displayed on the home page.
Starred stories are highlighted.
File: app/views/stories/index.html.erb, app/controllers/stories_controller.rb
Starring and Unstarring Stories:
Users can star stories via a star button.
File: app/controllers/stories_controller.rb, app/models/starred_story.rb, app/assets/javascripts/stories.js
Background Jobs:
Job runs at regular intervals to fetch and update stories.
Sidekiq manages background job processing and scheduling.
Database Schema
Users: stores user information (Devise-managed).
Stories: stores fetched stories.
StarredStories: join table for users and their starred stories.