Giter Site home page Giter Site logo

springboot-react-hr's Introduction

Springboot-React-HR Sample Application

Introduction

This project is a HR (Java RESTful Web Service) application written using Spring Boot (version 2.3.0.RELEASE).

Start-up the Application

Pre-requisite

To run this application, the below requirements need to be installed.

  • Java JDK (version 11)
  • Maven (version 3.6.3)

As this project uses Lombok in the entity models, it may be useful to install its IDE or text editor plugin/extension. You can refer to the Lombok website for details on how to do so.

Starting it up

As this project uses Maven, you can use the command mvnw spring-boot:run to start it up.

Once the application is up, you can start to access the database and also access the API documentation via Swagger, which will be discussed below.

Database

In this application, it uses a H2 embedded database and I have chosen to use this sample HR Database. The DDL script can be found in src/main/resources/schema.sql, whilst the data.sql in the same directory is used to pre-populate the data when the application boots up.

After the application starts up, the H2 console can be accessed via the http://localhost:8080/h2 URL and connect using the details as per the screen capture.

h2-console.png

Refer below for the database diagram.

db-diagram.png

API

When the application is up, you can view a list of API calls via Swagger at http://localhost:8080/swagger-ui.html.

These APIs return a JSON response in the JSend format. In the response, there are three keys:

status
success, fail or error.
data
The data returned in the response or NULL if there is no data.
message
Error message when processing the request or the request has invalid data.

Front-end client โ€“ React

Pre-requisite

To run this front-end client, the below requirements need to be installed.

  • Node (version 14.9.0)
  • Yarn (version 1.22.4)

Once the above are installed, run the yarn command to start installation of the needed libraries.

Starting up the client

Run yarn start to startup the client and lastly, open a web browser and use the address http://localhost:1234.

References

Below are the articles that I referred to when building this application from scratch.

Tasks [0%]

  • [ ] Employee listing page
  • [ ] View and update job details
  • [ ] Delete job
  • [ ] View and update employee details
  • [ ] Delete employee

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.