Coder Social home page Coder Social logo

polynews's Introduction

AI enhanced news aggregation.

Technical summary

POLYNews provides an integrated approach to reading news from a variety of sources.

Articles are retrieved via public RSS and grouped by story using a TF-IDF BOW model. The most important news of the day is inferred by how extensively a story is covered across multiple sources.

Requirements

  • Postgres 12
  • Ruby 2.6
  • Node 14
  • Yarn 1.22
  • Heroku CLI

Roadmap

  • Track article popularity and integrate that into the headline/most important logic.
  • Switch to a n-gram model to improve story grouping
  • Customized user recommendations using past viewing history to train the model.
  • Expand categories and sources to provide more granular and in depth coverage.
  • Switch to a magazine-like UI which emphasizes article importance

Application setup

Prepare the application for local execution with:

> bin/setup

Among other things, this will:

  • Setup the heroku remote
  • Install Ruby and JS dependencies
  • Create, migrate and seed the database
  • Download and group the first batch of news articles
  • Run the specs and lint the application

Code Verification

POLYNews uses a variety of tools to maintain code correctness, consistency and quality. Before merging new code the expectation is:

  • All specs pass (rspec)
  • 90% test coverage (simplecov)
  • Adherence to the style guide (no rubocop offenses / specifically disable where necessary)
  • Minimum 90% quality score on all code files (rubycritic)

To verify the application run:

> bin/verify

Run the application

Run the following:

> bin/rails server

Application is available at localhost:3000.

The root and /news routes provide the public interface for the application.

Admin routes are accessible at /channels. In production, the admin routes are protected with HTTP Basic Authorization. Set the ADMIN_USERNAME and ADMIN_PASSWORD environment variables to specify admin credentials.

The admin routes are useful for troubleshooting, but generally changes should be made via the db seeds.

Configuring and updating the news sources

The news:update rake task is provided for refreshing the current news articles.

The news:full_refresh rake task will completely refresh the news by emptying the db, reseeding and then downloading articles from scratch. This is particularly helpful when large scale changes are made to the channels.

Production

POLYNews is available online at polynews.co

(Initial load may take a moment for the Heroku dyno to spin up)

polynews's People

Contributors

bdavi avatar benreyn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.