Thanks for your interest in contributing to SignMeUp! There is lots of potential to improve the app, including adding new features, fixing bugs, building out analytics, making it work at other universities, and much more.
Please follow our code of conduct, and help us do our bit in making open-source more welcoming and inclusive.
To report an issue or bug report:
- Open an issue and describe the problem along with the conditions under which you faced it, and any steps to reproduce the bug.
- Contribute to discussion from maintainers and other contributors.
- If you'd like to help fix the issue, ask to be assigned the task. A maintainer will help you get setup and guide you through the fix.
We have two different workflows, one for maintainers, one for external contributors. Maintainers work within the primary repo, whereas external
contributors fork the repo into their own, and open pull requests back into
master
.
Both begin by setting up the repo and running SignMeUp locally.
-
Install Meteor. This installs the Node runtime and the npm package manager too.
-
If you're a maintainer, clone this repository. Otherwise fork it, and install dependencies:
git clone https://github.com/<username>/signmeup.git cd signmeup meteor npm install -g yarn meteor yarn
-
Set up
settings.json
. To do so, start by copying the template:cp settings.template.json settings.json
Now we need to fill in various values inside
settings.json
.- Replace
INSERT-PASSWORD-HERE
with a good password. Feel free to add any extra user accounts if you want. - Optional: fill in the
google
settings to set up Google login. See instructions below.
- Replace
-
Run the app:
meteor --settings settings.json
-
Navigate to
localhost:3000
in your web browser to see SignMeUp running!
Note that to log into the test accounts you'll need to navigate to
localhost:3000/login
rather than clicking on the "Sign In" button.
The example settings.template.json
contains a test client ID and secret that should work locally for Google authentication.
If you want to use your own client ID and secret you can generate and install it using these instructions:
-
Visit the Google cloud console and sign into your account if you're not already signed in (note: an account managed by a third party such as Brown may not work).
-
Create a new project with any name and ID. If you already have a current project open you can select its name in the top bar and create a new project from the window that pops up.
-
Once the project has been created, go to its dashboard and select "APIs & Services". Then go to the "Credentials" pane using the left navigation bar.
-
Click "Create credentials" and select "OAuth client ID". You may be asked to configure a consent screen, which can be configured with any values of your choosing.
-
Select "Web application" and give it any name. Under "Authorized JavaScript origins", be sure to include
http://localhost:3000
. Under "Authorized redirect URIs", be sure to includehttp://localhost:3000/_oauth/google
. -
After clicking "Save", you should be presented with your client ID and secret. These values can be copied into your
settings.json
. -
After restarting your server you should be able to login with your Brown google credentials!
We follow a pretty simple workflow, with two primary branches:
master
is the current working branch.production
represents the publicly deployed version.
For small bug fixes and features, feel free to directly push to master
. When
working on anything larger:
-
Branch off of
master
into something likefeature/my-feature-name
. -
While developing, if you need to pull in changes to your branch that occurred after branching, use
git rebase master
. -
Once finished developing your feature, push to GitHub, and open a pull pull request to the
master
branch. -
Get feedback from other developers. You can continue pushing commits to the branch; these will be automatically reflected in the pull request.
-
Once approved, merge into
master
. Move on to developing something new.
If fixing a bug in production:
-
Branch off
production
into something likehotfix/fix-this-bug
. -
Once ready, push to GitHub, and open a pull request into
production
. -
Once approved, merge the pull request. Then merge
production
intomaster
so both branches are up to date.
When committing changes, there are a few important points to remember:
-
Use the imperative form. Instead of writing
fixed bug
, writefix bug
. This convention is helpful as it describes what will happen after your commit is applied. -
Write concise, descriptive messages about what changes were made and why. For example, prefer
Fix failing server call in createTicket
overgot createTicket to work!
. -
Reference issue numbers correctly. For example,
Fix #178: Add section about commit messages to CONTRIBUTING.md
.
To learn more about writing great commit messages, see this article.
In addition to the various Meteor debugging methods, we also have the free version of Meteor Toys package enabled. Once the app is running, type Ctrl+m to enable Mongol.
You can run meteor npm run prettier
to autoformat your JavaScript.
You can also run meteor npm run lint
to check your JavaScript and Stylesheets for any potential issues.
We recommend running these commands (and fixing any lingering issues) before committing your code.
Once you've merged a bunch of features into master
, and are ready to deploy to production, follow these steps:
-
Create a pull-request from
master
toproduction
detailing your changes, named something likeRelease 2.2.3: Add this feature, fix this bug
.We version our app in
major.minor.patch
format. Increment the patch number for bug fixes, and small additions. Increment the minor number when introducing new features. Increment the major version when the app has been majorly restructured, or your release culminates the development of many features. -
Once a collaborator has looked through your changes, merge the pull request into
production
. -
Create a new release on GitHub with good release notes. Name the tag and release something like
v2.2.3
. -
On your local machine, checkout the
production
branch. Create a file calledsettings.prod.json
and fill in all required values fromsettings.template.json
. -
Run
yarn deploy-prod
. -
After the app has been deployed (this may take a few minutes even after completing on your local machine) go to its settings in meteor galaxy and under "Domains" ensure that all domains have "Force HTTPS" turned on.