A full-stack Todo application built with Spring Boot and React that enables users to manage their tasks efficiently with features like task prioritization, status tracking, and due date management.
- Features
- Tech Stack
- Prerequisites
- Project Structure
- Installation & Setup
- Database Configuration
- Running the Application
- API Documentation
- Contributing
- User registration and authentication
- Secure login system
- User profile management
- Email-based user identification
- Create, read, update, and delete tasks
- Task attributes:
- Title and Description
- Priority levels (High, Medium, Low)
- Status tracking (Open, In Progress, Closed)
- Due date with formatted date display
- Filter tasks by status
- Sort tasks by various criteria
- User-specific task views
- Close/Complete tasks
- Modern and responsive design with Ant Design
- Interactive modals for task creation and editing
- Task card view for better visualization
- Intuitive task management interface
- React Router for seamless navigation
- Java 17
- Spring Boot 3.3.0
- Spring Boot Starter Web
- Spring Boot Starter Data JPA
- Spring Boot Starter Test
- PostgreSQL - Relational database
- Maven - Dependency management and build tool
- React 18.3.1
- React Router DOM 6.23.1 - Client-side routing
- Ant Design (antd) 5.17.4 - UI component library
- Day.js 1.11.11 - Date manipulation
- React Icons 5.2.1 - Icon library
- React Scripts 5.0.1 - Build tooling
Before running this application, ensure you have the following installed:
- Java Development Kit (JDK) 17 or higher
- Apache Maven 3.6+
- Node.js 14+ and npm
- PostgreSQL 12+
- Git (for cloning the repository)
Todo-Application/
βββ todo/ # Backend (Spring Boot)
β βββ src/
β β βββ main/
β β β βββ java/
β β β β βββ com/inamul/todo/
β β β β βββ controller/
β β β β β βββ TaskController.java
β β β β β βββ UserController.java
β β β β βββ model/
β β β β β βββ Task.java
β β β β β βββ User.java
β β β β βββ repository/
β β β β β βββ TaskRepository.java
β β β β β βββ UserRepository.java
β β β β βββ service/
β β β β β βββ TaskService.java
β β β β β βββ UserService.java
β β β β βββ TodoBackendAppApplication.java
β β β βββ resources/
β β β βββ application.properties
β β βββ test/
β βββ pom.xml
β βββ mvnw
β βββ mvnw.cmd
β
βββ todo-frontend/ # Frontend (React)
βββ public/
β βββ index.html
β βββ manifest.json
β βββ robots.txt
βββ src/
β βββ components/
β β βββ EditTaskModal.js
β β βββ NewTaskModal.js
β β βββ SelectWithLabel.js
β β βββ TaskCard.js
β β βββ TaskCardModal.js
β β βββ TaskView.js
β βββ modules/
β β βββ Home.js
β β βββ Login.js
β βββ App.js
β βββ index.js
βββ package.json
βββ README.md
git clone <repository-url>
cd Todo-Application-- Connect to PostgreSQL
psql -U postgres
-- Create database
CREATE DATABASE todoapp;
-- Create user (if needed)
CREATE USER your_username WITH PASSWORD 'your_password';
-- Grant privileges
GRANT ALL PRIVILEGES ON DATABASE todoapp TO your_username;Edit todo/src/main/resources/application.properties:
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:postgresql://localhost:5432/todoapp
spring.datasource.username=your_username
spring.datasource.password=your_password
spring.datasource.driver-class-name=org.postgresql.DriverNote: Replace your_username and your_password with your actual PostgreSQL credentials.
# Navigate to backend directory
cd todo
# Clean and build the project
./mvnw clean install
# Or on Windows
mvnw.cmd clean install# Navigate to frontend directory
cd todo-frontend
# Install dependencies
npm install# From the todo directory
./mvnw spring-boot:run
# Or on Windows
mvnw.cmd spring-boot:runThe backend server will start on http://localhost:8080
# From the todo-frontend directory
npm startThe frontend application will open automatically at http://localhost:3000
| Method | Endpoint | Description | Request Body |
|---|---|---|---|
| GET | /user/get-all-users |
Get all users | - |
| GET | /user/{userId} |
Get user by ID | - |
| POST | /user/insert-user |
Create new user | User object |
| PUT | /user/update-user/{userId} |
Update user | User object |
| DELETE | /user/delete-user/{userId} |
Delete user | - |
| POST | /user/login |
User login | Credentials |
{
"userId": 1,
"email": "user@example.com",
"name": "John Doe",
"password": "password123"
}| Method | Endpoint | Description | Request Parameters |
|---|---|---|---|
| GET | /task/get-all-tasks |
Get all tasks | - |
| GET | /task/get-tasks-with-user-id/{userId} |
Get user tasks filtered & sorted | sortType, filterType |
| GET | /task/get-task/{taskId} |
Get task by ID | - |
| POST | /task/insert-task |
Create new task | Task object, userId |
| PUT | /task/update-task/{taskId} |
Update task | Task object |
| PUT | /task/close-task/{taskId} |
Close/Complete task | - |
| DELETE | /task/delete-task/{taskId} |
Delete task | - |
{
"taskId": 1,
"title": "Complete project documentation",
"description": "Write comprehensive README file",
"priority": "high",
"status": "open",
"dueDate": "25/12/2026",
"user": {
"userId": 1
}
}- Priority:
high,medium,low - Status:
open,in-progress,closed - Due Date Format:
DD/MM/YYYY
The backend is configured to accept requests from http://localhost:3000 by default. To modify this, update the @CrossOrigin annotation in the controller classes.
cd todo
./mvnw testcd todo-frontend
npm testImportant: This application is designed for development and learning purposes. Before deploying to production, consider implementing:
- Password encryption (BCrypt, Argon2)
- JWT-based authentication
- Input validation and sanitization
- SQL injection prevention (already handled by JPA)
- HTTPS/TLS encryption
- Rate limiting
- CORS policy refinement
- Environment-based configuration
- Secure session management
- Responsive Design: Works seamlessly on desktop and mobile devices
- Component-Based Architecture: Reusable React components
- Modal Interactions: Create and edit tasks through modal dialogs
- Visual Feedback: Loading states and error handling
- Routing: Separate pages for login and home/dashboard
- The backend uses JPA with Hibernate for ORM
- Database schema is auto-updated based on entity changes
- PostgreSQL is used for persistent storage
- The frontend uses functional React components with hooks
- Ant Design provides a consistent UI/UX
- Date formatting is handled using Day.js library
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available under the MIT License.
Mohammad Inamul Hassan
For support, email or open an issue in the repository.
Happy Task Managing! πβ