SportNews is a website that scans news headlines from many new feeds and aggregates news about sport, football, basketball, tennis, and all other sport. SportNews uses the API from https://newsapi.org to scan headlines and descriptions of articles as they come up.
SportNews front end is constructed using Angular.js and has a simple interface to view:
- News title
- News source
- News description
Clicking on the article will take the user to the news site in a new window.
SportNews backend is written in NodeJS and uses the Mongo database server to store articles and serve them to the frontend.
There are two backend processes:
- A user webapp that communicates with the frontend using JSON to display articles
- This app supports two HTTP verbs:
-
GET - to get articles from the database
-
POST - to add articles to the database
-
PUT - to update articles in the database (optional until we know if we need to update articles)
-
A background webapp that requests new articles from the selected sources and if they are appropriate adds them to the database
- This app is responsible for:
-
Getting news from our news API
-
Checking if there is new news
-
Check if the news is sport news
-
If sport news then
POST
to our user webapp to add the article
- We start with a prototype to demonstrate functionality using ONE news source and building all parts of the application except the front end which will start as plain text.
- Create database to hold news articles and define functions to
INSERT
data and toSELECT
(get, fetch, query) the articles - Connect Express and user webapp to serve articles when a
GET
request is made and to add articles when aPOST
request is made - Create a long running process (
daemon
) that runs all the time and is checking for new articles - When the JSON objects we are returning are more defined we will build the Angular frontend