Skip to content

nexpid/CloudSync

Repository files navigation

Icon Cloud Sync

A service built using Hono to save plugins, themes and fonts to the cloud.

You can find the API documentation here

Installation

# install without optionalDependencies
$ bun install --omit=optional

Selfhosting

Deploy to Cloudflare

Prerequsities

You need:

You will need to add an OAuth2 redirect URI to your Discord appliaction in the format of https://your-worker.workers.dev/api/auth/authorize. After that, create a .dev.vars file based on .dev.vars.example with all of your secrets filled in, then run:

# publish secrets
$ bunx wrangler secret bulk .dev.vars

Running

# development
$ bun run dev

# bench the size of your deployment
$ bun run dry-deploy

# deploy
$ bun run deploy

Silly service

A cron schedule that runs every day at 2:00 AM UTC which gives the bot a randomized avatar, banner and even FPTE color theme. This is disabled by default.

To enable this, you have to create a Discord Bot user for your application. After creating it, save its token in .dev.vars:

# optional and only used for Silly cron schedule
CLIENT_TOKEN="Bot [your token here]"

Then run:

# install with optional dependencies
$ bun install

# publish secrets
$ bunx wrangler secret bulk .dev.vars

Testing

There are some basic tests in the test folder, but if you're feeling brave enough, feel free to write some actual unit tests!

License

MIT

Footnotes

  1. setup guide is here

  2. creating a Discord bot (seperate from an application) is only required if you need a bot token (for exaple for the silly service)

  3. run bun run test/src/jwt.ts

About

A service built using Hono to save plugins, themes and fonts to the cloud.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project