Git Product home page Git Product logo

enzyme_food_truck's Introduction

Food Truck App

Usage

  1. This app uses yarn.
  2. $ nvm use to ensure you are using the correct version of node.
  3. $ yarn to install libraries.
  4. $ yarn run test to test.
  5. $ yarn run format to automatically format your code (works with VSCode!).
  6. $ yarn run start to start the app.

Highlights

  1. Uses ESLint and Prettier
  2. Uses Typescript, with types and interfaces being used in the app
  3. Uses react-intl for translations: Spanish, French, and English are supported
  4. Uses animations for the list (though the library used is throwing a console error)
  5. Well-tested
  6. Leaflet maps interaction with the list using refs
  7. The architecture should make it easy to find everything
  8. Uses styled components, I think this shows more understanding of CSS than using something like MUI
  9. Uses custom fonts and colors
  10. Since data translations will be important for this app, we make sure it gets it's own high level folder. This also helps us ensure that we conform to our Typescript types.

Location Distance

src/queries/transformations.ts

Here I utilized the Haversine formula to get the distance between two points on a map.

There are two important custom functions. One to get the closest location, and one to order the array by distance.

Next steps

Had I more time I would have made these improvements.

Frontend

  1. Make sure that to food truck list isn't mutated inappropriately.
  2. Improve the colors! I love working with designers, and I love making my apps look beautiful. However, I should not choose color schemes ;)
  3. The list and the map don't interact. I was having some trouble with refs, leaflet, and typescript, so I thought I'd just move on.

Backend

I ran out of time, but my original plan was to finish this by making an elixir backend with

  • Postgis
  • Cachex

Then we would only need to hit the third party API once a day (presumably this data is updated at most once a day). We could save only the important info in our database, perhaps from our FoodTruck type. Postgis could have handled ordering by distance almost intsantly on the backend. We could have passed that info to Cachex, and had incredible speed for our API.

Oh well, it's Friday and I know you want this in. If you'd like, I would be happy to make the API too :)

Thank you!

Thank you for your time and patience. I'm looking forward to hearing back!

enzyme_food_truck's People

Contributors

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