An open API service indexing awesome lists of open source software.

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

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**