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
- About the Project
- Technical Components
- Built With
- Installation
- Contact
- Acknowledgements
- How it works
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.
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.
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.
- Heroku Link
- test user credentials ( eamil: [email protected] pass: 123456 )
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
To clone the repository, navigate to it's containing directory, and run:
- $
git clone https://github.com/karthi07/review-articles
- $
bundle install
- $
rails db:migrate
- $
rails db:seed
- 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.
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
👤 Karthick Venkatesan
Give a ⭐️ if you like this project!
This project is MIT licensed.