Coder Social home page Coder Social logo

food-truck-mapr's Introduction

Food Truck Mapr

Sample project to ingest publicly available food truck location data in San Francisco and present location info on google maps.

  • very simplistic/"monolithic" lambda service that:

    • is scheduled to fire every hour
    • grabs the csv from public endpoint
    • records data in dynamodb
    • generates simple google maps plotting of active(?) food trucks
    • presents the map as simple html in s3 website enabled bucket
  • all infra managed/created with pulumi/python

NOTE:

Though this exercise calls for pulumi cloud, you should be well within the free tier for managed resources.

Dependencies

Setup Instructions

  1. git clone REPO
  2. cd REPO
  3. export AWS_ACCESS_KEY_ID=<MY_REAL_KEY_ID_HERE>
  4. export AWS_SECRET_ACCESS_KEY=<MY_REAL_SECRET_KEY_HERE>
  5. export GOOGLE_MAPS_API_KEY=<MY_REAL_GOOGLE_MAPS_KEY_HERE>
  6. pip install -r requirements.txt
  7. pulumi login # this will prompt you for your pulumi api key
  8. pulumi up -y

If all goes well, you should see your s3 bucket url at the end of pulumi output:

Outputs:
    bucket_name   : "food-truck-mapr-of-excellence"
    bucket_website: "food-truck-mapr-of-excellence.s3-website-us-east-1.amazonaws.com"

The lambda service triggers every hour, but if you want to see the map right away, just log into the AWS console and trigger the lambda with any test event...content won't matter.

Example Map

TODO:

  • how do we handle stale data?
  • separate data retrieval, storage, and mapping functionality
  • better organize the infra-as-code
  • need to be more restrictive with our lambda execution policy
  • use secrets manager instead of loading in from env vars
  • CI/CD the pulumi run
  • add tests!!!
  • observability: how well does our app perform throughout?

food-truck-mapr's People

Contributors

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