Skip to content

Projeto desenvolvido na Semana Spring React pela DevSuperior

Notifications You must be signed in to change notification settings

gustavooquinteiro/dsmeta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSMeta

alt alt alt alt alt alt

About 📚

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.


Technologies Used 🚀

  • Java
  • Spring
  • Maven
  • JPA / Hibernate
  • H2 Database
  • React
  • TypeScript
  • Axios

Auxiliary dependencies can be found at: dependencies.


Layout 🔖

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.


Endpoints 🔗

For this project two endpoints were designed:

Show Sellers: GET localhost/sales

Show Paginated Sellers List

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

OR

URL : localhost/sales/?minDate=yyyy-MM-dd&maxDate=yyyy-MM-dd

Success Response

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

Developed with 💜 by Gustavo Quinteiro

About

Projeto desenvolvido na Semana Spring React pela DevSuperior

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published