Skip to content

Backend for managing the organizational structure of a company - Group project for the 2019 Mind the <Code> program in Spring Boot

Notifications You must be signed in to change notification settings

xmac11/employee-management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

employee-management-system

Group project for the Mind the <Code> program in Spring Boot

Description

Backend for a CRUD application which exposes a REST API for managing the organizational structure of a company.
The system was built with Spring Boot using the Controller-Service-Repository architecture.
Role-based authorization was implemented for restricting certain requests to certain roles (admin, companyManager, businessUnitManager, departmentManager, unitManager, employee).

Technologies

Postman was used to perform HTTP requests.

E-R Diagram

API spec

Authentication:
  • POST:
    • /auth: username and password should be included in the Body.
      If authentication is successful, a JWT token is returned which should be included in all subsequent requests.
Business Units:
  • GET:
    • /businessUnits: Get all business units
    • /businessUnits/{businessUnitId}: Get business unit by Id
  • POST:
    • /businessUnits: Post a new business unit
  • PUT:
    • /businessUnits/{businessUnitId}: Update (override) an existing business unit
  • PATCH:
    • /businessUnits/{businessUnitId}: Update partially an existing business unit
Departments:
  • GET:
    • /departments: Get all departments
    • /departments/{departmentId}: Get deparment by Id
  • POST:
    • /departments: Post a new department
  • PUT:
    • /departments/{departmentId}: Update (override) an existing department
  • PATCH:
    • /departments/{departmentId}: Update partially an existing department
Units:
  • GET:
    • /units: Get all units
    • /units/{unitId}: Get unit by Id
  • POST:
    • /units: Post a new unit
  • PUT:
    • /units/{unitId}: Update (override) an existing unit
  • PATCH:
    • /units/{unitId}: Update partially an existing unit
Employees:
  • GET:
    • /employees: Get all employees
    • /employees/{employeeId}: Get employee by Id
    • /employees/{searchCriteria}/{id}: Get all employees which belong in searchCriteria in {businessUnit, department, unit} with a given Id.
      For example, /employees/department/2 returns all employees which belong to the Department with Id = 2.
  • POST:
    • /employees: Post a new employee
  • PUT:
    • /employees/{employeeId}: Update (override) an existing employee
  • PATCH:
    • /employees/{employeeId}: Update partially an existing employee
  • DELETE:
    • /employees/{employeeId}: Delete an employee by Id
Tasks:


Note: Only employees from the same unit are allowed to work on a certain task.

  • GET:
    • /tasks: Get all tasks
    • /tasks/{taskID}: Get task by Id
  • POST:
    • /tasks: Post a new task
  • PUT:
    • /tasks/{taskID}: Update (override) an existing task
  • PATCH:
    • /tasks/{taskID}: Update partially an existing task
  • DELETE:
    • /tasks: Delete all tasks
    • /tasks/{taskId}: Delete a task by Id
    • /tasks/batch: Delete all tasks with the user-provided IDs

Team

Instructor: Petros Efthymiou

About

Backend for managing the organizational structure of a company - Group project for the 2019 Mind the <Code> program in Spring Boot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages