MCPcopy Index your code
hub / github.com/JustinBeckwith/cloudcats

github.com/JustinBeckwith/cloudcats @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
12 symbols 19 edges 12 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

CLOUD CATS

GitHub Actions XO code style Known Vulnerabilities

CloudCats is an example of using node.js and various Google Cloud APIs and services to solve the greatest question of our time: do developers prefer dogs or cats.

CATS IN THE CLOUD

This is an adaptation of the awwvision, which uses Kubernetes to do something similar. Credit to Thea Flowers for the idea.

How it works

Cloud Cats queries for a list of images from the front page of r/aww. Each of those images is saved into Google Cloud Storage, and then analyzed using the Google Cloud Vision API.

Architectural diagram

Cloud Cats uses a few Google Cloud APIs and Services.

  • Users visit the front application, which is running in an App Engine module.
  • When you're ready to do a run, the {+} will call an endpoint on the [worker][/worker] module.
  • The worker will invoke the Reddit JSON API to get a list of images from r/aww.
  • Images are saved to Google Cloud Storage.
  • The Cloud Vision API analyzes the image, and tags it as dog or cat or other.
  • The result is placed in a Google Cloud Pub/Sub topic.
  • The front end App Engine Module subscribes to results from the topic.
  • Results are streamed to the user using PubNub.

Deployment

This code is built as a demo for running Node.js on Google Cloud, but you can run it anywhere that node.js works.

  1. Create a project in the Google Cloud Platform Console.
  2. Enable billing for your project.
  3. Enable Storage, PubSub, and Cloud Vision APIs in the API Manager.
  4. Install the Google Cloud SDK.
  5. Deploy with gcloud preview app deploy web/app.yaml worker/app.yaml --project <YOUR PROJECT>

License

MIT License

Questions?

Feel free to submit an issue on the repository, or find me at @JustinBeckwith

Core symbols most depended-on inside this repo

publishToBigQuery
called by 1
worker/analyzer.js
publishEvent
called by 1
worker/analyzer.js
_populatePageUrls
called by 1
worker/reddit.js
_getPage
called by 1
worker/reddit.js
makeRequest
called by 1
web/catrelay.js
showDialog
called by 1
web/public/script.js
processMessage
called by 1
web/public/script.js
analyzeImage
called by 0
worker/analyzer.js

Shape

Function 12

Languages

TypeScript100%

Modules by API surface

worker/analyzer.js4 symbols
worker/reddit.js3 symbols
web/public/script.js2 symbols
web/catrelay.js2 symbols
worker/vision.js1 symbols

For agents

$ claude mcp add cloudcats \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact