Hungry News

hungry-news-logo

Overview

Major News Page
– This is the main page and purpose of the app. It displays only the highest impact news. Click on a news on this page or any other page to view the details and contents of the news. You can also Summarise the news, Listen to the news, or click on the citation links to view more information about the news.
– This is made possible thanks to a Lambda script that executes occationally for the extraction of RSS feed from the news websites (CNA and BBC) and inserted into a database.

Past News Page
– Displays major news from the past weeks, up to 12 weeks.

Curated News Page
– Displays local Singapore news as well as global medium impact news.
– Easy to use toggle buttons to filter news here based on “Singapore” and “All”.

Saved News Page
– Displays news that you have saved. You can save news by clicking on the “Save” icon on the news details page of any news.

Search News Page
– Search for news articles by title. Searches up to 12 weeks of news.

Settings Page
– Change the theme of the app to light or dark mode.
– App state management: Reset the app to its initial state. All saved news, theme settings, and news marked as read will all be cleared.

How is this app made?
Frontend
  • The frontend of Hungry News was built using Flutter, an open-source framework developed by Google that enables developers to create cross-platform applications from a single codebase.

  • Flutter leverages the Dart programming language, which features a syntax similar to other C-like languages such as Java and JavaScript. This made it easier to build a robust and dynamic interface for the application.

  • User preferences, such as the app’s theme and bookmarked news, are stored locally on the device. This eliminates the need for authentication, allowing multiple users to use the app on the same device without any login requirements.

  • Smooth user experience: The app design ensures a clean and responsive interface for browsing, reading, and managing news.

Backend
  • The backend was developed in Python, which provides flexibility and efficiency for handling server-side logic. It includes:

  • APIs: A set of methods and endpoints that the frontend calls to fetch news and interact with the database. Hosting: The backend code is hosted on Render, a cloud platform, ensuring that the application remains online and responsive at all times.

Database
  • The news headlines and their details, such as publication date, source, and impact level, are stored in a MySQL database. The database is part of a Hostinger plan that offers unlimited database storage for a limited time.

  • Database optimizations include:

  • Table management: News older than three months is periodically deleted to reduce database size and improve performance.

Machine Learning
  • To deliver high-quality and impactful news that meets the project’s requirements, machine learning was integrated into the backend.
Model Creation and Training
  • The machine learning model was built using scikit-learn (sklearn), a Python library offering tools for classification, regression, clustering, and dimensionality reduction.
  • A dataset of approximately 1200 RSS news headlines from CNA and BBC was manually annotated based on perceived impact levels. Special attention was given to high-impact news, which is less frequent. Additional high-impact news was manually added to the dataset to balance the training process.
  • The trained model was exported using joblib, resulting in a lightweight (~100KB) file.
Model Hosting
  • The model file was uploaded to AWS S3
  • An AWS Lambda function was created to utilize the model for classifying and sorting current news headlines from RSS feeds. The Lambda function uses a container image to package the model and its dependencies, overcoming the size limitations of direct zip uploads.
Regular News Updates:
  • The Lambda function is triggered every hour using AWS EventBridge. It:
  • Fetches the latest news headlines from CNA and BBC.
  • Filters duplicates and similar news items using custom anti-duplication logic.
  • Classifies news into impact levels using the trained model.
  • Inserts unique news into the database, organized by publication date.

Screenshots

hungry-news-content-image-1
Major News Page
hungry-news-content-image-2
Past News Page
hungry-news-content-image-3
Curated News Page
hungry-news-content-image-4
Saved News Page
hungry-news-content-image-5
Settings Page
hungry-news-content-image-6
News Detail Page (top)
hungry-news-content-image-7
News Detail Page (bottom)
hungry-news-content-image-8
Dark theme

Youtube Demo

Credits

=== App Title ===

Hungry News

=== Created By ===

Wei Lin, Developer

=== Made Using ===

Flutter

Python

MySQL

AWS S3, AWS Lambda, AWS EventBridge, AWS Elastic Container Registry, scikit-learn

=== Public Assets Used ===

Sources from CNA Singapore ( https://www.channelnewsasia.com/api/v1/rss-outbound-feed?_format=xml&category=10416)

Sources from CNA Asia ( https://www.channelnewsasia.com/api/v1/rss-outbound-feed?_format=xml&category=6511)

Sources from CNA World ( https://www.channelnewsasia.com/api/v1/rss-outbound-feed?_format=xml&category=6311)

Sources from BBC ( https://feeds.bbci.co.uk/news/rss.xml?edition=int)

Color theme from Hungry Jack’s ( https://www.hungryjacks.com.au/home)