Arooo - A Room Of One's Own
- Arooo - A Room Of One's Own
🚀 🚀 🚀 ✨ ✨
- How to Contribute
- Production maintainer / SRE guide
🚀 🚀 🚀 ✨ ✨
This is a membership application app written by members of Double Union, a feminist hacker/makerspace for women in San Francisco.
This app is named after a famous Virginia Woolf essay, A Room of One's Own. You can learn more about it on Wikipedia!
Also, here is a puppy that is saying "arooo":
What does arooo do?
- Prospective members can apply for membership
- Current members can vote and comment on applications
- Current members can see a directory of members
- Current members adjust their dues via Stripe
- Current members can apply for scholarships
- Membership coordinators can manage member status
- Emails are sent for applicants, accepted member setup reminders, cancelling mailers, dues issues, and scholarship requests (see
The application supports three levels of membership: members, key members, and voting members, where any member can see and comment on an application, but only voting members can vote. Membership coordinators can set whether the app is accepting applications, accept or reject individual applications, manage membership levels, and review dues status.
It is currently very Double Union specific, but we'd like to extract the Double Union things out of it, so that other feminist hacker/makerspaces can use it, too! We open sourced the app so that we can work with other hacker/makerspaces on that process. This app supports an application process that helps us maintain a safe space for our members, and we want this app to help other groups that have the same goal. If you're interested in using Arooo for your org, feel free to use it as-is or fork it and do that! We would like to make arooo more reusable and all help is welcome :) Feel free to make an issue to discuss :)
To check out a couple of screenshots, see our Arooo announcement post.
How to Contribute
We use GitHub issues for feature development and bug tracking.
Anyone is welcome to make an issue or a pull request. We would love for first-time contributors to pick one of our good first issue issues :)
We have a mailing list! Feel free to ask any question, including basic git and ruby questions etc :) https://groups.google.com/a/doubleunion.org/forum/#!forum/public-du-code
If you are new to GitHub, you can use this guide for help making a pull request.
Do the below OR if you prefer docker, see the Docker Setup section
Steps to get set up to develop and run tests
- install a ruby version manager: rvm or rbenv
- when you cd into the project diretory, let your version manager install the ruby version in
gem install bundler
- Fork the repo (click the Fork button above), and clone your fork to your local machine. Here's a GitHub tutorial
- Make sure that postgres is installed brew install postgres OR brew postgresql-upgrade-database (if you have an older version of postgres)
cp config/database.example.yml config/database.yml
cp config/application.example.yml config/application.yml
bundle exec rake db:setup
bundle exec rake db:test:prepare
bundle exec rake spec
Steps to run arooo server locally
bundle exec rake populate:usersSet up data
bundle exec rails server
bundle exec rails consoleOptional - useful for looking at and changing your local data)
Docker setup (optional)
Install docker and docker compose
Duplicate db config
cp config/database.docker.yml config/database.yml
docker-compose run --rm app bash -c bundle
docker-compose run --rm app bundle exec rake db:setup
Set up an application for local OAuth:
- Application name: Whatever you want
- Homepage URL: http://localhost:3000
- Authorization callback URL: http://localhost:3000/auth/github/callback
- in config/application.yml set
GITHUB_CLIENT_SECRETto the Client ID and Client Secret from your Github application
- Don't forget to restart your Rails server so it can see your shiny new GitHub key & secret
- TODO: figure this out and write it down
Common errors and gotchas
- If you see the error
FATAL: role “postgres” does not exist, if you are on OSX with brew run
/usr/local/Cellar/postgresql/<version>/bin/createuser -s postgres
- Arooo depends on a fork of the
state_machinegem, because the original gem is no longer maintained. Fork is at https://github.com/compwron/state_machine, original gem is https://rubygems.org/gems/state_machine_deuxito .
bundle exec standardrb --fix # auto-fix linting issues (optional) more linter info
Tests, also known as specs, are great! Adding tests is a great pull request all on its own. Please try to write tests when you add or change functionality.
rake db:test:prepare after you pull or make any changes to the app, generally.
bundle exec rails spec passes before pushing your changes. (Our TravisCI integration will double-check before we merge code, so it's ok if you forget sometimes) :)
If you want to add a new kind of tests, or refactor the existing tests, do it!
The current User state machine can be found in
app/models/user.rb It is the main moving piece of the
visitor: default state, no admin access, no application access
applicant: not yet a member, no admin access, can only view/edit/save/submit their application
member: access to member admin section, cannot vote
key_member: access to member admin section, cannot vote, has keys to the space
voting_member: access to member admin section, can vote, has keys to the space
Manually changing a user's state
First, open a Rails console in a terminal window, from the same directory as the app:
Now you can update any user:
> user = User.find_by_username('someusername') > user.state # => "visitor" > user.make_applicant! # => true > user.make_member! # => true > user.make_key_member! # => true > user.make_voting_member! # => true > user.make_applicant! # => raises invalid state transition error > user.update_attribute(:state, 'applicant') # bypasses normal checks & succeeds
If you need to make or unmake an admin, have a current admin click the un/make admin button on a member in the Member Admin View. Admins can accept/reject applications, update any member's status, see current member's dues, open and close applications, and manage new member setup.
Production maintainer / SRE guide
Rails console - heroku
You only need this if you are deploying code, checking changes, or maintaining a production instance of arooo
Set up heroku commandline client: https://devcenter.heroku.com/articles/heroku-cli
$ heroku run rails console --remote staging
$ heroku run rails console --remote production
www.bugsnag.com is a heroku plugin that records errors in the production app. This is helpful for debugging. For bugsnag access, ask someone with access to the board@ section of 1Password to log into bugsnag and send you an email invite to create an account. Thank you to Bugsnag for their OSS program :)
Deploying and Heroku access
This section only pertains if you have heroku & deployment access
If you are a DU member, see https://docs.google.com/document/d/19LbIYB2RDy-17UXuQx6wLgKp2EdLdqj-pg1cm3EpSb8/edit for more information on getting permission.
- Add Heroku remotes to your
git remote --helpfor more instructions on how to configure git remote.)
Note: Only maintainers have heroku access and can deploy.
[remote "production"] url = email@example.com:du-arooo.git fetch = +refs/heads/*:refs/remotes/heroku/* [remote "staging"] url = firstname.lastname@example.org:doubleunion-staging.git fetch = +refs/heads/*:refs/remotes/heroku/*
- Pull down the latest code from
git checkout master git pull --rebase origin master
- If Travis CI tests are passing, push to the
git checkout master git pull --rebase origin master git push staging master
- If needed, perform rake tasks or set ENV variable settings on
- Test staging!
username: doubleunion password: meritocracyisajoke
- After confirming that the code works on
staging, push it to
git checkout master git pull --rebase origin master git push production master
- If needed, perform rake tasks or set ENV variable settings on
This app sends emails via AWS: TODO more info here
Currently neither github nor google auth works on staging- we should get this working again so we can actually test.
The basic-auth login is found in https://dashboard.heroku.com/apps/doubleunion-staging/settings under BASIC_AUTH_NAME/BASIC_AUTH_PASSWORD
This app sends emails, but who is our email provider? TODO
If you find a security vulnerability with Arooo, please let us know at email@example.com. Thank you!
Copyright (C) 2014 Double Union
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the LICENSE.txt file for the full license.