Intercode is a web application that:
- serves as the public-facing web site for a convention
- automates signup and payment
- automates business processes for the convention staff
The original Intercode was written in PHP by Barry Tannenbaum for Intercon New England, and has since been used by several other conventions around the world.
Intercode 2 was a ground-up rewrite of Intercode, making it more robust, more flexible, and more modern. Starting at version 3.0.0, we've used semantic versioning for our releases.
- Backend: Ruby on Rails application exposing a GraphQL API and an OpenID Connect-enabled OAuth2 server
- Frontend: React and Apollo-based single-page JavaScript app
- Database engine: PostgreSQL
- Background queue system: Amazon SQS + Shoryuken (this might change in the future)
- Production infrastructure: For New England Interactive Literature's installation of Intercode, we're hosting it on Fly.
- Intercode in development mode uses
intercode.test
as its cookie domain. If you uselocalhost
to visit the site, that will mysteriously fail. I'm going to try to make the site detect the wrong domain and redirect you, but for now, please just use theintercode.test
domain name. - We used to support a Docker Compose-based development workflow, but this has been deprecated. Please run Rails locally using the instructions below.
This is the classic Rails development setup, and should work for Mac and Linux users.
-
Clone this repository:
git clone https://github.com/neinteractiveliterature/intercode.git
-
Make sure you have a working C/C++ development toolchain installed. On macOS, that's Xcode and its Command Line Tools.
-
Install rbenv
-
Install ruby-build
-
Edit your hosts file (typically found in
/etc/hosts
on Mac and Linux systems) and add the following line:127.0.0.1 intercode.test
-
cd
to the Intercode source folder, all the remaining steps should be performed in that folder. -
Copy
.env.development.local.sample
to.env.development.local
and follow the instructions in that file to set up keys for various external services. You'll almost certainly need to set up reCAPTCHA; the others are probably best left until you really need to. -
Install all the dependencies of Intercode:
- Install the Ruby version Intercode requires:
rbenv install
- Install Bundler:
gem install bundler
- Install PostgreSQL. With Homebrew:
brew install postgres
- Make sure you have Node.js installed. With Homebrew:
brew install node
- Make sure you have Yarn installed. With Homebrew:
brew install yarn
bundle install
- Install the Ruby version Intercode requires:
-
Generate self-signed certificates to support HTTPS
gem install toys
toys setup_tls
-
Set up your local database:
bin/rails db:create db:migrate
-
Install JavaScript packages:
yarn install
-
Start up the Intercode server:
bin/rails server
-
Start up the Webpack server:
yarn run start
-
You should now be able to go to https://intercode.test:5050 and see the app running!
-
Click the user icon in the upper right of the navigation bar and choose "Sign up" to sign up for an account in your local copy of Intercode.
-
To make yourself a superadmin in your local copy, run
./bin/rails console
. At the Rails console prompt, typeUser.first.update!(site_admin: true)
. This will set thesite_admin
flag on your account in the database, giving you superadmin powers.
If you want to test how the app runs in production, but using your local development installation, you can do so as follows:
- Build Docker images for Intercode:
docker build --target production -t local-intercode-production .
- Install the
dev-proxy
npm package:npm install -g dev-proxy
- Run
dev-proxy
to start proxying HTTPS locally:dev-proxy -p 5051:5050
- Run something like the following command, changing the asset host as necessary for your setup:
docker run -it -p 5051:3000 -e DATABASE_URL=postgresql://[email protected]/intercode_development -e RAILS_LOG_TO_STDOUT=true -e ASSETS_HOST=//intercont.intercode.test:5050 -e RAILS_SERVE_STATIC_FILES=true local-intercode-production bin/rails
- Visit https://some-convention-domain.intercode.test:5050, probably using Firefox (it seems to deal better than Chrome with self-signed certificates these days).
To contact the Intercode project team, you can:
Participants in the Intercode project are expected to follow the Contributor Covenant. For details, see CODE_OF_CONDUCT.md.
Intercode is released under the terms and conditions of the MIT license. Please see the LICENSE file for the full legalese.