ToDoApp is a simple task management application built with Java, Spring Boot, and React. It allows users to create, update, and manage their tasks efficiently. The application also provides metrics for task completion times.
- Create and update tasks
- Mark tasks as done or undone
- Filter and paginate tasks
- View metrics for task completion times
- Java
- Spring Boot
- Maven
- React
- NPM
- Java 17 or higher
- Maven 3.6.0 or higher
- Node.js 14 or higher
- NPM 6 or higher
-
Clone the repository:
git clone https://github.com/QuarkBS2/ToDoApp.git cd ToDoApp
-
Navigate to the backend directory:
cd ToDoListApp
-
Build the project using Maven:
mvn clean install
-
Run the Spring Boot application:
mvn spring-boot:run
-
Navigate to the frontend directory:
cd frontend
-
Install the dependencies:
npm install
-
Start the React application:
npm start
- GET /api/todos: Retrieve all todos with optional filters and pagination.
- POST /api/todos: Create a new todo.
- PUT /api/todos/{id}: Update an existing todo.
- POST /api/todos/{id}/done: Mark a todo as done.
- PUT /api/todos/{id}/undone: Mark a todo as undone.
- GET /api/todos/metrics: Retrieve todo metrics.
curl -X GET "http://localhost:8080/api/todos?page=1&size=10&sortBy=creationDate&directionPriority=ASC&directionDueDate=ASC"
curl -X POST "http://localhost:8080/api/todos" -H "Content-Type: application/json" -d '{
"text": "New Task",
"dueDate": "2023-12-31",
"priority": 2
}'
curl -X PUT "http://localhost:8080/api/todos/1" -H "Content-Type: application/json" -d '{
"text": "Updated Task",
"dueDate": "2023-12-31",
"priority": 1
}'
curl -X POST "http://localhost:8080/api/todos/1/done"
curl -X POST "http://localhost:8080/api/todos/1/undone"
curl -X GET "http://localhost:8080/api/todos/metrics"