Skip to content

πŸ“ŒA simple console-based Task Management System πŸ““ built with Java, JDBC, and MySQL using PreparedStatement for secure CRUD operations.

Notifications You must be signed in to change notification settings

starun0011/TaskMate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ TaskMate - JDBC Task Management System

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.


πŸš€ Features

  • βž• 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.

πŸ› οΈ Technologies Used

  • Java (Core + JDBC)
  • MySQL Database
  • PreparedStatement (for SQL queries)
  • Scanner API (for user input)

πŸ“‚ Project Structure

src
β”‚
β”œβ”€β”€ dbbackend
β”‚   β”œβ”€β”€ TaskMateDBBackend.java # Handles database operations (CRUD)
β”œβ”€β”€ main
    β”œβ”€β”€TaskMate.java # Main class (user interface / menu)

πŸ—„οΈ Database Setup

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()
);

▢️ How to Run

  1. Clone the repository:
git clone https://github.com/your-username/TaskMate.git
cd TaskMate
  1. Open project in your IDE (IntelliJ/Eclipse/VS Code).

  2. 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";
  1. Run TaskMate.java.

  2. 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

πŸ“Œ Future Improvements

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.


🀝 Contributing

Feel free to fork this repository and improve it. Pull requests are welcome!

πŸ‘¨β€πŸ’» Author

Tarun Soni Java Developer | Backend Enthusiast

About

πŸ“ŒA simple console-based Task Management System πŸ““ built with Java, JDBC, and MySQL using PreparedStatement for secure CRUD operations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages