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.
- ✅ 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 Login
- 👥 View & Delete Registered Users
- 🌐 Activate NewsAPI to fetch new articles
- 💾 Store Fetched Articles in the database
- 📊 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
+-----------------------------+
| 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) |
+-----------------------------+
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 |
-
Clone the repository:
git clone https://github.com/yourusername/headlines-plus.git
-
Open Project in IntelliJ IDEA (or any Java IDE with JavaFX support)
-
Set Up Database:
- Create a MySQL database named:
news_appdb
- Use the provided DB dump to restore tables:
users
,articles
,user_preferences
, etc.
- Create a MySQL database named:
-
Insert Your API Key:
- Get a free key from NewsAPI.org
- Paste it in
APIService.java
-
Run the Application:
- Start from
Main.java
- Explore features: Register → Browse → Interact → Get Recommendations!
- Start from
- TF-IDF Explained – GeeksforGeeks
- Content-Based Recommendation – GFG
- Java MySQL Integration – YouTube
- NewsAPI Documentation
Deshan Senanayake