Git Product home page Git Product logo

food_trucks's Introduction

FoodTrucks

This is an implementation of the Peck Engineering Assessment for consideration for employment.

I gave myself a time limit of 3 hours, and chose a simple search API to find food trucks by their listed menu items, allowing for multiple items to narrow down the search.

TODO

Some features I wanted to get to, but was unable to in the time limit:

  • Parse dayshours ("Sa-Su:11AM-10PM;Mo-Fr:6PM-8PM") and figure out what's open at the time of the query
  • LiveView browser-based geolocation call to find the nearest food trucks to your current location
  • Chaining all of that together to allow user to search for what's open nearest to their location with given food items

Examples

To find all permits with "meat", "bread", and "seafood" on their menu:

$ curl http://localhost:4000/api/v1/food_trucks/by_item\?q\[\]\=meat\&q\[\]\=bread\&q\[\]\=seafood | jq
{
  "data": [
    {
      "status": "REQUESTED",
      "address": "400 CALIFORNIA ST",
      "permit": "18MFF-0088",
      "food_items": "Daily rotating menus consisting of various local & organic vegetable: poultry: meat: seafood : rice & bread dishes.",
      "applicant": "Munch India",
      "approved_date": null,
      "expiration_date": "2019-07-15T00:00:00",
      "facility_type": "Truck",
      "latitude": 37.79330427556103,
      "location_description": "CALIFORNIA ST: SANSOME ST to LEIDESDORFF ST (400 - 448)",
      "longitude": -122.4014589984134,
      "schedule": "http://bsm.sfdpw.org/PermitsTracker/reports/report.aspx?title=schedule&report=rptSchedule&params=permit=18MFF-0088&ExportPDF=1&Filename=18MFF-0088_schedule.pdf"
    },
    {
      "status": "REQUESTED",
      "address": "Assessors Block /Lot",
      "permit": "17MFF-0187",
      "food_items": "Daily rotating menus consisting of various local & organic vegetable: poultry: meat: seafood : rice & bread dishes.",
      "applicant": "Munch India",
      "approved_date": null,
      "expiration_date": "2017-07-19T00:00:00",
      "facility_type": "Truck",
      "latitude": 0.0,
      "location_description": "POST ST: MONTGOMERY ST to LICK PL (1 - 40)",
      "longitude": 0.0,
      "schedule": "http://bsm.sfdpw.org/PermitsTracker/reports/report.aspx?title=schedule&report=rptSchedule&params=permit=17MFF-0187&ExportPDF=1&Filename=17MFF-0187_schedule.pdf"
    }
  ]
}

Startup

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more

food_trucks's People

Contributors

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