Skip to content

fseckel-develop/app-todomaster-java-mvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‹ ToDoMaster - Office Tool for Task Management

Language Maven Architecture Tests CI

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

✨ Key Features

  • 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

πŸ“Έ Screenshots / Demonstration

Workspace Page

Workspace

Checklist Page in Card View

Checklist Cards

Checklist Page in Text View

Checklist Text


πŸš€ Running the Application

Requirements:

  • Java 17+
  • Maven

Build from Repository Root:

mvn clean package

Run from Repository Root:

mvn exec:java -Dexec.mainClass="Main"

πŸ— Architecture

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
Loading

UML Diagram

A detailed UML diagram illustrating the architecture is available at uml/class_diagram.png.

⚠️ Note: The UML may slightly differ from the latest refactoring (interface-based decoupling).

UML Diagram

Key Design Patterns

  • MVC – separation of UI, logic, and data
  • Observer Pattern – model changes update the UI automatically
  • Singleton Pattern – single global App instance
  • Factory-like UI composition – dynamic panel generation
  • Strategy-like sorting – different task sorting modes

πŸ—ƒοΈ Project Structure

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

πŸ’Ύ Data Persistence

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.


πŸ§ͺ Testing

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 input
  • MockAppNavigator β†’ captures navigation calls

Run tests:

mvn test

πŸ“– Documentation

Full API documentation is generated via:

mvn javadoc:javadoc

Then all documenting files are available under doc/apidocs/index.html.


🎯 What This Project Demonstrates

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.


πŸ™Œ Get Involved

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

Thanks for Visiting!

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! πŸš€

About

Desktop Task Manager implemented in Java Swing, demonstrating MVC architecture, design patterns, and JSON persistence.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages