rusawa

Spring - CRM REST API

Built in Java with Spring and MySQL. Simple frontend made with React for better visual presentation of functions. The app provides functionality for basic CRUD operations.

@GetMapping("/")

Returns a JSON list of all records from the MySQL database. Here shown in Postman.

MySQL database

Table customer in MySQL workbench.

Landing page

Get request fetched and displayed with React as the main pannel of the app.

@PostMapping("/add")

Post request takes JSON object in the body in Postman and saves the object in the database.

Object in MySQL

Object posted in Postman is saved in the database.

Adding from the frontend

"Add" button located in the top right corner takes the user to the adding form.

Adding form

Requires every field filled. "Add" button saves the record in the database.

Updated list

New records added to the database appear in the main pannel.

New object in the DB

The object added through the frontend appears in the database.

Updating

Sends a PUT request in Postman. JSON object passed in the body updates a record with matching id.

Updating from the frontend

"Update" button grabs the id of a selected record and sends it to the update form.

Update form

The form fields are prefilled with selected rocord's informations. Sends the PUT request and updates the record in the database.

Displaying changes

Updated records are displayed in the main pannel.

Changes in the DB

Updated informations are saved in the database.

@DeleteMapping

Grabs a record with the id provided in the URL and deletes it from the database.

Deleting from the frontend

After clicking the "Delete" button the user is prompted with a message window to confirm his choice.

Changes in the DB

Records deleted from both methods: through frontend and with a Postman DELETE request, are removed from the database.