Skip to content
Fundraising App
Ruby JavaScript HTML CSS Other
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.
.circleci
app
bin
config
db
lib
log
public
scripts
spec
storage
tmp
vendor
.browserslistrc
.dockerignore
.env.template
.gitignore
.prettierignore
.rspec
.ruby-gemset
.ruby-version
.solargraph.yml
Dockerfile
Gemfile
Gemfile.lock
LICENSE
Makefile
Procfile
Procfile.dev
Procfile.dev-server
Procfile.hot
Procfile.spec
Procfile.static
README.md
Rakefile
babel.config.js
config.ru
package.json
postcss.config.js
renovate.json
yarn.lock

README.md

FUNDRAISING

Fundraising is a simple app for non profit organizations, that allows users to create an account using Discourse and donate to the organization. It contains the following features:

  • Simple donations payment management through Stripe.
  • One time donations through anonymous accounts.
  • One time donations through user accounts.
  • User subscriptions based on billing plans.
  • User dashboard to manage their own subscription.
  • Simple statistics for the Organization around donations.
  • Organization dashboard to create subcription plans.
  • Organization dashboard to manage subscribed users.

CircleCI

Table of Contents

Getting started

Ruby version

This project runs on Ruby 2.6.3

System dependencies

You'll need to have installed the following dependencies installed, if you don't want to use the provided Docker containers.

  • Ruby 2.6.3
  • Node > 11.12.0
  • PostgreSQL > 11.4
  • Foreman > 0.85.0

An instance of PostgresSQL needs to be actively running. Note: MacOS users can use the Postgres app.

Configuration

Have a ruby version installed, you can learn more about how to use multiple versions of Ruby installed in your computer with rbenv or rvm.

To get started with the app, clone the repo and then install the needed gems:

$ bundle install

Next, migrate the database:

$ bundle exec rake db:migrate

Finally, run the test suite to verify that everything is working correctly (This project uses rspec):

$ bundle exec rspec

If the test suite passes, you'll be ready to run the app in a local server:

$ foreman start -f <Procfile>

Note Learn more about using Foreman on your local machine

  1. Procfile.dev: Starts the Webpack Dev Server and Rails with Hot Reloading.
  2. Procfile.hot: Starts the Rails server and the webpack server to provide hot reloading of assets, JavaScript and CSS.
  3. Procfile.static: Starts the Rails server and generates static assets that are used for tests.
  4. Procfile.spec: Starts webpack to create the static files for tests. Good to know: If you want to start rails s separately to debug in pry, then run Procfile.spec to generate the assets and run rails s in a separate console.

User sessions

We use cookie based authentication across subdomains instead of creating sessions between apps. This provides a better experience and fixes out of sync sessions between Discourse and other apps. Read how to setup a user session.

Developer notes

Running Foreman

Foreman has the following note around installing this gem.

Ruby users should take care not to install foreman in their project's Gemfile.

Therefore as a developer, you're expected to run

 gem install foreman

And run the commands using your gemset installation of foreman.

Formatting

We are using Standard that is a wrapper on top of Rubocop with a predefined set of Rules. If you use VS Code you will want to install vscode-ruby extension and enable formatting on save.

To enable formatting on save add these lines to your settings.json.

{
  "[ruby]": {
    "editor.formatOnSave": true
  },
  "ruby.lint": {
    "rubocop": true
  },
  "ruby.format": "rubocop",
  "editor.formatOnSaveTimeout": 5000
}

We're also using standardjs and prettier to standarize our JavaScript development. This is running automatically on a before commit hook using husky.

You can’t perform that action at this time.