A simple Todo application built with Spring Boot, allowing users to manage tasks via a web interface.
- Create, read, update, and delete (CRUD) tasks
- Web-based UI using Thymeleaf templates
- In-memory H2 database for data persistence
- RESTful API endpoints for task management
- Validation for task inputs
- Java 21 or higher
- Maven 3.6+ (or use the included Maven wrapper)
-
Clone the repository:
git clone https://github.com/PriyankaCoder1/Todo-application.git cd Todo-application
-
Build the project:
./mvnw clean install
Start the application using the Maven wrapper:
./mvnw spring-boot:run
The application will start on http://localhost:8081
.
- Open your browser and navigate to
http://localhost:8081/tasks
. - Use the web interface to add, edit, mark as completed, or delete tasks.
GET /tasks
- List all tasksGET /tasks/new
- Show form to create a new taskPOST /tasks
- Create a new taskGET /tasks/{id}/edit
- Show form to edit a taskPOST /tasks/{id}
- Update a taskPOST /tasks/{id}/delete
- Delete a task
- Backend: Spring Boot, Spring MVC, Spring Data JPA
- Frontend: Thymeleaf, HTML, CSS
- Database: H2 (in-memory)
- Build Tool: Maven
src/main/java/com/app/totoapp/
- Main application codecontroller/
- REST controllersmodels/
- Entity classesrepositories/
- Data access layerservices/
- Business logic
src/main/resources/
- Configuration and templatessrc/test/
- Unit tests
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
. - Commit your changes:
git commit -am 'Add feature'
. - Push to the branch:
git push origin feature-name
. - Submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.