This is the repository for the Overwatch Workshop Website workshop.codes. Anyone is free to contribute or submit issues or requests regarding the website.
This website uses Ruby on Rails 6.0 and Elasticsearch. It's hosted on Heroku, using Bonsai for Elasticsearch.
The HTML and SCSS are structured according to BEM. JS does not follow any direct guidelines. Functions should be concise and limited. Files should be separated by their intent. No frameworks or libraries are used. Images should be losslessly compressed. SVG and WebP should be used wherever possible.
Follow this Wiki page to get started.
Create config/local_env.yml
There's several Environment vars that are required for some parts of the website. All of these are optional. These are:
SENDGRID_USERNAME
- Your Sendgrid Username for sending emailsSENDGRID_PASSWORD
- Your Sendgrid Password for sending emailsLOCKBOX_MASTER_KEY
- Lockbox Master key to encrypt email addresses (Run Lockbox.generate_key
to generate a key)BLIND_INDEX_MASTER_KEY
- Lockbox Blind index master key to search encrypted database fields (use ffffffffffffffffffffffffffffffff
during testing)-BNET_KEY
- Battle.net key for OAuthBNET_SECRET
- Battle.net secret for OAuthDIGITALOCEAN_SPACES_KEY
- DigitalOcean Spaces Key for image uploadDIGITALOCEAN_SPACES_SECRET
- DigitalOcean Spaces Secret for image uploadDIGITALOCEAN_SPACES_REGION
- DigitalOcean Spaces Region for image uploadDIGITALOCEAN_SPACES_BUCKET
- DigitalOcean Spaces Bucket for image uploadDIGITALOCEAN_SPACES_ENDPOINT
- DigitalOcean Spaces Endpoint for image uploadDISCORD_CLIENT_ID
- Discord Client ID for OAuthDISCORD_CLIENT_SECRET
- Discord Client Secret for OAuthDISCORD_REQUEST_URI
- Discord Request URI for OAuthDISCORD_NOTIFICATIONS_WEBHOOK_URL
- Discord webhook URL for new/updating PostsDISCORD_REPORTS_WEBHOOK_URL
- Discord webhook URL for submitting ReportsDISCORD_BUGSNAG_WEBHOOK_URL
- Discord webhook for Bugsnag errorsBONSAI_URL
- Used for ElasticSearch. When running ElasticSearch on your dev environment this can be any random string and it will assume you have ElasticSearch running.There are several rake tasks you can use to make development a little closer to production.
rake compress_impressions
generates user and post analytics. Click around the website before hand to generate impressions and events.rake hotness:set_hotness_for_posts
sets the hotness
or "On Fire" score for posts. This is based on impressions, events and favorites. To get useful data out of this, use the website at random before running this task.rake generate_wiki_articles
to populate the Wiki with Workshop documentation\rake create_search_indexes
to create indexes for ElasticSearchThere are 3 main launch tasks: Rails Server, Vite Dev Server, and Chrome. You can run all of them via the compound task "All".
The Ruby tasks require the VSCode rdbg Ruby Debugger extension, which requires you to install the debug
gem like so:
gem install debug
The Chrome task is set up to work with Source Maps, so setting breakpoints through VSCode should work.