GithubHelp home page GithubHelp logo

serpla-user's Introduction

Serpla-User

Service Place - User Management Service

Description

The code is based on nest.js and wants to support OWASP at some level.

Useful commands

$ yarn install
$ yarn start
# default port: 3000

Tools

PostgreSQL and PgAdmin docker compose https://github.com/khezen/compose-postgres

NestJS and PostgreSQL https://betterprogramming.pub/nest-js-project-with-typeorm-and-postgres-ce6b5afac3be

Useful resources for NestJS https://github.com/nestjs/awesome-nestjs

API Design

Organize the API design around resources

  • When possible, resource URIs should be based on nouns (the resource) and not verbs (the operations on the resource).
  • A collection is a separate resource from the item within the collection, and should have its own URI.
https://adventure-works.com/orders [GET]
https://adventure-works.com/orders/1 [GET]
https://adventure-works.com/order [POST]
  • Also consider the relationships between different types of resources and how you might expose these associations.
/customers/5/orders
/orders/99/customer
/customers/1/orders/99
  • Handle non-resource scenarios through HTTP requests that invoke a function and return the results as an HTTP response message. Like /add?operand1=99&operand2=1

HATEOAS

provide relevant links for each response. Like:

{
    "account": {
        "account_number": 12345,
        "balance": {
            "currency": "usd",
            "value": 100.00
        },
        "links": {
            "deposits": "/accounts/12345/deposits",
            "withdrawals": "/accounts/12345/withdrawals",
            "transfers": "/accounts/12345/transfers",
            "close-requests": "/accounts/12345/close-requests"
        }
    }
}

resources

serpla-user's People

Contributors

afsharm avatar

Stargazers

morteza_dev avatar Amirmohammad avatar Ali Varaste Pour 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.