Skip to content

JuliaTrumpp/vipepress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌍 News Insights Web Application - VibePress

A reactive web application that lets you explore the latest news articles, view detailed article information with related reddit posts and save your favorite articles and sources.


πŸ“š Outline


Features

General Features

  • View top headlines from your country.
  • Search for articles using a custom query.
  • Explore:

Article Detail Pages

  • Article information.
  • Related Reddit Posts.
  • Sentiment analysis visualized with pie charts.

User Account Page

  • View your saved articles.
  • View your favorite sources.

Demo Video

To take a look at the current state of the project, you can follow this link to a demo video. https://my.hidrive.com/share/u9t05xiqy2 Info: This project does not focus on the frontend and it is also still in progress.


Technologies Used

Backend

  • Spring Boot with Kotlin.
  • Spring WebFlux for reactive, non-blocking programming.
  • R2DBC for working with the database reactively.
  • Flyway for database migrations.
  • Docker for containerized database management.

Database

  • R2DBC database with ReactiveCrudRepository for seamless reactive interactions.

APIs

Frontend

  • Thymeleaf templates for dynamic HTML rendering.
  • CSS for styling.

Application Architecture

Overview

This project is a reactive Spring Boot application that integrates multiple APIs and services to deliver a seamless user experience. The backend handles API calls, sentiment analysis, and database interactions, while the frontend renders the content dynamically.

Key Modules

  1. Controller Layer:
    • Handles HTTP requests, routes, and prepares data for views by delegating logic to services.
  2. Service Layer:
    • API Services: Manage interactions with external APIs like NewsAPI, RedditAPI, and Google Natural Language API.
    • Database Services: Handle application logic for database entities and interact with repositories.
  3. Repository Layer:
    • Communicates with the R2DBC database reactively.

Database Structure

The database consists of the following tables:

  • ARTICLE: Stores articles with title, author, content, and sentiment attributes.
  • REDDIT_POST: Contains Reddit posts with link, title, content, and sentiment attributes.
  • REDDIT_COMMENT: Contains Reddit Comments with content and sentiment attributes.
  • PROJECT_USER: Tracks users and their preferred sources.
  • COUNTRY: Stores country information and associated sources.
  • ARTICLE_REDDIT_POST: Links articles to Reddit posts.
  • USER_SAVED_ARTICLE: Saves articles that are bookmarked by users.
  • COUNTRY_ARTICLE: Links articles to countries.

How to Run

Prerequisites

  • Java 17 or higher (tested with Java 21).
  • Docker installed and running.
  • Kotlin setup.

Steps

  1. Clone the repository:
    git clone https://github.com/JuliaTrumpp/vipepress.git  
    cd article.analysis  
  2. Start the database with Docker:
    docker-compose up -d
  3. Build and run the application:
    ./gradlew bootRun  
  4. Access the application in your browser:
    http://localhost:8080  
    

Endpoints

Public Endpoints

  • Home Page: /
    • Displays top headlines, option to search articles by query + menu bar options.
  • Article Detail Page: /article/{article-id}
    • Displays article details, Reddit posts, and sentiment pie charts.
  • Account Account: /account/{name}
    • Displays saved articles and favorite sources.

Testing

Unit Tests

Service layer are covered with unit tests to ensure functionality.

Folder Structure

  ```bash 
src/
β”œβ”€β”€ main/
β”‚   β”œβ”€β”€ kotlin/
β”‚   β”‚   └── com.stacs.article.analysis/
β”‚   β”‚       β”œβ”€β”€ backend/
β”‚   β”‚       β”‚   β”œβ”€β”€ apis/
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ ArticleApiDataClasses.kt
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ ...
β”‚   β”‚       β”‚   β”œβ”€β”€ Article/
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ Article.kt
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ ArticleRepository.kt
β”‚   β”‚       β”‚   β”‚   └── ArticleService.kt
β”‚   β”‚       β”‚   └── ...
β”‚   β”‚       β”‚   
β”‚   β”‚       β”œβ”€β”€ frontend_controller/
β”‚   β”‚       β”‚   β”œβ”€β”€ AccountPageController.kt
β”‚   β”‚       β”‚   β”œβ”€β”€ ...
β”‚   β”‚       β”œβ”€β”€ libarys/
β”‚   β”‚       β”‚   └── UsefullFunctionsLibrary.kt
β”‚   β”‚       └── Application.kt
β”‚   β”œβ”€β”€ resources/
β”‚   β”‚   β”œβ”€β”€ db.migration/
β”‚   β”‚   β”‚   └── V1_initial_setup.sql
β”‚   β”‚   β”œβ”€β”€ static/
β”‚   β”‚   β”‚   β”œβ”€β”€ styles_account.css
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€templates/
β”‚   β”‚   β”‚   β”œβ”€β”€ account.html
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   └── application.properties
└── test/
    └── same structure as main for tests

Future Enhancements

  • Sentiment analysis with Google Language Api
  • Graphs
    • to visualize articles (by category, length, source, number of quotes on reddit(?))
    • the article's and post's sentiment
  • Country detail page:
    • information and filter articles by category, language, date or source + sort them
    • average sentiment of articles + in country's subreddit
  • Country comparison
    • comparison of Reddit (country's subreddits) and article sentiments (also by category)
    • number of articles (top headlines) + other statistics
  • Save source on article page and account page
  • Sources detail page:
    • list of last articles, which language/ country
  • Possibility to delete articles/ other data base entries

Contributors

Julia Trumpp

About

(on hold) Spring Boot project with kotlin, r2dbc data base, Reddit api and NewsApi (Solo project)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •