Skip to content
Attendee portal for Hatch
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bin
client
config
db
lib
log
public
spec
vendor
volumes/proxy/templates
.dockerignore
.editorconfig
.env.example
.env.travis
.flowconfig
.gitignore
.nvmrc
.rspec
.rubocop.yml
.tern-project
.travis.yml
CODE_OF_CONDUCT.md
Dockerfile
Dockerfile.nginx-gen
Gemfile
Gemfile.lock
Guardfile
LICENSE
Procfile.dev
README.md
Rakefile
build-docker-dev.sh
build-docker-prod.sh
common.yml
config.ru
docker-compose-dev.yml
docker-compose-prod.yml
entrypoint.sh
package.json
prod-start.sh
project.cson
run-dev.sh
run-prod.sh
yarn.lock

README.md

Omni Dash

Build Status Code Climate

A one-stop shop for all information, news, and courses for your event. Originally created for the Hatch London event.

Getting up and running

Prerequisites

  • Ruby 2.3 or later (Matt is developing using 2.4.1)
  • Yarn or NPM (yarn is recommended)
  • PostgreSQL server, either local or otherwise (MacOS users use https://postgresapp.com/)
  • Redis server (required from 3b90062 onwards)

Some gems you'll need beforehand:

  • foreman (for running webpack + rails + livereload)
  • bundler (for grabbing project dependencies)
  • guard (for running livereload)

Install gems and javascript dependencies

NOTE

If you're using MacOS with Postgres.app, you need to configure bundler like so:

$ bundle config build.pg --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config

Get Rails + dependencies (you can run bundle install instead, but this keeps your local files nice and tidy):

$ bundle install --path=vendor/bundle

Install node dependencies. Use the --pure-lockfile option to ensure dependencies are exactly the same as the ones found in yarn.lock (recommended):

$ yarn --pure-lockfile

Setup the database

Copy the .env.example file to .env and edit with your favourite editor:

$ cp .env{.example,}
$ nano .env

RAILS_DB_HOST=localhost
RAILS_DB_PORT=5432
RAILS_DB_USER=postgres
RAILS_DB_PASS=
RAILS_ADMIN_USER_EMAIL=admin@example.com
RAILS_ADMIN_USER_FIRSTNAME=Admin
RAILS_ADMIN_USER_LASTNAME=User
RAILS_ADMIN_USER_PASS=password
  • RAILS_DB_HOST - Leave as localhost if you're running locally.
  • RAILS_DB_PORT - Leave this unchanged unless you changed the port.
  • RAILS_DB_USER - Username for the database. It's normally postgres.
  • RAILS_DB_PASS - Password for the database user, if it exists.
  • RAILS_ADMIN_USER_EMAIL - Email address for admin account
  • RAILS_ADMIN_USER_FIRSTNAME - First name of the admin account
  • RAILS_ADMIN_USER_LASTNAME - Last name of the admin account
  • RAILS_ADMIN_USER_PASS - Password of the admin account
  • RAILS_MAILER_FROM - "From" address for emails. Ignore for dev environment

We recommend leaving the RAILS_ADMIN_USER settings as the default values when developing. Never set the real password in your env file. You'll see why shortly.

Create the development and test databases, and migrate the tables.

$ bundle exec rake db:create
$ bundle exec rake db:migrate

Create the admin user, using the real password instead of <password> here.

$ RAILS_ADMIN_USER_PASS=<password> bundle exec rake db:seed

Run in development mode

Start the fans!

$ foreman start -f Procfile.dev

Now visit http://localhost:3000 to see the app!

Email tester

Install the mailcatcher gem as described on the project website

Then run the gem to start the mailserver and open the web interface to intercept app emails.

Testing

Rails tests are run with rspec:

$ bundle exec rspec

React app testing doesn't yet exist, but will almost certainly use jest like so:

$ yarn run test
You can’t perform that action at this time.