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.
- 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
- 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
- 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
# macOS/Linux
./mvnw clean javafx:run
# Windows
mvnw.cmd clean javafx:runUnit 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 testsrc/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