Giter VIP home page Giter VIP logo

library's Introduction

Library

This is a library service that accepts an SMS request and returns a Json response

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

  1. open your terminal inside the application directory or use the following command cd library

  2. Install dependencies

    composer install
    
  3. Setup Aplication

Copy and Rename .env.example to .env and fill the environment variable with the following command.

cp .env.example .env

Generate a new key for your local application

php artisan key:generate

run the application using the below command

php artisan serve

your application is now running on http://localhost:8000

Making a Request

All post request are made to this url http://localhost:8000/ your request body should be in either form below.

{"reg":"CS/20/2016", "book":"PE 1478 S65 1991", "date":"21/01/2016-30/01/2016"}

or

"CS/20/2016", "PE 1478 S65 1991","21/01/2016-30/01/2016" 

your response will look like below

{
    "reg": "CS/20/2016",
    "book": "PE 1478 S65 1991",
    "date": "21/01/2016-30/01/2016"
}

Assumptions Made When Developing This Service

  1. There is an sms sender (Api)
  2. That there are books stored in the Library System

Improvements on the message structure

  1. I would engage the sms provider/telco directly to provide the service.
  2. Standardize the way the messages should be sent to the library system (to be uniform and in Json format)

Improvements on my solution

  1. I would have added logging into the app to track the requests and responses & errors in the application (elasticsearch)
  2. Setup a database that would save the requests

library's People

Contributors

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