Skip to content

πŸ“ˆ Full Stack web application for sales listing.

Notifications You must be signed in to change notification settings

lucasferreiraz/dsmeta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 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 JS
  • 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 (click to expand):

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

Content example:


Demonstration πŸ–₯️

Returns a list of sellers given a range of data.

alt

Individual push sms notification for each seller.

alt

The sms is sent to the number registered in the Twilio service.


Developed with πŸ’› by Lucas Ferreira