Skip to content

ShiningPr1sm/java-todolist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple To-Do List Application

This is a small, beginner-friendly project developed using Java Spring Boot to showcase my fundamental skills in building RESTful APIs and integrating them with a simple web frontend. The application provides basic CRUD (Create, Read, Update, Delete) functionality for managing a list of tasks.

🚀 Features

  • Add Tasks: Easily add new tasks with a title and an optional description.
  • View Tasks: Display all tasks in a list.
  • Mark as Completed: Toggle the completion status of a task.
  • Edit Tasks: Update the title and description of existing tasks.
  • Delete Tasks: Remove tasks from the list.
  • Filter Tasks: Filter tasks by "All", "Active", or "Completed" status.
  • Responsive UI: A simple, responsive user interface built with plain HTML, CSS, and JavaScript.

🛠️ Technologies Used

Backend

  • Java 17+
  • Spring Boot 3.2.0: For rapid application development.
  • Spring Data JPA: For database interaction and ORM.
  • Spring Web: For building RESTful endpoints.
  • H2 Database: An in-memory/file-based database for development and easy setup.
  • Lombok: To reduce boilerplate code (getters, setters, constructors).

Frontend

  • HTML5
  • CSS3
  • JavaScript (ES6+)

📸 Screenshot

image

📂 Project Structure

The project follows a standard Spring Boot application structure:

todolist
├── src
│ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ └── shiningpr1sm
│ │ │ └── todolist
│ │ │ ├── TodoListApplication.java (Main Spring Boot entry point)
│ │ │ ├── controller
│ │ │ │ └── TaskController.java (RESTful API endpoints)
│ │ │ ├── model
│ │ │ │ └── Task.java (JPA Entity for tasks)
│ │ │ ├── repository
│ │ │ │ └── TaskRepository.java (Spring Data JPA repository)
│ │ │ └── service
│ │ │ └── TaskService.java (Business logic for tasks)
│ │ └── resources
│ │ ├── application.properties (Application configuration)
│ │ └── static
│ │ └── index.html (Frontend UI)
└── pom.xml (Maven Project Object Model)

🚀 Getting Started

To get a local copy up and running, follow these simple steps.

Prerequisites

  • Java Development Kit (JDK) 17 or higher
  • Maven (usually bundled with IDEs like IntelliJ IDEA, or can be installed separately)
  • A preferred IDE (e.g., IntelliJ IDEA, VS Code with Java extensions, Eclipse)

Installation

  1. Clone the repository:

    git clone https://github.com/ShiningPr1sm/java-todolist.git
    cd java-todolist
  2. Build the project with Maven:

    ./mvnw clean install

    This command will download all necessary dependencies and compile the project.

Running the Application

  1. Run the Spring Boot application:

    ./mvnw spring-boot:run

    The application will start on port 8080 by default.

  2. Access the application: Open your web browser and navigate to:

    http://localhost:8080
    

    You will see the To-Do List interface.

📋 API Endpoints

The backend provides the following RESTful API endpoints:

  • GET /tasks: Retrieve all tasks.
  • GET /tasks/{id}: Retrieve a specific task by ID.
  • POST /tasks: Create a new task.
    • Request Body: {"title": "Task Title", "description": "Task Description"}
  • PUT /tasks/{id}: Update an existing task.
    • Request Body: {"title": "New Title", "description": "New Description", "completed": true}
  • DELETE /tasks/{id}: Delete a task by ID.

About

Java Spring Boot TODO List. Used CRUD method, fine design and good for beginners.

Topics

Resources

Stars

Watchers

Forks