GithubHelp home page GithubHelp logo

sf-food-trucks's Introduction

FoodTruckin'

alt text

Application Flow

  • The user enters a location or chooses to search using their current location
  • The React/Typescript application uses Apollo and GraphQL to query the server with the provided location. The query is called foodTrucksNearby
  • The Golang server responds to the query and routes the relevant information to the foodtruck.Service interface implementation. This service is responsible for communicating with the store (or facade in this case), calculating the distance of all food trucks from the provided location, and then ordering them by distance.
  • The foodtruck.Facade is responsible for interacting with the sfgov food truck api and returning the decoded results

Choices Made

I use the current stack of React/Typescript/Apollo/Golang a lot in my side projects. Also, I tend to use Redux and RxJS a lot also but seemed like overkill for the time allotted fo this solution. Since I wanted to deliver a full-stack solution in under 3 hours, I decided to use the languages/frameworks in which i'm current immersed.

I could have very well used a REST API as opposed to GQL but the nature of the data made me instantly think GQL; large data model with only a few fields needed for this particular view.

Running

  • Server: go run ./server.go
  • Client cd ./web && yarn && yarn start

Improvements that could be made

  • Cache api calls until the end of the day
  • Pagination of results
  • Search by zip code
  • Interactive map
  • Exhaustive testing
  • Responsive design
  • Form Validation

sf-food-trucks's People

Contributors

dwaynelavon avatar

Stargazers

 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.