SpringBoot Application with React as Frontend. This repository contains a simple Employee Management application built with Spring Boot for the backend, React for the frontend, and PostgreSQL as the database. The application allows users to add, update, and delete employee details based on their ID, as well as list all employees.
-
Add Employee: Add new employee details, including name and position.
-
Update Employee: Update existing employee details based on their ID.
-
Delete Employee: Delete an employee based on their ID.
-
List Employees: View a list of all employees.
Before you begin, ensure you have the following installed:
-
Clone the Repository:
git clone https://github.com/your-username/employee-management.git cd employee-management
-
Setup PostgreSQL Database:
- Create a database named
employee_management
. - Update the database connection settings in
src/main/resources/application.properties
.
- Create a database named
-
Run the Spring Boot Backend:
./mvnw spring-boot:run
The backend server will start at
http://localhost:8080
. -
Run the React Frontend:
cd frontend npm install npm start
The frontend development server will start at
http://localhost:3000
. -
Access the Application:
Open your browser and visit http://localhost:3000/employee to access the Employee Management application.
src/main/java/com/example/employeemanagement
: Backend Java source code.src/main/resources
: Backend resources, including application properties.frontend
: Frontend React application.
-
Backend:
- Spring Boot
- Spring Data JPA
- PostgreSQL
-
Frontend:
- React
- Axios for API communication
- Bootstrap for styling