Skip to content

A full-stack Employee Management System built with Spring Boot backend and frontend, providing comprehensive employee data management capabilities with a modern, responsive user interface

Notifications You must be signed in to change notification settings

uchamod/Employee_Mangement_System-V2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Employee Management System

A full-stack Employee Management System built with Spring Boot backend and React frontend, providing comprehensive employee data management capabilities with a modern, responsive user interface.

System Architecture

┌─────────────┐     ┌──────────────┐     ┌──────────────┐
│             │     │  Spring Boot │     │    MySQL     │
│  Frontend   │────▶│   Backend    │────▶│   Database   │
│             │     │              │     │              │
└─────────────┘     └──────────────┘     └──────────────┘

Technology Stack

Backend

  • Spring Boot 3.x
  • Spring Security with JWT
  • Spring Data JPA
  • MySQL 8.x
  • Maven
  • Java 17

Frontend

  • HTML
  • JavaScript
  • Ajax
  • Boostrap

Features

  • User Authentication & Authorization
  • Employee CRUD Operations
  • Profile Management
  • Report Generation
  • Responsive Design
  • Role-based Access Control
  • Search and Filter Capabilities

Prerequisites

  • JDK 17 or higher
  • Node.js 18.x or higher
  • MySQL 8.x
  • Maven 3.6+
  • npm or yarn

Getting Started

Backend Setup

  1. Clone the Repository
git clone https://github.com/uchamod/Employee_Mangement_System-V2.git
cd employee-management/backend
  1. Configure Database
CREATE DATABASE emp_management;
  1. Update application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/emp_management
spring.datasource.username=your_username
spring.datasource.password=your_password
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true

# JWT Configuration
jwt.secret=your_jwt_secret
jwt.expiration=86400000
  1. Run the Backend
mvn spring-boot:run

Frontend Setup

Navigate to Frontend Directory

cd ../frontend

API Documentation

Authentication Endpoints

POST /api/auth/login - Login
POST /api/auth/register - Register new user
POST /api/auth/refresh - Refresh token

Employee Endpoints

GET /api/employees - Get all employees
POST /api/employees - Create employee
GET /api/employees/{id} - Get employee by ID
PUT /api/employees/{id} - Update employee
DELETE /api/employees/{id} - Delete employee

Department Endpoints

GET /api/departments - Get all departments
POST /api/departments - Create department
GET /api/departments/{id} - Get department
PUT /api/departments/{id} - Update department
DELETE /api/departments/{id} - Delete department

## Security

The application implements the following security measures:

- JWT-based authentication
- Password encryption using BCrypt
- Role-based authorization
- CORS configuration
- XSS protection
- CSRF protection

## Available Scripts

### Backend
```bash
mvn clean install - Build the project
mvn test - Run tests
mvn spring-boot:run - Run the application

## Docker Support

Build and run using Docker:

```bash
# Build images
docker-compose build

# Run services
docker-compose up

Testing

Backend Testing

# Run unit tests
mvn test

# Run integration tests
mvn verify

Deployment

Backend Deployment

  1. Build the JAR file:
mvn clean package
  1. Run the JAR:
java -jar target/employee-management-0.0.1-SNAPSHOT.jar
  1. Serve using nginx or other web server

Troubleshooting

Common issues and solutions:

  1. Database Connection Issues

    • Verify MySQL service is running
    • Check database credentials
    • Confirm database exists
  2. Frontend API Connection Issues

    • Verify backend is running
    • Check CORS configuration
    • Confirm API URL in environment variables
  3. Authentication Issues

    • Check JWT token expiration
    • Verify credentials
    • Clear browser cache/cookies

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit changes
  4. Push to the branch
  5. Create Pull Request

Development Guidelines

  1. Code Style

    • Follow Java code conventions
    • Use ESLint for JavaScript
    • Write meaningful commit messages
  2. Testing

    • Write unit tests for new features
    • Maintain minimum 80% code coverage
    • Include integration tests for critical paths
  3. Documentation

    • Update README for new features
    • Document API changes
    • Include JSDoc comments

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support, please:

  1. Check the documentation
  2. Search existing issues
  3. Create a new issue if needed

Acknowledgments

  • Spring Boot team
  • Material-UI team
  • Open source community

For more detailed information or support, please open an issue in the repository.

About

A full-stack Employee Management System built with Spring Boot backend and frontend, providing comprehensive employee data management capabilities with a modern, responsive user interface

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published