Code Monkey home page Code Monkey logo

dsmeta's Introduction

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

dsmeta's People

Contributors

lucasferreiraz avatar

Watchers

 avatar  avatar

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.