https://github.com/d-senyaka/headLines-plus
Personalized News Recommendation System A modular Java-based application that delivers personalized news recommendations based on user interactions and preferences. Built with JavaFX, MySQL, and core Object-Oriented Programming principles, this system offers content categorization, adaptive learning, and a user-friendly interfac
https://github.com/d-senyaka/headLines-plus
api cosine-similarity css css-grid-layout csv fxml fxml-files java javafx javafx-application javafx-desktop-apps javafx-gui javafx-library javafx-project jdbc json mysql oop-principles oops-in-java tf-idf
Last synced: 3 months ago
JSON representation
Personalized News Recommendation System A modular Java-based application that delivers personalized news recommendations based on user interactions and preferences. Built with JavaFX, MySQL, and core Object-Oriented Programming principles, this system offers content categorization, adaptive learning, and a user-friendly interfac
- Host: GitHub
- URL: https://github.com/d-senyaka/headLines-plus
- Owner: d-senyaka
- License: mit
- Created: 2025-03-23T22:03:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-26T07:18:24.000Z (6 months ago)
- Last Synced: 2025-09-29T22:41:32.959Z (6 months ago)
- Topics: api, cosine-similarity, css, css-grid-layout, csv, fxml, fxml-files, java, javafx, javafx-application, javafx-desktop-apps, javafx-gui, javafx-library, javafx-project, jdbc, json, mysql, oop-principles, oops-in-java, tf-idf
- Language: Java
- Homepage:
- Size: 5.01 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: news_appdb (1).csv
- License: LICENSE
Awesome Lists containing this project
README
# ๐ฐ HeadLines Plus โ Personalized News Recommendation System
A modular Java-based application that delivers personalized news recommendations based on user interactions and preferences. Built with JavaFX, MySQL, and core Object-Oriented Programming principles, this system offers content categorization, adaptive learning, and a user-friendly interface.
---
## ๐ Features
### ๐ค User Functionality
- โ
**User Registration & Login** (with validation)
- ๐ **View Uncategorized and Categorized Articles**
- ๐ **Interact with Articles** (Read, Like, Skip)
- ๐ง **Personalized Recommendations** (via TF-IDF + weighting)
- ๐ **View Interaction History**
- ๐ **Update Account Information**
### ๐ Admin Functionality
- ๐ **Admin Login**
- ๐ฅ **View & Delete Registered Users**
- ๐ **Activate NewsAPI** to fetch new articles
- ๐พ **Store Fetched Articles** in the database
---
## ๐ง Recommendation Engine
- ๐ **TF-IDF Vectorization** of combined article text (title + description + content)
- ๐งฎ **Cosine Similarity** for relevance computation
- ๐ **Adaptive Weighting Algorithm** to refine future recommendations
- ๐ **User-Specific Dataset** created dynamically from past interactions
---
## ๐งฑ System Architecture
```text
+-----------------------------+
| JavaFX GUI |
| (Login, Register, Articles)|
+-------------+--------------+
|
v
+-------------+--------------+
| Controllers Layer |
| (HomeController, NewsApp...)|
+-------------+--------------+
|
v
+-------------+--------------+
| Core Classes Layer |
| (User.java, Article.java...)|
+-------------+--------------+
|
v
+-------------+--------------+
| Services and Utilities |
| (APIService, NewsParser...) |
+-------------+--------------+
|
v
+-------------+--------------+
| MySQL Database Layer |
| (users, articles, preferences) |
+-----------------------------+
```
---
## ๐งฐ Tech Stack
| Layer | Technology |
|--------------------|-------------------------------------|
| ๐จโ๐ป GUI Frontend | JavaFX + FXML + CSS |
| ๐ก Business Logic | Java (OOP principles) |
| ๐ง ML Integration | TF-IDF + Cosine Similarity |
| ๐ API Integration | NewsAPI.org |
| ๐๏ธ Database | MySQL (via JDBC) |
| ๐ File Handling | CSV/JSON where needed |
| ๐งช Testing | Manual Testing + Debugging |
---
## โ๏ธ Setup Instructions
1. **Clone the repository**:
```bash
git clone https://github.com/yourusername/headlines-plus.git
```
2. **Open Project** in IntelliJ IDEA (or any Java IDE with JavaFX support)
3. **Set Up Database**:
- Create a MySQL database named: `news_appdb`
- Use the provided [DB dump](https://drive.google.com/drive/folders/1syL2YVZ4NqC_49GVhmQ_IMqM3PBWn40E?usp=sharing) to restore tables: `users`, `articles`, `user_preferences`, etc.
4. **Insert Your API Key**:
- Get a free key from [NewsAPI.org](https://newsapi.org)
- Paste it in `APIService.java`
5. **Run the Application**:
- Start from `Main.java`
- Explore features: Register โ Browse โ Interact โ Get Recommendations!
---
## ๐ References
- [TF-IDF Explained โ GeeksforGeeks](https://www.geeksforgeeks.org/understanding-tf-idf-term-frequency-inverse-document-frequency/)
- [Content-Based Recommendation โ GFG](https://www.geeksforgeeks.org/ml-content-based-recommender-system/)
- [Java MySQL Integration โ YouTube](https://www.youtube.com/watch?v=T5Hey0e2Y_g)
- [NewsAPI Documentation](https://newsapi.org)
---
## Issues
Feel free to add any issues you find
---
## ๐จโ๐ Author
**Deshan Senanayake**