Coder Social home page Coder Social logo

coffee-drop-api's Introduction

Coffee Drop API

How to use App

git clone https://github.com/hemanshuEng/Coffee-Drop-API.git

  1. install xampp and composer
  2. create database (coffeedrop)
  3. create .env file and add database credentials and without APP_KEY DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=coffeedrop DB_USERNAME=root DB_PASSWORD=
  4. run php artisan key:generate
  5. create table php artisan migrate
  6. run php artisan DB:seed
  7. open postman and import this link https://www.getpostman.com/collections/163a2331d34d9c49f7c5
  8. get (path:url/api/locations) ,all locations data
  9. post(path:url/api/locations) header content-Type :application/json accept :application/json { "postcode": "LE46NY", "opening_times": {"monday" : "09:00", "tuesday" :"09:00", "saturday" : "08:30"}, "closing_times": {"monday" : "19:00", "tuesday" : "19:00", "saturday" : "18:30"} }
  10. post (path:url/api/cashback)
    content-Type :application/json accept :application/json
    { "Ristretto":0, "Espresso":1000, "Lungo":0 } response
    { "data": { "coffepod": { "Ristretto": 0, "Espresso": 1000, "Lungo": 0 }, "Cashback_pound": 100 } } 11.post (path:url/api/getnearestlocation) content-Type :application/json accept :application/json
    { "postcode":"LA177UY" }

postman file

Json File

Laravel packages

  1. CSV.thephpleague Documentation
    used to import location data into database
  2. jabranr/postcodes-io Documentaion
    used to get geolocation information from postcodes.io

Future improvement

  1. Authentication
  2. web app using this api and leaflet.js to locate postcode on map

Responsive website for CoffeDrop Startup

This website is built using laravel restfulAPI ,leaflet js is used to display shop location on map , bootstap framework is used for styling

  1. find nearest coffeshop's address and opening hours and display on to map

  2. recieve cashback according to quantity of used coffee pods

  3. add new shop location

  4. display all shop location

    alt alt alt alt

coffee-drop-api's People

Contributors

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