A simple Todo application built with Java, Spring Boot, and Maven. This application allows users to manage tasks, including creating, updating, deleting, and searching tasks. Tasks can also be associated with tags for better organization.
- CRUD Operations: Create, read, update, and delete tasks.
- Tag Management: Associate tasks with tags.
- Search Functionality: Search tasks by title or completion status.
- RESTful API: Exposes endpoints for interacting with tasks and tags.
- Validation: Ensures required fields are provided when creating or updating tasks.
- Java: Programming language.
- Spring Boot: Framework for building the application.
- Maven: Dependency management and build tool.
- Jakarta Persistence API (JPA): For database interaction.
- Jakarta Validation: For input validation.
- Lombok: To reduce boilerplate code.
- H2 Database: In-memory database for development and testing.
- Clone the repository:
git clone https://github.com/berkaygunduz/todo-app.git cd todo-app - Ensure you have Java JDK 17 or later installed.
- Build the project using Maven:
mvn clean install
- Run the application:
mvn spring-boot:run
- Access the application at
http://localhost:8080. - Use tools like Postman or cURL to interact with the RESTful API endpoints.
- For example, to create a new task, send a POST request to
http://localhost:8080/api/taskswith a JSON body containing the task details. - To view all tasks, send a GET request to
http://localhost:8080/api/tasks.
- GET
/api/tasks: Retrieve all tasks. - GET
/api/tasks/{id}: Retrieve a specific task by ID. - POST
/api/tasks: Create a new task. - PUT
/api/tasks/{id}: Update an existing task by ID. - DELETE
/api/tasks/{id}: Delete a task by ID. - GET
/api/tasks/search: Search tasks by title or completion status.
Tags are managed automatically when creating tasks with the tags field in the TaskDTO. Tags are provided as a comma-separated string.
{
"title": "Complete project documentation",
"description": "Write and review the project documentation",
"completed": false,
"tags": "documentation,project"
}Contributions are welcome! If you find a bug or have a feature request, please open an issue. You can also submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.