A modern, responsive, and lightweight To-Do Application built using Spring Boot, Thymeleaf, and MySQL. This application allows users to manage their daily tasks efficiently with a clean and intuitive user interface styled with Bootstrap 5.
- Create Tasks: Easily add new tasks to your list using a simple input field.
- Toggle Status: Mark tasks as completed or active with a single click (completed tasks are visually struck through and styled in gray).
- Delete Tasks: Remove tasks from the list permanently.
- Persistent Storage: All tasks are saved securely in a MySQL database.
- Responsive UI: Fully mobile-friendly layout powered by Bootstrap 5.
- Backend: Java 17, Spring Boot 3.5.15 (Spring MVC, Spring Data JPA)
- Frontend: Thymeleaf, Bootstrap 5.3.8 (CDN), Vanilla CSS
- Database: MySQL
- Developer Tools: Lombok, Maven
Before running the application, make sure you have the following installed:
- Java Development Kit (JDK) 17 or higher
- MySQL Server
- Maven (optional, as the Maven Wrapper is included)
Follow these steps to run the application locally:
Create a MySQL database named todo-app:
CREATE DATABASE `todo-app`;Open TODO-list-Project/src/main/resources/application.properties and update the datasource connection settings to match your MySQL environment:
spring.datasource.url=jdbc:mysql://localhost:3306/todo-app
spring.datasource.username=YOUR_MYSQL_USERNAME
spring.datasource.password=YOUR_MYSQL_PASSWORDNavigate to the project root directory (TODO-list-Project) and run the application.
- Windows (Command Prompt / PowerShell):
mvnw.cmd spring-boot:run
- Linux / macOS (Terminal):
./mvnw spring-boot:run
Alternatively, if you have Maven installed globally, you can run:
mvn spring-boot:runOnce the server starts successfully, open your web browser and navigate to:
http://localhost:8080
TODO-list-Project/
├── .mvn/ # Maven wrapper configuration
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/example/TODO/list/Project/
│ │ │ ├── Controller/
│ │ │ │ └── TaskController.java # Handles HTTP GET/POST endpoints
│ │ │ ├── Models/
│ │ │ │ └── Task.java # JPA Entity representing a task
│ │ │ ├── Repository/
│ │ │ │ └── TaskRepo.java # Spring Data JPA Repository
│ │ │ ├── Services/
│ │ │ │ └── TaskService.java # Contains business logic
│ │ │ └── TodoListProjectApplication.java # Application entrypoint
│ │ └── resources/
│ │ ├── templates/
│ │ │ └── tasks.html # Thymeleaf view template (Bootstrap 5)
│ │ └── application.properties # Spring Boot configurations
│ └── test/ # JUnit / Spring Boot tests
├── pom.xml # Maven dependencies and build settings
└── README.md # Project documentation