A fullstack Todo management application built with React (frontend) and Spring Boot (backend), using MySQL as the database. The app exposes RESTful APIs with Spring Data JPA and includes JWT authentication & authorization for secure access.
- π User registration & login with JWT authentication
- β Create, read, update, and delete (CRUD) todos
- π₯ Role-based access control (Admin/User)
- π RESTful APIs for backend communication
- π¨ Responsive React UI for managing todos
- πΎ Persistent storage with MySQL via JPA/Hibernate
- Frontend: React, Axios, Bootstrap/Material UI
- Backend: Spring Boot, Spring Security, JPA/Hibernate
- Database: MySQL
- API: RESTful endpoints
- Auth: JWT-based authentication
todo-app/
β
βββ backend/ # Spring Boot application
β βββ src/main/java/... # Controllers, Services, Repositories
β βββ src/main/resources/ # application.properties
β βββ pom.xml # Maven dependencies
β
βββ frontend/ # React application
β βββ src/ # Components, Pages, Services
β βββ public/ # Static assets
β βββ package.json # NPM dependencies
β
βββ database/ # MySQL schema & migration scripts
- Navigate to the
backend/folder - Configure
application.propertieswith your MySQL credentials:spring.datasource.url=jdbc:mysql://localhost:3306/todo_db spring.datasource.username=root spring.datasource.password=yourpassword spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true jwt.secret=yourSecretKey
- Run the backend:
mvn spring-boot:run
- Navigate to the
frontend/folder - Install dependencies:
npm install
- Start the frontend:
npm start
- Access the app at: http://localhost:3000
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register new user |
| POST | /api/auth/login |
Login & get JWT token |
| GET | /api/todos |
Get all todos (user) |
| POST | /api/todos |
Create new todo |
| PUT | /api/todos/{id} |
Update todo by ID |
| DELETE | /api/todos/{id} |
Delete todo by ID |
- Uses JWT tokens for secure API access
- Token must be included in the
Authorizationheader:Authorization: Bearer <your_token>
- Fork the repository
- Create a new branch (
feature/your-feature) - Commit your changes
- Push to your branch
- Open a Pull Request
This project is licensed under the MIT License.