Skip to content

kutaybalta/University_Portal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

University Portal (Menu + Bus Schedule)

A small Spring Boot app that aggregates a university dining menu and campus shuttle schedules, stores them in an in-memory database, and serves HTML fragments consumed by an HTMX + Bootstrap frontend.

Features

  • Scrapes the weekly menu (normal + vegan) from the university website.
  • Calls a SOAP API for bus schedules.
  • Normalizes and stores data in H2 on startup.
  • Serves HTML table fragments for HTMX swaps.
  • Dockerized runtime.

Tech Stack

  • Java 17
  • Spring Boot (Web, JPA)
  • H2 in-memory database
  • Jsoup (HTML parsing)
  • Java XML + XPath (SOAP parsing)
  • HTMX + Bootstrap (UI)

Architecture

Layered design:

  • Controller: HTTP endpoints returning HTML fragments
  • Service: integration logic (scraping, SOAP calls, parsing)
  • Repository: persistence via Spring Data JPA
  • Entity: Menu, BusRoute

Endpoints

  • GET /index.html → UI page
  • GET /menu/{isVegan} → menu table (normal/vegan)
  • GET /busTable/{departureFrom} → bus schedule table (kavacik or tau)

How It Works

  1. On startup, @PostConstruct in services fetches menu + bus data.
  2. External HTML/SOAP responses are parsed into domain entities.
  3. Data is saved to H2 for fast reads.
  4. HTMX requests HTML fragments to update tables without a full page reload.

Local Run (Maven)

Build the jar and run it:

mvn clean package
java -jar target/*.jar

Then open:

  • http://localhost:8080/index.html

Docker Run

Build and run the container:

docker build -t tau-portal-demo .
docker run -p 8080:8080 tau-portal-demo

Then open:

  • http://localhost:8080/index.html

Notes

  • The app uses H2 in-memory DB, so data resets on restart.
  • External data sources must be reachable at startup.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors