Skip to content

The Project is Backed by Rails and Sidekiq handles the background job to Retrieving and store the articles at redis. React is plugged into rails, which handles reading from redis and displaying the articles fetched.

Notifications You must be signed in to change notification settings

karthi07/review-articles

Repository files navigation

Forks Stargazers Issues


Read Review Articles

railsreactredissidekiq

Read Review Articles - Place to read your favourite and top treding, yet usefull technical articles under a single hood. the best part is, you can review the article and share with your friends, Aka you can get the favorite aticles and their reivews of the person you follow.
Explore the docs »

Report Bug · Request Feature

Table of Contents

About The Project

Place to read your favourite and top treading, yet useful technical articles under a single hood. the best part is, you can review the article and share with your friends, Aka you can get the favourite articles and their reviews of the person you follow.

Technical Components

The Project is Backed by Rails and Sidekiq handles the background job to Retrieving and store the articles at redis. React is plugged into rails, which handles reading from redis and displaying the articles fetched.

Sidekiq - handles the background job to retrieving articles from web

Redis - Store article temp at Server Memory [ wont be stored in Database ] - This is required by project design

React - Load articles at real-time. Instead of refreshing the whole page, particular components will be altered.

Alexa Integration - Yet to be implemented in prod ( work in progress )

Live Version

Event_management

Built With

This project was built using these technologies.

  • Ruby on rails
  • React JS
  • Sidekiq Job Scheduler
  • Redis
  • Alexa [ read out the articles list on demand] ( yet to be implemented in prod)
  • Firebase (yet to be used in prod)
  • Rspec

Installation

To clone the repository, navigate to it's containing directory, and run:

Clone the repository and follow the steps to run the bot.

Rails Setup

  • $ git clone https://github.com/karthi07/review-articles
  • $ bundle install
  • $ rails db:migrate
  • $ rails db:seed

Redis and Sidekiq

  • Install redis [ change the redis server details, if you arent using default config ]
  • Start the Sidekiq using this command
    • $ bundle exec sidekiq
    • Sidekiq is currently configured to run on every one hour (configurable)
  • $ rails s

This should install all rails gems, and start a local server where vai rails s.

Then you can you the command rails s in your terminial to active live application.

Handling N+1 queries

N + 1 is common problem occur is most of the web application. To solve this, Active Record lets you specify in advance all the associations that are going to be loaded. This is possible by specifying the includes method of the Model.find call. With includes, Active Record ensures that all of the specified associations are loaded using the minimum possible number of queries.

These case are handled in couple of places in this project

  • To get the user reviews
  • @reviews = Review.includes(:user).where(user: @user).ordered_by_most_recent
  • @reviews = Review.where(user: current_user.following_list + [current_user]).includes([:user]).ordered_by_most_recent

How It Works

review_articles_home

review_home

user_profile_page

Built by

👤 Karthick Venkatesan

Acknowledgements

Show your support

Give a ⭐️ if you like this project!

📝 License

This project is MIT licensed.

About

The Project is Backed by Rails and Sidekiq handles the background job to Retrieving and store the articles at redis. React is plugged into rails, which handles reading from redis and displaying the articles fetched.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •