Code Monkey home page Code Monkey logo

rental-serverapp-springboot's Introduction

Rental application server ( backend service)

A complete back end server application developed to provide service for my other project (rental app). This application has been developed using Spring boot and hiberate and deployed on heroku. You can access the list of APIs developed from swagger documentation.

The APIs developed are : Signup Controller

Login Controller

User Controller

Product Controller

Trending Product Controller

Cart Controller

Search History Controller

The application also have the JWT based security. So, all the requests (other than signup and login) need to be sent along with authorisation token in request header to get a valid response. Follow the instruction given in later part of this document on generating and appending header to request.

Getting started

Although the project is already hosted and avaliable here. You can follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

To get started with this project you will need :

JDK 1.8 or later

Maven 3.2 or later

MySQL or any database

Spring tool suite or IntelliJ IDEA to directly import this project

Starting project

Download the project folder or clone from github

git clone https://github.com/manas-github/rental-serverapp-springboot.git

Import the project in Spring Tool Suite or IntelliJ IDEA. Follow the instruction here, if you are not familiar with importing maven projects.

Once the importing is completed, change the database url, username and password in application.properties.

After changing the details, build the project. (It may takes few minutes to build for the first time as it needs to download all the dependencies).

Once the build is completed, run the project as a Spring Boot Application.

The project will be started at your localhost.

If you get a error that port is not available, then change the port in /resources/application.properties and open the corresponding localhost in your browser.

Making API calls

All the api details with required parameter is document with the help of swagger and we can make the requests directly from swagger.

But, we will use postman for making requests here. If you don't have postman, download it from here.

To use this application we need a user account. So, we will create a signup request from postman with appropriate body:

Signup

It returns true with status 201, which means that account has been created succesfully.

Now, we can login using the signup details.

Login

It will return a encrypted token which we used for accessing all the apis.

Now, let's try to get list of all products using this token.

Add the header in postman request header tab with the token received from login request :

Key - Authorization & Value - Token $token

Now, make the get request :

Get products

Here, we will get all the products which are available in database. If there is no products, we can add product using the respective api as available in documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details

rental-serverapp-springboot's People

Contributors

manas-github avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

islamkadous

rental-serverapp-springboot's Issues

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.