Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TravelPlanner

A JavaFX desktop application for planning trips: add destinations with transport and accommodation, schedule timed activities, and track a live countdown to what's coming up next.

Features

  • Destinations — add a destination with a means of transport (Car, Train, Plane, Bus) and accommodation
  • Activities — schedule activities with a name, time range, and location; automatically kept sorted by date and start time
  • Live countdown — a background thread updates the time remaining until the next activity every second
  • Route validation — checks that every destination has both transport and accommodation assigned before you consider the plan complete
  • JSON export/import — save a full trip plan to a JSON file, or load a previously saved one

Tech Stack

  • Java 21 + JavaFX 21 (Controls, FXML)
  • Maven, built and run via the javafx-maven-plugin
  • org.json for JSON serialization
  • JUnit 5 for unit testing

Prerequisites

  • JDK 21 (required by the JavaFX 21 dependency and the project's module setup)
  • No local Maven install needed — the project includes the Maven Wrapper

Running the app

# macOS/Linux
./mvnw clean javafx:run

# Windows
mvnw.cmd clean javafx:run

Testing

Unit tests cover TravelModel: destination, transport, and accommodation handling; activity sorting by date and time; route validation; and exception behavior for missing information (14 tests).

mvn test

Project Structure

src/main/java/org/travelplanner/
├── Launcher.java              # JVM entry point, delegates to JavaFX Application.launch
├── PlannerApplication.java    # JavaFX Application, loads the main FXML view
├── controller/
│   └── MainController.java    # Wires UI events to the model, drives the countdown label
├── model/
│   ├── TravelModel.java       # Core state: destinations, transport, accommodation, activities; JSON export/import
│   └── Activity.java          # A single scheduled activity (name, date, time range, location)
├── exceptions/
│   └── MissingInformationException.java  # Thrown when required trip data is missing
└── threads/
    └── NotificationThread.java  # Background thread computing time-remaining until the next activity

src/test/java/org/travelplanner/model/
└── TravelModelTest.java       # Unit tests for TravelModel
└── ActivityTest.java          # Unit tests for Activity

src/main/resources/org/travelplanner/
└── planner-view.fxml          # Main UI layout

About

A Java desktop application for planning and organizing trips, with data stored and managed in JSON.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages