Roleypoly v3 (React + Remix + Cloudflare Workers)
Find a file
dependabot[bot] a8e3f5a754
chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-04 05:54:43 +00:00
.devcontainer Rewrite the bot process in Node/Discord.js (#206) 2021-03-31 15:35:07 -04:00
.github cleanup ci refresh merge 2022-02-06 23:34:38 -05:00
.husky chore: husky is still weird 2020-12-19 20:37:41 -05:00
.vscode Feat/editor category pass2 (#290) 2021-07-05 12:18:40 -05:00
docs docs: update with better user story data classification for persistent data 2020-12-17 16:15:48 -05:00
hack port bot to rust, upgrade response, and cut away some of the tf cruft 2022-02-06 19:16:08 -05:00
packages add terms and privacy 2022-10-21 10:19:15 -04:00
terraform create before destroy 2022-02-06 23:18:38 -05:00
.babelrc.js chore: update prettier tab width for consistency (#175) 2021-03-13 22:54:34 -05:00
.dockerignore adjust tf to support digest tags 2020-12-06 08:46:16 -05:00
.env.example feat: Slash Commands (#337) 2021-08-01 20:26:47 -04:00
.eslintrc.js chore: update prettier tab width for consistency (#175) 2021-03-13 22:54:34 -05:00
.gitignore big overhaul (#474) 2022-01-31 20:35:22 -05:00
.nvmrc big overhaul (#474) 2022-01-31 20:35:22 -05:00
.prettierignore big overhaul (#474) 2022-01-31 20:35:22 -05:00
.prettierrc.js chore: update prettier tab width for consistency (#175) 2021-03-13 22:54:34 -05:00
.stylelintignore chore: fix storybook for realsies 2020-10-14 12:49:21 -04:00
.stylelintrc big overhaul (#474) 2022-01-31 20:35:22 -05:00
docker-compose.yaml chore: update prettier tab width for consistency (#175) 2021-03-13 22:54:34 -05:00
LICENSE re-init because of weird subtree shit 2020-09-15 22:25:26 -04:00
package.json big overhaul (#474) 2022-01-31 20:35:22 -05:00
README.md big overhaul (#474) 2022-01-31 20:35:22 -05:00
tsconfig.json feat: Slash Commands (#337) 2021-08-01 20:26:47 -04:00
tsconfig.stories.json chore: update prettier tab width for consistency (#175) 2021-03-13 22:54:34 -05:00
tsconfig.test.json chore: update prettier tab width for consistency (#175) 2021-03-13 22:54:34 -05:00
yarn.lock chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 2023-02-04 05:54:43 +00:00

Roleypoly

https://roleypoly.com

Tame your Discord roles.

Need Help with Roleypoly? 💁‍♀️

📚 Please read through our community documentation.

😕 Still confused? Talk to us on Discord!

Developing

Roleypoly is a distributed system built with TypeScript, React, Terraform, and Go.

This app is heavily edge computing-based with the backend being deployed via Cloudflare Workers, UI server on Google Cloud Run with 8 regions, and the mention responder in Google Compute Engine.

Extra Development Docs

Quickstart

Option 1 🚀: E2E Dockerized Emulation

This is the fastest way to start. You must be using MacOS or Linux (WSL2 is ok!) for this to be successful.

  • Setup .env using .env.example as a template and guide.
    • When setting up your Discord Application, be sure to set http://localhost:6609/login-callback as the OAuth2 callback URL.
  • Run: yarn install
  • Run: docker-compose up
    • This starts the UI and API servers in hot-reload dev/emulation mode. All changes to TS/TSX files should be properly captured and reloaded for you!
  • Develop you a Roleypoly!

Option 2 🐱👤: Local Emulation

  • With pre-requisites:
    • Node.js 14, Yarn
  • Setup .env using .env.example as a template and guide.
    • When setting up your Discord Application, be sure to set http://localhost:6609/login-callback as the OAuth2 callback URL.
  • Run: yarn install
  • Run: yarn start
    • This starts the Web UI, Storybook, and API servers in hot-reload dev/emulation mode. All changes to TS/TSX files should be properly captured and reloaded for you!
  • Develop you a Roleypoly!

Option 3 🐄🤠: Wrangler (No emulation)

Outdated. This won't work, but could give you an idea of what to do.

This is probably extremely painful and requires you to have a Cloudflare account.

  • With pre-requisites:

    • Cloudflare Account
    • Node.js 14, Yarn
    • npm i -g @cloudflare/wrangler
      • Do wrangler init, wrangler login, etc...
  • Setup Wrangler for the project

    • Change account_id to your Cloudflare Account ID in wrangler.toml

    • Add a dev environment to wrangler.toml, using .env.example as a reference for how values should be set

      • When setting up your Discord Application, be sure to set http://localhost:8787/login-callback as the OAuth2 callback URL.
      [env.dev]
      
      [env.dev.vars]
      BOT_CLIENT_ID = ...
      UI_PUBLIC_URI = "http://localhost:6601"
      API_PUBLIC_URI = "http://localhost:8787"
      ROOT_USERS = ...
      
    • wrangler secret put BOT_TOKEN -e dev

    • wrangler secret put BOT_CLIENT_SECRET -e dev

    • Setup KV Namespaces -- Please follow the instructions listed after the command runs.

      • wrangler kvnamespace create -e dev KV_SESSIONS --preview
      • wrangler kvnamespace create -e dev KV_GUILD_DATA --preview
      • wrangler kvnamespace create -e dev KV_GUILDS --preview
  • Setup .env using .env.example as a template and guide.

  • Run yarn install

  • Run both wrangler dev -e dev and yarn start:web

    • This starts the Web UI and API servers in hot-reload dev mode. All changes to TS/TSX files should be properly captured and reloaded for you!
  • Develop you a Roleypoly

    • And get a beer or heated plant because oh no.

Developing Design System Components

For working with the Roleypoly Design System, use the below steps as reference. Code lives in src/design-system among elsewhere.

Run:

  • yarn to install deps
  • yarn start:design-system to open storybook
  • yarn test:design-system to test

Developing Web UI

For working with the Next.js frontend components, use the below steps as reference. Code lives in src/web among elsewhere.

Run:

  • yarn to install deps
  • yarn start:web to run Next.js dev server
  • yarn test:web to test

Developing API Components

For working with the API, use the below steps as reference. Code lives in src/api.

Run:

  • yarn to install deps
  • yarn start:api to start an emulated worker
  • yarn test:api to test