{"id":26290355,"url":"https://github.com/burritosoftware/waymo-promo-tool","last_synced_at":"2025-07-09T03:07:20.888Z","repository":{"id":281767260,"uuid":"945762643","full_name":"burritosoftware/waymo-promo-tool","owner":"burritosoftware","description":"Share Waymo \"Refer and earn\" codes dynamically","archived":false,"fork":false,"pushed_at":"2025-04-17T21:49:30.000Z","size":376,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-08T21:00:48.450Z","etag":null,"topics":["cloudflare-kv","cloudflare-workers","waymo"],"latest_commit_sha":null,"homepage":"https://waymo.burrito.software","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/burritosoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-10T04:50:23.000Z","updated_at":"2025-04-17T21:49:33.000Z","dependencies_parsed_at":"2025-03-11T03:38:12.240Z","dependency_job_id":null,"html_url":"https://github.com/burritosoftware/waymo-promo-tool","commit_stats":null,"previous_names":["burritosoftware/waymo-promo-tool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/burritosoftware/waymo-promo-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burritosoftware%2Fwaymo-promo-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burritosoftware%2Fwaymo-promo-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burritosoftware%2Fwaymo-promo-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burritosoftware%2Fwaymo-promo-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/burritosoftware","download_url":"https://codeload.github.com/burritosoftware/waymo-promo-tool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burritosoftware%2Fwaymo-promo-tool/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264384304,"owners_count":23599609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare-kv","cloudflare-workers","waymo"],"created_at":"2025-03-14T23:19:39.794Z","updated_at":"2025-07-09T03:07:20.883Z","avatar_url":"https://github.com/burritosoftware.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Waymo Promo Tool\n![Icons](https://skillicons.dev/icons?i=cloudflare,workers,ts)\n\n\n[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/burritosoftware/waymo-promo-tool)  \n\u003csub\u003eNote: Once deployed, you will need to [configure the Worker](#configuration).\u003c/sub\u003e  \n\n---\nThis Cloudflare Worker simplifies sharing Waymo \"Refer and Earn\" promo codes by **automatically presenting visitors with the correct code for their local service area**, leveraging the nearest Cloudflare colocation for privacy-friendly geolocation.\n\nCodes can be **dynamically updated** via KV storage without modifying the Worker directly, and a **deactivation notice can be configured** when monthly referral limits are reached.\n\n## Screenshots\n\u003e [!NOTE]  \n\u003e For a live example, visit my personal instance at [waymo.burrito.software](https://waymo.burrito.software).\n\n|Service Area Picker|Code Box|\n|:-----------------:|:------:|\n|![ServiceAreaPicker](https://github.com/user-attachments/assets/1a8c5524-f272-436f-bce7-1dd3c3d7bbfe)|![StandardState](https://github.com/user-attachments/assets/e3d470d3-8665-41a1-abf3-54e296066ff3)|\n\n|Code Copied|Code Deactivated|\n|:---------:|:--------------:|\n|![CodeCopied](https://github.com/user-attachments/assets/93420f6e-7ef8-413a-8ea6-5d7b32e264e4)|![CodeUsed](https://github.com/user-attachments/assets/186b1280-76cd-4e8b-b406-424f5a596e9c)|\n\n## Features\n- 🌎 Supports **multiple service areas**\n- 📋 Displays a **simple code box** for copying\n- ❌ Codes can be **deactivated** once they are used up\n- 🔎 **Privacy-preserving geolocation** and no tracking\n  - 🧩 Optional: add your own tracking (Cloudflare Analytics, Google Analytics, etc.)\n- 🌙 Works with **light and dark** themes\n\n## Deployment\nThere are two ways to set it up: automatically using the [**Deploy to Cloudflare button**](#deploy-to-cloudflare-button-easiest), or manually using [**Wrangler**](#deploy-with-wrangler).\n\n### Deploy to Cloudflare Button (easiest)\nUse this button to deploy this Cloudflare Worker. Cloudflare will automatically clone the repository to a GitHub or GitLab account and provision KV for you.   \n\n[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/quacksire/waymo-promo-tool)\n\n\u003e [!TIP]\n\u003e #### Recommended Settings to Adjust\n\u003e - Git account (where to clone)\n\u003e - - [x] Create private Git repository  \n\nPress `Create and deploy` once you've configured your desired deployment settings.\n\n\u003e [!NOTE]  \n\u003e Once deployed, you will need to [configure the Worker](#configuration).\n\n### Deploy with Wrangler\n#### Requirements\n- [Git](https://git-scm.com)\n- [Node.js and npm](https://nodejs.org)\n\n#### Instructions\n1. Clone this GitHub repository.\n```bash\ngit clone https://github.com/burritosoftware/waymo-promo-tool.git\ncd waymo-promo-tool\n```\n\n2. Create a KV namespace with name `PROMO_KV`.\n```bash\nnpx wrangler kv namespace create \"PROMO_KV\"\n```\nExample output:\n```\n🌀 Creating namespace with title \"worker-PROMO_KV\"\n✨ Success!\nAdd the following to your configuration file in your kv_namespaces array:\nkv_namespaces = [\n  { binding = \"PROMO_KV\", id = \"e29b263ab50e42ce9b637fa8370175e8\" }\n]\n```\n3. Copy the ID from the output and change the existing ID value in the kv_namespaces array in `wrangler.jsonc`.\n\n4. Deploy with Wrangler.\n```bash\nnpx wrangler deploy\n```\n\n\u003e [!NOTE]  \n\u003e Once deployed, you will need to [configure the Worker](#configuration).\n\n## Configuration\n### Initial Setup\n[Visit this link to open the settings for your Cloudflare Worker](https://dash.cloudflare.com/?to=/:account/workers/services/view/:worker/production/settings). Under \"Domains \u0026 Routes\", copy the workers.dev domain, or set a custom one using the Add button. Keep the domain handy for configuration.\n\nNext, go to `https://\u003cyour_domain\u003e/choose`. Choose a service area that you want to share codes for. Then, go back using the \"Choose another\" link and visit all other service areas you want to share. This will create KV pairs for the service areas in realtime.\n\nAfterwards, [visit this link to go to the KV dashboard](https://dash.cloudflare.com/?to=/:account/workers/kv/namespaces/). Select the KV namespace for your Worker. Go to the KV Pairs tab at the top, and enter in your promo code links for `promo_region`. You can copy the code and replace the `CHANGE_KV` placeholder, or you can copy the link from the Waymo One app using the Share button. **This is how you will update your codes when they change, and set activated/deactivated status.**\n\nLastly, edit `config.json` as described below to your liking.\n\n### Configurable Options\n\n#### Supported Regions\nWaymo service areas are represented by a 2 letter code string, used in both KV and config.json. These are the currently supported regions. More regions will be added as refer-and-earn programs expand.\n\n- Los Angeles: `la`\n- San Francisco: `sf`\n- Phoenix: `az`\n\n#### config.json\n\nAccess `config.json` by going to the cloned GitHub or GitLab repository for your Worker.\n\n\u003e [!TIP]  \n\u003e As you likely do not have a code for every service area, it is recommended to set the `hiddenServiceAreas` setting.\n\n- `greeting`: string\n  - A greeting that will appear at the top of the page.\n    - Default: `Hey! Here's my referral code!`\n- `analyticsHeader`: html\n  - HTML code to embed in \\\u003chead\u003e (for analytics purposes)\n    - Default: No analytics are embedded.\n- `analyticsFooter`: html\n  - HTML code to embed in \\\u003cbody\u003e (for analytics purposes)\n    - Default: No analytics are embedded.\n- `hiddenServiceAreas`: string[]\n  - Array of service area code strings to hide.  \n    - Default: `[\"sv\"]`\n\n#### KV\nAccess KV settings by [visiting this link](https://dash.cloudflare.com/?to=/:account/workers/kv/namespaces/). Select your Worker's KV namespace, and then go to the KV Pairs tab at the top.\n\n- `promo_region`: URL \n  - Promo code URL for that region. Must have a querystring `?code=` that specifies a promo code.\n    - Default: `https://waymo.smart.link/4pcoqniy5?code=CHANGE_KV`\n\n- `promo_region-activated`: boolean\n  - Whether the code is active or not.\n    - Default: `true`\n\n## Future Roadmap\n- [x] Support multiple service areas  \n- [ ] iOS Shortcut to update promo code URLs using Workers KV API and Share Sheet\n\n## Notice\nThis tool is unofficial, and not developed by Waymo. Waymo and Waymo One are trademarks of Waymo LLC. I am not affiliated with Waymo in any capacity. With the exception of Waymo's car image in `public/waymo-half-shot.png`, this code is in the public domain under the Unlicense.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburritosoftware%2Fwaymo-promo-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburritosoftware%2Fwaymo-promo-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburritosoftware%2Fwaymo-promo-tool/lists"}