Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Task Tracker

A desktop task management application built with JavaFX, SQLite, and Maven following an MVC architecture pattern.


Table of Contents


Overview

Task Tracker is a single-user desktop application for managing personal tasks. Users can create, edit, delete, and filter tasks by status. Tasks are automatically derived as Pending, Complete, or Overdue based on their due date and completion state. All data is persisted locally in a SQLite database.

Tech stack:

Technology Version Purpose
Java 21 Runtime and language
JavaFX 21.0.4 Desktop UI framework
SQLite (Xerial JDBC) 3.45.3.0 Local data persistence
Maven 3.8+ Build and dependency management
CSS UI styling via JavaFX CSS

Prerequisites

Before running or developing the project, ensure you have the following installed:

  • Java 21+
  • Maven 3.8+
  • IntelliJ IDEA (recommended) — Community or Ultimate edition

JavaFX and SQLite are pulled in automatically by Maven. No additional installation is required for either.


Getting Started

Clone the repository

git clone https://github.com/jennabeachcodes/TaskTracker.git
cd TaskTracker

Run in development mode

mvn clean javafx:run

The application will launch and automatically create a tasks.db SQLite database file in the working directory on first run.

Run from IntelliJ IDEA

  1. Open IntelliJ and select File → Open and choose the project root.
  2. Wait for Maven to resolve dependencies.
  3. Open src/main/java/com/tasktracker/Main.java.
  4. Click the green Run button or press Shift+F10.

Project Structure

TaskTracker/
├── src/
│   └── main/
│       ├── java/
│       │   └── com/tasktracker/
│       │       ├── Main.java                  # Application entry point
│       │       ├── controller/
│       │       │   └── TaskController.java    # Handles UI actions
│       │       ├── dao/
│       │       │   ├── TaskDAO.java           # DAO interface
│       │       │   └── TaskDAOImpl.java       # SQLite implementation
│       │       ├── model/
│       │       │   └── Task.java              # Task entity
│       │       ├── service/
│       │       │   └── TaskService.java       # Business logic
│       │       └── view/
│       │           └── TaskView.java          # JavaFX UI
│       └── resources/
│           └── style.css                      # Application stylesheet
├── pom.xml                                    # Maven build configuration
├── tasks.db                                   # SQLite database (auto-created)
└── README.md

Architecture

The application follows a five-layer MVC architecture. Each layer has a single responsibility and only communicates with the layer directly below it.

┌─────────────────────────────────┐
│         TaskView.java           │  ← Presentation layer (JavaFX UI)
└────────────────┬────────────────┘
                 │ delegates to
┌────────────────▼────────────────┐
│       TaskController.java       │  ← Controller layer
└────────────────┬────────────────┘
                 │ delegates to
┌────────────────▼────────────────┐
│        TaskService.java         │  ← Service layer (business logic)
└────────────────┬────────────────┘
                 │ persists via
┌────────────────▼────────────────┐
│   TaskDAO (interface)           │  ← Data access layer
│   TaskDAOImpl (SQLite/JDBC)     │
└────────────────┬────────────────┘
                 │ reads/writes
┌────────────────▼────────────────┐
│           tasks.db              │  ← SQLite database
└─────────────────────────────────┘

         Task.java (model) is passed between all layers

Layer Responsibilities

Layer Class Responsibility
Presentation TaskView Builds the JavaFX scene graph, binds data to the ObservableList, fires controller methods on user actions. All UI logic lives here.
Controller TaskController Receives calls from the view, delegates to the service, then calls view.setTasks() to refresh the UI. No business logic.
Service TaskService Validates input, enforces business rules (e.g. title cannot be blank), delegates persistence to the DAO. No SQL, no UI.
Data Access TaskDAO / TaskDAOImpl All SQL statements live here. The service depends on the TaskDAO interface, not the implementation, allowing the database to be swapped without touching other layers.
Model Task Plain data object passed between all layers. Derives getStatus() at runtime from isComplete and dueDate vs today's date.

Database Schema

The database is created automatically on first launch. The schema is as follows:

