A simple task management application with a Java Spring Boot backend and React frontend.
- Create, read, update, and delete tasks
- Mark tasks as completed
- Filter tasks by status (all, active, completed)
- Set task priority (low, medium, high)
- Set due dates for tasks
- Java 17
- Spring Boot 3.1.0
- Spring Data JPA
- H2 Database (in-memory)
- Maven
- React 18
- Axios for API calls
- CSS for styling
task-manager/
├── backend/ # Java Spring Boot backend
│ ├── src/
│ │ ├── main/
│ │ │ ├── java/com/example/taskmanager/
│ │ │ │ ├── controller/ # REST API controllers
│ │ │ │ ├── model/ # Entity classes
│ │ │ │ ├── repository/ # Data access layer
│ │ │ │ ├── service/ # Business logic
│ │ │ │ └── TaskManagerApplication.java
│ │ │ └── resources/
│ │ │ └── application.properties
│ └── pom.xml # Maven configuration
└── frontend/ # React frontend
├── public/ # Static files
├── src/
│ ├── components/ # React components
│ ├── services/ # API service layer
│ ├── App.js # Main application component
│ └── index.js # Entry point
└── package.json # npm configuration
- Java 17 or higher
- Node.js and npm
- Maven
-
Navigate to the backend directory:
cd backend
-
Build and run the Spring Boot application:
mvn spring-boot:run
-
The backend will start on http://localhost:8080
-
Navigate to the frontend directory:
cd frontend
-
Install dependencies:
npm install
-
Start the React development server:
npm start
-
The frontend will start on http://localhost:3000
GET /api/tasks
- Get all tasksGET /api/tasks?completed=true|false
- Get tasks by completion statusGET /api/tasks/{id}
- Get a specific taskPOST /api/tasks
- Create a new taskPUT /api/tasks/{id}
- Update a taskPATCH /api/tasks/{id}/toggle
- Toggle task completion statusDELETE /api/tasks/{id}
- Delete a task