Skip to content

Latest commit

 

History

History
89 lines (62 loc) · 3.83 KB

README.md

File metadata and controls

89 lines (62 loc) · 3.83 KB

Devolunch

License

Devolunch is an app that presents today's lunch menu on scraped restaurants. It's hosted on Google Cloud Platform.

The working version can be found at: https://www.malmolunch.se.

This repository consist of three services.

If you want to deploy it to GCP, head over to ./terraform.

This service is using Puppeteer to scrape all the restaurants that exists in ./apps/functions/scraper/src/restaurants, and saves the output to a .json file hosted on a Google Cloud Bucket (to reduce cost).

It's hosted on a Google Cloud Functions v2 and triggered daily at 10:00 using a Google Cloud Scheduler.

Check out the scraper on how to add restaurants.

Technologies:

Needs Scraper to work

The website is a React app built with Typescript that presents the lunch menu of the scraped restaurants. It's hosted on Cloud Run and is served by a simple Node express app.

Technologies:

Needs Scraper to work

The Slack notifier is a simple service that retrieves the data scraped by the Scraper and posts it to a Slack channel. The Terraform setup is configured to create a Google Cloud Scheduler which sends a message at 10:30 AM to the specified Slack channel.

Technologies:

Contribute

PRs Welcome

Excited to work alongside you! Follow the instructions in CONTRIBUTING and code away.

TODO

  • Make open source
    • Implement Terraform support
    • Add instructions on how to make a scraper
    • Move scrape call to Cloud Function
    • Add deploy on Github release
    • Block main branch from anyone outside of the org (unless default)
  • Add husky/lint-staged and make sure pre-commit is triggered to run lint/tests
  • Add API definition
  • Add API versioning
  • Change filesOverride to be read from environment instead of code
  • Change scraper to run PDF parse from within browserScrapeFunction
  • Fix shared npm packages for functions
  • Host images in a bucket
  • Add a separate service account for Cloud Run instead of using the default Compute Engine service account
  • Add Cloud Function deploy step
  • Serve images via the backend
  • Split up terraform configurations into multiple files for readability
  • Figure out a good way of handling restaurant chains