Code Monkey home page Code Monkey logo

cerence-codingchallenge's Introduction

Cerence-CodingChallenge

RESTFUL service for generating fibonacci series.

Technolgoies used for development:

1. SpringBoot for RESTFUL webservice development

2. Swagger for API documentation

3. Log4j2 for Loggings

4. Postman to communicate to the web service(To send request and recieve response)

5. Apache Tomcat server

To run the web service:

1. git clone https://github.com/Reddyprashant/Cerence-CodingChallenge.git

2. UnZip and Import the project

3. Install Apache Tomcat server and configure the Tomcat server path in IDE

4. Run "mvn clean install" command in IDE to build and package the application

5. Run "mvn spring-boot:run" Command to Run the application on Tomcat Server

6. Open Postman
   a. Using GET method and URI http://localhost:8080/v1/fibonacci/ we can check whether our application is working or not just a "health check"
   
   b. Generate the token using GET method and URI http://localhost:8080/v1/token and Token validity is for 2 minutes after 2 minutes we should generate the new token
   

   c. To generate the fibonacci sequence 

       1. copy the generated token and select Authorization as "Bearer Token" in Postman and paste the token
       
       2. Contstraints of number n, its value should be between 0 and 2000
   
       3. Using GET method and URI http://localhost:8080/v1/fibonacci/number (input number returns first n fibonacci numbers)
       
7. Logging has been implemented using Log4j2, we can check the errorlogs in "application.log" file inside the folder named "logs" in our  web service

Testing the application:

 1. To Test various scenarios for fibonacci sequence generation run FibonacciGeneratorApplicationTests Test Class in IDE

 2. To Test different scenarios for Token validation run TokenServiceTest Test Class in IDE

Authorization:

RESTFUL service is secured by token generated using AES Encryption and Decryption algorithm.

API Documentation using Swagger:

1. http://localhost:8080/swagger-ui.html to check the API documentation.

2. we can verify the methods implemented in our web service. 

cerence-codingchallenge's People

Contributors

reddyprashant avatar

Watchers

 avatar  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.