Roleypoly v3 (React + Remix + Cloudflare Workers)
Find a file
2020-12-21 05:49:28 -05:00
.devcontainer fix codestyle issues with devcontainer 2020-12-05 23:15:04 -05:00
.github ci: make metadata run parallel to the sync process 2020-12-18 19:57:01 -05:00
.husky chore: husky is still weird 2020-12-19 20:37:41 -05:00
.storybook storybook and template fixes 2020-12-03 11:32:09 -05:00
.vscode port full auth flow to cf workers 2020-12-05 03:09:20 -05:00
docs docs: update with better user story data classification for persistent data 2020-12-17 16:15:48 -05:00
hack chore: instead of HUSKY=0, just disable scripts. they aren't necessary. 2020-12-20 01:29:49 -05:00
src fix(RolePicker): make sure getInitialProps always returns 2020-12-21 05:17:02 -05:00
terraform infra: set public_uri vars in repo instead of from secrets 2020-12-21 05:37:36 -05:00
.babelrc.js fix a bunch of build issues 2020-12-03 10:16:15 -05:00
.dockerignore adjust tf to support digest tags 2020-12-06 08:46:16 -05:00
.env.example docs: update readme for quickstart 2020-12-11 21:45:59 -05:00
.eslintrc.js fix a bunch of build issues 2020-12-03 10:16:15 -05:00
.gitignore change KV emulation to leveldb, remove redis 2020-12-13 21:30:55 -05:00
.prettierignore chore: prettier ignore husky stuff 2020-12-19 20:40:39 -05:00
.prettierrc.js chore: fix markdown prettier formatting 2020-10-11 15:56:35 -04:00
.stylelintignore chore: fix storybook for realsies 2020-10-14 12:49:21 -04:00
.stylelintrc chore: fix storybook for realsies 2020-10-14 12:49:21 -04:00
docker-compose.yaml change KV emulation to leveldb, remove redis 2020-12-13 21:30:55 -05:00
go.mod codestyle issues 2020-12-13 18:18:21 -05:00
go.sum codestyle issues 2020-12-13 18:18:21 -05:00
jest.config.js start redoing ci/cd and devops 2020-12-02 21:44:49 -05:00
LICENSE re-init because of weird subtree shit 2020-09-15 22:25:26 -04:00
next-env.d.ts finish login story 2020-12-01 23:14:27 -05:00
next.config.js expose public URI routes in ui 2020-12-06 07:24:46 -05:00
package.json chore: remove tf lint-staged rule -- will revisit 2020-12-21 05:49:28 -05:00
README.md docs: update readme for quickstart 2020-12-11 21:45:59 -05:00
tsconfig.json chore: remove enzyme-react-17 type placeholder 2020-12-19 20:54:15 -05:00
tsconfig.stories.json fix a bunch of build issues 2020-12-03 10:16:15 -05:00
tsconfig.test.json start redoing ci/cd and devops 2020-12-02 21:44:49 -05:00
vercel.json chore: prettier 2020-10-10 04:36:22 -04:00
yarn.lock chore(deps-dev): bump eslint-plugin-jsdoc from 30.7.8 to 30.7.9 (#87) 2020-12-21 16:36:03 +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 both: yarn ui and yarn worker
    • 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 3 🐄🤠: Wrangler (No emulation)

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 ui

    • This starts the 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 storybook to open storybook
  • yarn test to test

Developing Web UI

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

Run:

  • yarn to install deps
  • yarn ui to run Next.js dev server
  • yarn test to test

Developing API Components

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

Run:

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