Skip to content

finaIcutpro/integrations

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues project_license


Logo

Tickets Bot - Integrations

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
  1. About The Project
  2. Deploying
  3. Adding a new integration
  4. Contributing
  5. License

About The Project

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.

(back to top)

Built With

  • Cloudflare Workers
  • JavaScript

(back to top)

Integrations

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.

(back to top)

Deploying

Pushes to main trigger .github/workflows/deploy.yml, which:

  1. Discovers every folder containing a wrangler.toml.
  2. Runs npm install and wrangler deploy for 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].

(back to top)

Adding a new integration

Before writing any code, read INTEGRATION_STANDARDS.md — it defines what every Worker in this repo must implement.

  1. Create a new folder at the repository root (e.g. myservice/).
  2. Add index.js, wrangler.toml, and package.json.
  3. Commit and push to main — the deploy workflow auto-discovers the new folder.
  4. If the Worker should be reachable via the proxy, add an entry to SERVICE_BINDINGS in proxy/index.js and a matching [[services]] block in proxy/wrangler.toml, then redeploy the proxy (service bindings require the target Worker to already exist).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Top contributors

contrib.rocks image

License

Distributed under the MIT license. See LICENSE for more information.

(back to top)

Acknowledgments

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%