Cloudflare Workers powering public integrations for Tickets — the simple, customisable and powerful Discord ticket system.
Explore the docs »
View Hosted Version
·
View Roadmap
·
Get Support
Table of Contents
This repository contains the Cloudflare Workers that power Tickets' public integrations. Each folder is an independent Worker with its own wrangler.toml and package.json, deployed via a shared GitHub Actions workflow.
The proxy Worker sits in front of the others: callers authenticate against the proxy once, and the proxy forwards matching requests to sibling Workers via service bindings so traffic stays on Cloudflare's network rather than egressing via the public internet.
| Folder | Purpose |
|---|---|
proxy/ |
Shared auth gate and router. Forwards requests for known hosts to sibling Workers via service bindings; everything else falls through to a public fetch(). |
fivem/ |
Resolves a Discord user to a player on a guild's FiveM server, with a KV-backed cache. |
bloxlink/ |
Resolves a Discord user to their linked Roblox account via Bloxlink, with a KV-backed cache. |
melonly/ |
Resolves a Discord user to their linked Roblox account via Melonly, with a KV-backed cache. |
Pushes to main trigger .github/workflows/deploy.yml, which:
- Discovers every folder containing a
wrangler.toml. - Runs
npm installandwrangler deployfor each in parallel.
New integrations are picked up automatically — no workflow edits needed.
Required repository secrets:
| Secret | Purpose |
|---|---|
CLOUDFLARE_API_TOKEN |
API token scoped to Workers Scripts: Edit, Workers KV Storage: Edit, Workers Observability: Edit, Account Settings: Read, User Details: Read. |
CLOUDFLARE_ACCOUNT_ID |
Cloudflare account that owns the Workers. |
Per-Worker secrets (set via wrangler secret put <NAME> from inside the folder):
| Worker | Secret | Purpose |
|---|---|---|
proxy |
PROXY_AUTH_HEADER |
Header name callers send the auth token in. |
proxy |
PROXY_AUTH_KEY |
Shared token expected in that header. |
fivem |
FIVEM_AUTH_KEY |
Static guard token; callers must send this in the Authorization header. |
bloxlink |
BLOXLINK_AUTH_KEY |
Static guard token; callers must send this in the Authorization header. |
melonly |
MELONLY_AUTH_KEY |
Melonly global verification key; callers must send this in the Authorization header. |
SENTRY_DSN for each Worker is configured in its wrangler.toml under [vars].
Before writing any code, read INTEGRATION_STANDARDS.md — it defines what every Worker in this repo must implement.
- Create a new folder at the repository root (e.g.
myservice/). - Add
index.js,wrangler.toml, andpackage.json. - Commit and push to
main— the deploy workflow auto-discovers the new folder. - If the Worker should be reachable via the
proxy, add an entry toSERVICE_BINDINGSinproxy/index.jsand a matching[[services]]block inproxy/wrangler.toml, then redeploy the proxy (service bindings require the target Worker to already exist).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT license. See LICENSE for more information.
- TicketsBot.net For creating the original Tickets Bot