This is a full-stack application that allows you to manage employee details and projects. It consists of a backend built using Spring Boot and a frontend developed using Angular. The application also uses MySQL as the database to store employee and project data.
- Technologies Used
- Prerequisites
- Setup Backend
- Setup Frontend
- Run the Application
- Database Setup
- Contributing
- Backend: Spring Boot, Java, MySQL
- Frontend: Angular, HTML, CSS
- Database: MySQL
- Install Java 8 or higher.
- Install MySQL and set up a MySQL database.
- Install Node.js and npm.
- Install Angular CLI globally by running:
npm install -g @angular/cli
- Install Maven (if it's not already installed).
- Clone the repository to your local machine:
git clone https://github.com/your-username/EmployeeManagementSystem.git
- Navigate to the backend directory:
cd EmployeeManagementSystem/emp-management - Open
application.propertiesand ensure the following configuration is correct:spring.datasource.url=jdbc:mysql://localhost:3306/employeemanagementsystem spring.datasource.username=root spring.datasource.password=root spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true
- Run the backend application using Maven:
The backend server will start on
mvn spring-boot:run
http://localhost:8080.
- Navigate to the frontend directory:
cd EmployeeManagementSystem/emp-management-frontend - Install the required npm packages:
npm install
- Start the Angular development server:
The frontend will be available at
ng serve
http://localhost:4200.
- Backend: The backend application will be running on
http://localhost:8080. - Frontend: The Angular application will be running on
http://localhost:4200.
You can now interact with the Employee Management System through the frontend interface.
Before running the application, you need to create a database for the application to connect to. The schema and tables will be created automatically by Spring Boot at runtime.
-
Create a Database: Create a database in MySQL (or your preferred database) with the name of your choice (e.g.,
employeemanagementsystem).- Example SQL to create a database:
CREATE DATABASE employeemanagementsystem;
- Example SQL to create a database:
-
Automatic Table Creation: Spring Boot will automatically create the necessary tables based on the entity classes at runtime. No need to import or run any SQL file manually unless you want to insert initial data or define your schema.
-
Importing Data (Optional): If you want to insert sample data, you can use the
EmployeeManagementSystem.sqlfile. Just place it in thesrc/main/resources/directory, and Spring Boot will run it on startup to populate your database.Example
EmployeeManagementSystem.sql:-- Create tables if necessary (not required with auto table creation) CREATE TABLE IF NOT EXISTS employee ( id BIGINT AUTO_INCREMENT PRIMARY KEY, firstname VARCHAR(100), lastname VARCHAR(100), mobile VARCHAR(15), email VARCHAR(100) ); -- Insert sample data INSERT INTO employee (firstname, lastname, mobile, email) VALUES ('John', 'Doe', '1234567890', 'john.doe@example.com');
With this setup, you only need to create the database manually. The application will take care of creating the tables and populating them (if you have an SQL file) at runtime.
- Fork this repository.
- Create a new branch (
git checkout -b feature/your-feature). - Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature/your-feature). - Open a pull request.



