TodoMaster is a desktop task management application built with Java Swing using a clean MVC architecture and several classic design patterns. It allows users to organise tasks into checklists, manage priorities and deadlines, and persist data between sessions using JSON storage.
The project demonstrates:
- object-oriented design
- decoupled MVC architecture
- testable controller design
- reactive UI updates via the Observer pattern
- Workspace containing multiple checklists
- Task management with:
- title and description
- priority (
HIGH/MEDIUM/LOW) - optional deadline
- completion status
- Task sorting by:
- importance
- deadline
- priority
- creation date
- lexicographic order
- Two UI display modes:
- Card view
- Flowing text view
- Automatic data persistence using JSON
- Auto-save on application exit
- Unit-tested controller and model logic
Requirements:
- Java 17+
- Maven
Build from Repository Root:
mvn clean packageRun from Repository Root:
mvn exec:java -Dexec.mainClass="Main"The application follows a ModelβViewβController (MVC) architecture.
graph LR
View["View (Swing UI)"]
Controller["Controller<br/>(AppContoller, PageControllers)"]
Model["Model<br/>(Workspace, Checklist, Task)"]
View -->|user input| Controller
Controller -->|updates state| Model
Model -->|notifies observers| View
A detailed UML diagram illustrating the architecture is available at uml/class_diagram.png.
- MVC β separation of UI, logic, and data
- Observer Pattern β model changes update the UI automatically
- Singleton Pattern β single global
Appinstance - Factory-like UI composition β dynamic panel generation
- Strategy-like sorting β different task sorting modes
src
β
βββ main/java
β β
β βββ App.java β Composition root (application wiring)
β βββ Main.java β Entry point
β β
β βββ controller/
β β βββ AppController β Navigation implementation
β β βββ WorkspacePageController
β β βββ ChecklistPageController
β β βββ contracts/ β Controller abstractions
β β βββ IAppNavigator
β β βββ IUserDialogService
β β βββ IWorkspacePageListener
β β βββ IChecklistPageListener
β β
β βββ model/ β Core domain logic
β β βββ Workspace
β β βββ Checklist
β β βββ Task
β β βββ AbstractData
β β βββ AbstractCollection
β β
β βββ view/ β UI components (Swing)
β β βββ pages/
β β βββ panels/
β β βββ dialogs/
β β βββ controls/
β β
β βββ auxiliaries/ β Utilities
β β βββ JsonFileStorage
β β βββ TaskSorter
β β βββ FontLoader
β β
β βββ resources/
β βββ data/exemplary.json
β βββ fonts/
β
βββ test/java
β β
β βββ controller/ β Controller unit tests
β β βββ ChecklistPageControllerTests
β β βββ WorkspacePageControllerTests
β β βββ FakeDialogService β Test double for dialogs
β β βββ FakeAppNavigator β Test double for navigation
β β
β βββ model/ β Model tests
β βββ auxiliaries/ β Utility tests
β βββ view/ β View logic tests
Additional directories:
doc/ β generated Javadoc documentation
uml/ β UML diagram for the project
Application data is automatically saved to ~/toDoMaster-data.json. If no data file exists on startup, the application loads an example workspace from the bundled resource src/main/resources/data/exemplary.json.
The project includes a unit test suite built with JUnit 5.
What is tested:
- Model logic (Workspace, Checklist, Task)
- Sorting logic (TaskSorter)
- Controller behavior:
- checklist operations
- workspace interactions
- navigation triggers
- View interaction logic via listener abstractions
Instead of mocking complex UI-heavy classes, the project uses:
MockDialogServiceβ simulates user inputMockAppNavigatorβ captures navigation calls
Run tests:
mvn testFull API documentation is generated via:
mvn javadoc:javadocThen all documenting files are available under doc/apidocs/index.html.
This project showcases:
- Clean object-oriented design
- MVC architecture in desktop applications
- Observer pattern for reactive UI updates
- Swing UI component composition
- JSON-based persistence
- Separation of domain model, UI, and controllers
- Modular and maintainable project structure
It serves as a portfolio project demonstrating practical software engineering principles and architectural patterns in Java desktop application development.
Feel free to:
- Clone or fork the repository
- Explore the codebase and project architecture
- Study the implemented design patterns
- Extend the application with new features
- Use the project as inspiration for your own Java Swing or MVC-based applications
I hope this project serves both as a learning resource and a demonstration of practical software engineering concepts such as MVC architecture, design patterns, and clean application structure.
Happy coding! π



