Giter Club home page Giter Club logo

urbondouserservice's Introduction

UrbondoUserService

Social network for condominium residents

Table of Contents

  1. Overview
  2. Technologies
  3. Getting Started
  4. Building
  5. REST APIs
  6. User

Description

A server side project in purpose of exposing APIs that are used to CRUD users.

Tech stack

  • Java 17
  • Spring Boot
  • AWS Dynamo DB
  • JUnit5
  • Mockito

Getting Started

Create the particular tables on AWS DynamoDB and make sure to provide your AWS credentials in order to run successfully the app.

Build

From the root folder, just execute the following command which will build/run unit and integration tests.

./gradlew clean build

REST APIs

User

  1. Fetch user by id GET /user/{id}

    Response 200

    {
      "id": "e3b42f92-37ea-4a6c-813c-46155e23197c",
      "firstName": "Foo",
      "lastName": "Bar",
      "email": "[email protected]",
      "phone": "12345678910"
    }

    Response 404 NOT FOUND

     {
       "message": "user id:{id} is not found"
     }
  2. Add new user POST /user

    Request body

     {
       "firstName": "Json",
       "lastName": "Jakarta",
       "email": "[email protected]",
       "phone": "1334545677"
     }

    Response 201

    {
       "id": "e0716138-442d-43a8-a6e1-1e846c678d5a"
    }

    A bad request gets returned when either one of field gets blank or email/phone is not valid. Message's value depends on the invalid field. Response 400 BAD REQUEST

    {
      "message": "{validation's message}"
    }
  3. Update an existing user PUT /user/{id}

    Request body

     {
       "firstName": "Json",
       "lastName": "jakarta",
       "email": "[email protected]",
       "phone": "01234563495"
     }

    Response 200

    {
      "id": "e0716138-442d-43a8-a6e1-1e846c678d5a",
      "firstName": "Json",
      "lastName": "jakarta",
      "email": "[email protected]",
      "phone": "01234563495"
    }

    Response 404 NOT FOUND

    {
      "message": "user id:{id} is not found"
    }

    A bad request gets returned when either one of field gets blank or email/phone is not valid. Message's value depends on the invalid field. Response 400 BAD REQUEST

    {
      "message": "{validation's message}"
    }
  4. Delete an existing user DELETE /user/{id}

    Response 204

    Response 404 NOT FOUND

    {
      "message": "user id:{id} is not found"
    }

urbondouserservice's People

Contributors

menabebawy avatar

Watchers

 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.