All Projects → where2help → where2help

where2help / where2help

Licence: AGPL-3.0 license
Rails app for the Refugee Hack Vienna 2015

Programming Languages

ruby
36898 projects - #4 most used programming language
CSS
56736 projects
HTML
75241 projects
SCSS
7915 projects
coffeescript
4710 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to where2help

cms
Legacy content management back end for the Integreat App - a multilingual information platform for newcomers
Stars: ✭ 22 (+15.79%)
Mutual labels:  refugees
integreat-app
React JS and React Native App for Integreat
Stars: ✭ 25 (+31.58%)
Mutual labels:  refugees
app-cross platform
Mobile guide for refugees - app frontend
Stars: ✭ 13 (-31.58%)
Mutual labels:  refugees
boxwise
A work on hold
Stars: ✭ 19 (+0%)
Mutual labels:  refugees
migrant service map
Refugees welcome
Stars: ✭ 23 (+21.05%)
Mutual labels:  refugees
integreat-webapp
React WebApp for Integreat
Stars: ✭ 12 (-36.84%)
Mutual labels:  refugees
integreat-cms
Simplified content management back end for the Integreat App - a multilingual information platform for newcomers
Stars: ✭ 46 (+142.11%)
Mutual labels:  refugees

Where2Help

Build Status Dependency Status

Development

Run the project locally

Install bundled gems

$ bundle install

Start up postgres (if not already running)

$ postgres -D /usr/local/var/postgres/

Setup the database

$ createuser --superuser postgres

$ rails db:setup

Populate database with sample data

$ rails db:populate

Start up rails!

$ rails server

Run the project in Docker

Make sure you have Docker and Docker-Compose setup and running.

Build the project

$ docker-compose build

Spin up the containers

$ docker-compose up

Setup the database

$ docker-compose run app rails db:setup

Populate database with sample data

$ docker-compose run app rails db:populate

Restart the server

$ docker-compose stop
$ docker-compose up

To run the server as an interactive shell (to use e.g. byebug or pry)

$ docker-compose run --service-ports app

Deployment

Heroku

Set up the following environment variables:

  • DATABASE_URL
  • SMTP_EMAIL_ADDRESS
  • SMTP_EMAIL_PASSWORD
  • FQDN
  • SECRET_KEY_BASE
  • RAILS_ENV
  • RAILS_SERVE_STATIC_FILE

CI

Travis CI is set up to automatically deploy to Heroku:

If you want to skip continuous integration for your commit, add this to your commit message:

[ci skip]

Contributing to Where2Help

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch, master should always be stable.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it, if possible.
  • If you're interested in working on an issue that has been assigned to somebody, we encourage you to get in touch with them first!

Styleguide

Ruby / Rails

Translations

  • the application is bilingual: English & German
  • everything visible to end users needs to be translated
    • views
    • ActiveRecord model-names and -attributes
    • error messages
  • translation strings are kept in /config/locales
  • please stick to the naming conventions:
    • model-names and model-attributes go into active_record.<locale>.yml
    • view-specific translations go into views.<locale>.yml
    • human language defaults go into defaults.<locale>.yml
    • if a gem needs a certain amount of translation strings, these go into <gem_name>.<locale>.yml
    • anything else (helpers, etc.) goes into <locale>.yml

CSS

  • use the .scss syntax
  • use @import over to import styles in application.css.scss
  • keep to the conventions of the application.css.scss manifest:
  • the granularity of rules increases top to bottom (general styles on top, more specific ones last)
    • global rules go into base/
    • page specific styles into pages/
    • site-wide used component rules go into base/components.scss (extract a components/ directory if it gets to big)

Development Environment

Sample Data

To set up a development environment, you can run this command:

Warning, this will drop your database 😱

bundle exec rake db:drop db:setup db:populate

This will:

  • drop your database
  • re-create it
  • load the schema (like running migrations but better)
  • run seeds
  • run the lib/tasks/db/populate.task command to load your database with fake data

On top of a bunch of other Event data and users, you will get:

Emails

You can use the gem letter_opener which opens your emails in a browser tab instead of just printing emails to the logs by running the app like this:

ENABLE_LETTER_OPENER=1 bundle exec rails server

If you run it without the ENABLE_LETTER_OPENER it will run as you would normally expect.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].