Skip to content

Full stack web app to view top news articles from Hacker news. Using Python Django , a REST API is created. It fetches data from HackerNews API . Loads result in MongoDB & expose endpoints. Using React JS , frontend UI fetches data from created API . Rigorously Unit Tested.

Notifications You must be signed in to change notification settings

abhinavjonnada82/hackerNewsBoard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hackerNewsBoard

Instructions to run: -> Run this command from root to activate virtual environment - source my_env/bin/activate -> Change directory into backend and run - python manage.py runserver -> On an another terminal change directory into frontend and run npm install & npm start

Backend: Python Django -> Grabs list of News ID & News content from HackerNews API -> Loads the data into MongoDB -> Django REST API then exposes endpoints

Frontend: React JS -> Performs GET request using Axios on exposed endpoint -> Sets the state and maps result into a table

Notable Functions:

-> Backend - loadData(): Run Time complexity of O(N) (need to improve!) for fetching data from APIs and loading them into DB. Enters only new data into table, skips exisiting data

-> Front end - RefereshList() function is called each time an API request is completed. It updates the NEWS list to display the most recent list of added items.

Unit Tests: -> Backend - Test suit for models and views -> Frontend - Test sit for axios get request

Frontend: Screen Shot 2019-06-22 at 6 00 32 PM Backend: Screen Shot 2019-06-22 at 6 00 21 PM

Unit Test: Front end Screen Shot 2019-06-22 at 4 34 56 PM

Issues: -> Need to fix pagination -> Need to take care of mongodb authentication in Unit Tests -> Forgot to unmount my component...oops!

About

Full stack web app to view top news articles from Hacker news. Using Python Django , a REST API is created. It fetches data from HackerNews API . Loads result in MongoDB & expose endpoints. Using React JS , frontend UI fetches data from created API . Rigorously Unit Tested.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published