Coder Social home page Coder Social logo

devoteam-se / devolunch Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 3.41 MB

Devolunch is an app that presents today's lunch using data from scraped restaurant websites.

Home Page: https://www.malmolunch.se

License: MIT License

TypeScript 76.71% HTML 1.70% CSS 0.12% Dockerfile 1.26% Shell 2.72% JavaScript 1.14% HCL 16.36%

devolunch's Introduction

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

devolunch's People

Contributors

jonasstenberg avatar niwhede avatar victorwinberg avatar github-actions[bot] avatar pansar1 avatar christofferjerrebo avatar liljagustav avatar christianll9 avatar erik-gullberg-devoteam avatar fbontin avatar janzubac avatar

Stargazers

Carl Emil L avatar  avatar

Watchers

Nils-Olof Bankell avatar  avatar  avatar

devolunch's Issues

[Bug]: Hyllie Bryggeri Bistro scrape is broken

What happened?

Hyllie bryggeri now displays their menu as an image instead of text or pdf, breaking the scraper.

The image looks like this.
There might be a way to read the text of the image using something like Tesseract

Relevant log output

No response

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.