GithubHelp home page GithubHelp logo

wnguye03 / newswordy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from preston-cook/newswordy

0.0 0.0 0.0 125 KB

My Team's Submission for HackMIT 2022

JavaScript 13.49% Python 53.72% CSS 2.54% HTML 30.25%

newswordy's Introduction

Newswordy

Introduction

During my time at HackMIT, my team and I designed Newswordy, a web application that allows users to view trending headlines from roughly 150 news sources across the web.

In all, users can view trending headlines within their country, predetermined categories, or categories of their creation.

The project was created using Django, Bootstrap, JavaScript, and SQLite.

Distinctiveness and Complexity

For organization's sake, it is best to break down the project's main features and explain the technology behind each of them.

Trending Headlines

Newswordy's home page displays trending headlines within a user's country using IP geolocation. Luckily, Django comes with a pre-installed way to retrieve the user's IP address.

Once retrieved, the application calls ipinfo.io's API to retrieve information on the user's location. After parsing the JSON response, the application extracts the user's country. Afterward, the application calls the News API with the user's country as a URL parameter and extracts an array of trending articles from the JSON response.

Categories

The categories feature allows authenticated users to narrow their search to predetermined themes, such as "science", "business", or "technology." This feature also uses IP geolocation to pull trending headlines within a user's country.

Search

The search feature allows users to search for articles on topics of their choice. Unlike the trending headlines or categories sections, the search section searches globally without using IP geolocation. However, if the user's query matches a category within the accepted categories, then the user will be redirected to the category of their choice.

Saved Articles

On the trending headlines, categories, and search sections, authenticated users can save article to their "Saved Articles" section. This was achieve by using JavaScript and custom API routes to add a post to a SQLite database and using a many-to-many relationship between users and articles.

Users can also unsave articles on all of the sections, and the webpage will remember if the user has saved the article or not upon a webpage reload.

Login/Registration

The login and registration features were achieved with Django's built-in authentication and hashing features.

Account Page

The account section of the web application allows users to view basic information tied to their account, such as their email, username, date joined, and other fields within the Django default User class.

Third-Party Libraries

Newswordy makes use of the following third-party libraries:

  • django
  • newsapi-python
  • python-dateutil
  • requests

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.