Skip to content

nickma101/NewsWebsite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NewsWebsite - WORK IN PROGRESS

A flexible Application that allows designing different kinds of experimental news websites for academic research. Feel free to use and adapt it to your needs.

The app runs on a Python backend and can fetch articles either from a local database or from an external API. The frontend is built on React and features several options for customisation. The default setting of the app includes a homepage where articles are shown as a list and a reading page where users can read individual articles. In addition, the app also features several alternative ways of displaying content (overall homepage and individual articles). See below for images.

Default Frontend

Alternative homepage

Alternative article cards

Installation

  1. Clone the repository
git clone https://github.com/nickma101/NewsWebsite
  1. Create a virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate
  1. Navigate to backend and install requirements with
cd backend
pip install -r requirements.txt
  1. Edit (if necessary) and initialise database (see [add link] for default database models)
flask db init
flask db migrate
flask db upgrade
  1. Fire up the backend
flask run
  1. Install necessary react packages
cd frontend
npm i
  1. Fire up the react frontend and python backend for local development
npm start

*Note for Mac-users: The backend runs on localhost:5000 by default. However, it may be that this port is blocked. If the app is not running you may want to deactivate AirPlay or change the API endpoint for the backend

Customisation

Both the front- and backend can be freely adapted.

Frontend

Available display options include a number of different article cards as well as either a news homepage or a one- or two-column grid (see above).

Backend

Depending on your setup you might want to change the source of the articles (e.g. access via API or from local database), the database model, or the recommendation logic. See here for a conceptual model of the app: [add link]. Changes to the different elements can be made in the respective python scripts (e.g. algorithms.py for the recommendation logic or routes.py for which data is being logged and when)

About

A flexible Application that allows designing different kinds of experimental news websites

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published