CREATE TABLE IF NOT EXISTS tasks (
    id          INTEGER PRIMARY KEY AUTOINCREMENT,
    title       TEXT    NOT NULL,
    description TEXT,
    dueDate     TEXT,               -- stored as ISO-8601 string: YYYY-MM-DD
    isComplete  INTEGER DEFAULT 0   -- 0 = false, 1 = true
);

Note: Task status (Pending / Complete / Overdue) is not stored in the database. It is derived at runtime in Task.getStatus() by comparing dueDate against LocalDate.now().


Key Dependencies

All dependencies are declared in pom.xml and resolved automatically by Maven.

<!-- JavaFX UI framework -->
<dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-controls</artifactId>
    <version>21.0.4</version>
</dependency>

<!-- JavaFX FXML support -->
<dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-fxml</artifactId>
    <version>21.0.4</version>
</dependency>

<!-- SQLite JDBC driver (Xerial) -->
<dependency>
    <groupId>org.xerial</groupId>
    <artifactId>sqlite-jdbc</artifactId>
    <version>3.45.3.0</version>
</dependency>

Building and Running

Command Description
mvn clean javafx:run Run the application in development mode
mvn clean package Build a fat JAR to target/TaskTracker-1.0-SNAPSHOT.jar
java -jar target/TaskTracker-1.0-SNAPSHOT.jar Run the built JAR directly

Building the fat JAR

The maven-shade-plugin is configured in pom.xml to bundle all dependencies into a single executable JAR. Run:

mvn clean package
java -jar target/TaskTracker-1.0-SNAPSHOT.jar

JavaFX note: JavaFX native libraries cannot be fully shaded into the JAR. The target machine must have JavaFX installed, or the module path must be provided explicitly:

java --module-path /path/to/javafx-sdk/lib \
     --add-modules javafx.controls,javafx.fxml \
     -jar target/TaskTracker-1.0-SNAPSHOT.jar

Adding a New Feature

Follow this checklist when extending the application to keep the layer boundaries intact:

  1. Task.java — Add the new field, getter, setter, and update the constructor if needed.
  2. TaskDAOImpl.java — Update the CREATE TABLE SQL and all relevant INSERT, UPDATE, SELECT statements.
  3. TaskDAO.java — Add any new method signatures to the interface.
  4. TaskService.java — Add validation or business logic for the new field.
  5. TaskController.java — Add a method that calls the service and triggers a view refresh.
  6. TaskView.java — Add the UI element and wire its action to the controller method.
  7. style.css — Add styles for any new UI elements.

Rule: Never add SQL to TaskService or TaskController. Never add business logic or UI code to TaskDAOImpl. The layer boundaries are the architecture — crossing them breaks the MVC pattern.


Known Issues

ID Severity Description Workaround
BUG-01 Medium Window can be resized smaller than the form, causing overlap Avoid resizing below ~800×500px
BUG-02 Medium tasks.db is created in the working directory, which varies by launch method Launch from a consistent directory
BUG-03 Low Red border on title field persists briefly when reopening the edit dialog Re-type the title to clear it
BUG-04 Low Stats bar does not update when the status filter changes Change the filter twice to force a refresh
BUG-05 Low Editing a task does not preserve its isComplete state Re-toggle after editing if needed
BUG-06 Low Row colour highlight may be overridden on selected overdue rows Expected — selection style takes priority

Roadmap

v1.1 — Quality of life

  • Task priorities (Low / Medium / High)
  • Column sorting by clicking table headers
  • Keyboard shortcuts (Ctrl+N, Delete, Ctrl+E)
  • Persist window size between sessions
  • Double-click a row to open the edit dialog

v1.2 — Feature expansion

  • Task categories / tags
  • Due date reminder dialog on launch
  • Live search bar
  • Dark mode toggle
  • Export task list to CSV

v2.0 — Platform upgrades

  • Multi-user support with PostgreSQL
  • Cloud sync (Google Drive / Dropbox)
  • Recurring tasks
  • OS system tray notifications
  • REST API mode via Spring Boot

Licence

This project is provided for educational purposes only as part of the course 26W-CST8411 - Information Systems Development and Deployment at Algonquin College, Ottawa, ON, Canada.

About

JavaFX desktop task manager with SQLite persistence. Built with Maven following an MVC pattern across View, Controller, Service, and DAO layers.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages