Tame your Discord roles.
📚 Please read through our community documentation.
😕 Still confused? Talk to us on Discord!
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.
This is the fastest way to start. You must be using MacOS or Linux (WSL2 is ok!) for this to be successful.
- Setup
.envusing.env.exampleas a template and guide.- When setting up your Discord Application, be sure to set
http://localhost:6609/login-callbackas the OAuth2 callback URL.
- When setting up your Discord Application, be sure to set
- 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!
- With pre-requisites:
- Node.js 14, Yarn
- Setup
.envusing.env.exampleas a template and guide.- When setting up your Discord Application, be sure to set
http://localhost:6609/login-callbackas the OAuth2 callback URL.
- When setting up your Discord Application, be sure to set
- 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!
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...
- Do
-
Setup Wrangler for the project
-
Change
account_idto your Cloudflare Account ID inwrangler.toml -
Add a
devenvironment towrangler.toml, using.env.exampleas a reference for how values should be set- When setting up your Discord Application, be sure to set
http://localhost:8787/login-callbackas 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 = ...
- When setting up your Discord Application, be sure to set
-
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 --previewwrangler kvnamespace create -e dev KV_GUILD_DATA --previewwrangler kvnamespace create -e dev KV_GUILDS --preview
-
-
Setup
.envusing.env.exampleas a template and guide. -
Run
yarn install -
Run both
wrangler dev -e devandyarn 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.
For working with the Roleypoly Design System, use the below steps as reference. Code lives in src/design-system among elsewhere.
Run:
yarnto install depsyarn start:design-systemto open storybookyarn test:design-systemto test
For working with the Next.js frontend components, use the below steps as reference. Code lives in src/web among elsewhere.
Run:
yarnto install depsyarn start:webto run Next.js dev serveryarn test:webto test
For working with the API, use the below steps as reference. Code lives in src/api.
Run:
yarnto install depsyarn start:apito start an emulated workeryarn test:apito test