The DSMeta project was developed during the 11th Edition of DevSuperior's Spring React Week event. During the course, the basic concepts of the Spring framework were covered in the construction of endpoints of a Rest API in the backend and the React base in the composition of the frontend, putting everything into practice in the development of this project, DSMeta. A fictional service that lists sales with SMS notification.
- Java
- Spring
- Maven
- JPA / Hibernate
- H2 Database
- React JS
- TypeScript
- Axios
Auxiliary dependencies can be found at: dependencies.
The design of the DSMeta project was based on the prototype made in the Figma tool, which includes responsive designs in other screen formats. The browser file can be accessed below.
For this project two endpoints were designed (click to expand):
Show Sellers: GET localhost/sales
Returns an object containing a paginated list of the top 20 sellers in the database if the date range is not passed as a parameter in the endpoint call.
Method : GET
URL : localhost/sales
URL : localhost/sales/?minDate=yyyy-MM-dd&maxDate=yyyy-MM-dd
Code : 200 OK
Content example:
{
"content": [
{
"id": 37,
"sellerName": "Padme",
"visited": 82,
"deals": 82,
"amount": 22465.0,
"date": "2022-02-27"
},
"."
"."
"."
{
"id": 26,
"sellerName": "Kal-El",
"visited": 21,
"deals": 20,
"amount": 17126.0,
"date": "2022-04-03"
},
{
"id": 25,
"sellerName": "Anakin",
"visited": 68,
"deals": 43,
"amount": 17016.0,
"date": "2022-04-07"
}
],
"pageable": {
"sort": {
"sorted": false,
"empty": true,
"unsorted": true
},
"pageNumber": 0,
"pageSize": 20,
"offset": 0,
"paged": true,
"unpaged": false
},
"totalPages": 4,
"totalElements": 66,
"last": false,
"sort": {
"sorted": false,
"empty": true,
"unsorted": true
},
"size": 20,
"number": 0,
"numberOfElements": 20,
"first": true,
"empty": false
}
Send Notification: GET localhost/sales/{id}/notification
Send the SMS informing the seller's name, total sales value in the month and the date.
Method : GET
URL : localhost/sales/{id}/notification
Code : 200 OK
Content example:
Returns a list of sellers given a range of data.
Individual push sms notification for each seller.
The sms is sent to the number registered in the Twilio service.
Developed with π by Lucas Ferreira