TaskMate is a console-based Task Management System built using Java, JDBC, and MySQL.
It allows users to add, view, update, and delete tasks with ease. The project uses PreparedStatement to prevent SQL Injection and ensure secure database interaction.
- β Add Task β Insert new tasks with title, description, and status (pending/completed).
- π View All Tasks β Display all tasks in a formatted table.
- π View Task by Status β Filter tasks by pending or completed.
- βοΈ Update Task β Modify task status or due date.
- β Delete Task β Remove tasks by ID.
- β User-Friendly CLI β Interactive console menu.
- Java (Core + JDBC)
- MySQL Database
- PreparedStatement (for SQL queries)
- Scanner API (for user input)
src
β
βββ dbbackend
β βββ TaskMateDBBackend.java # Handles database operations (CRUD)
βββ main
βββTaskMate.java # Main class (user interface / menu)
Before running the project, create a MySQL database and table.
CREATE DATABASE taskmate_db;
USE taskmate_db;
CREATE TABLE tasks (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(100) NOT NULL,
description VARCHAR(255),
status ENUM('pending','completed') DEFAULT 'pending',
due_date DATE DEFAULT CURDATE()
);- Clone the repository:
git clone https://github.com/your-username/TaskMate.git
cd TaskMate
-
Open project in your IDE (IntelliJ/Eclipse/VS Code).
-
Update DB credentials in TaskMateDBBackend.java:
private final String URL = "jdbc:mysql://localhost:3306/taskmate_db";
private final String USERNAME = "root";
private final String PASSWORD = "your-password";
-
Run TaskMate.java.
-
Use the menu to manage tasks:
=== Task Tracker ===
1. Add Task
2. View All Tasks
3. View Tasks by Status
4. Update Task
5. Delete Task
6. Exit
a) Add user authentication system.
b) Support task priority (Low/Medium/High).
c) Export tasks to CSV/Excel.
d) Create a Swing/JavaFX GUI or Web version using Spring Boot.
Tarun Soni Java Developer | Backend Enthusiast