Maintainability (Codeclimate):
The core maintainers organize their to-dos in org-mode here: TODO.org
Swiss Crowdfunder is a Crowdfunding platform (doh).
This repository is the open source community version of https://eep-crowdfunder.com.
Crowdfunding using established platforms can be very expensive. Usually there is a fee of 12-20% that has to be paid.
Swiss Crowdfunder is open source - so it can be used by anyone to start their own crowdfunding platform or campaign.
-
Install RBenv
macOS:
brew install rbenv
Official rbenv documentation: https://github.com/rbenv/rbenv.
-
Install Ruby version 2.4.1
macOS:
rbenv install 2.4.1
-
Install bundler
gem install bundler
-
Clone the repository
-
Install dependencies
Within your local checkout run
bundle
.For testing, install
chromedriver
> v59. -
Configure Database
Every host that runs this application can have a different database configuration. There is an example configuration that runs on sqlite, however that you can easily use by:
cd config; ln -s database.yml.example database.yml; cd -
Alternatively you can configure PostgreSQL, MySQL or others.
-
Migrate Database
rake db:create db:migrate db:seed
-
Start Application
rails s
-
Run tests
Automatically run tests while development
guard
Note for Emacs Users: When using
enh-ruby-mode
, this will also automatically color your status bar either green on success or red on error. -
Live Reload
Using the Gems
guard-livereload
andrack-livereload
, development and saving of*.erb
files will reload your browser. Developing*.scss
files will also hot-load the respective CSS within the browser.
When cloning/forking your own version of Swiss Crowdfunder, there are some places where you can add your own configuration:
-
Deployment
Configuration is done through the config gem.
-
Copy the example configuration:
cp config/settings.local.yml.example config/settings.local.yml
-
Configure the corresponding settings files for your different stages and hosts in the
config/settings
folder -
config/deploy.rb
-
If you're using a fork of Swiss Crowdfunder, configure your
:repo_url
-
Configure where to get your
config/secrets.yml
file -
Configure Mattermost push notifications
-
If you want to use Mattermost push notifications, enable/disable them in
config/settings.yml
-
If you use Mattermost, configure the webhook endpoint that should receive the messages in the
config/settings.yml
-
-
-
config/deploy/*rb
-
-
config/secrets.yml
-
Either configure your own
config/secrets.yml
or set theSECRET_KEY_BASE
environment variable in production -
Configure your own servers for deployment
-
-
Deploy
We are using
capistrano
to deploy the newest version, roll back, compile assets and restart the app container.Deploy the newest version of
master
:cap production deploy
Optionally you can locally set a local ENV variable
REVISION
to set a different branch thanmaster
for deployment.
We have a public Mattermost chat channel for the Swiss Crowdfunder: https://brandnewchat.ungleich.ch/ungleich/channels/eep-crowdfunder
Otherwise, please open a Github issue or get back to us via email ([email protected] or [email protected]).
There is an ERD defined in dot-syntax which is also
available as .
The command to compile the SVG is: dot -Tsvg doc/erd.dot > doc/erd.svg
For the initial version of the application, there is only one route that can create entities, none that can update or destroy any. Creation of the resource only works on a valid model and has only the potential side effect of generating more money for the campaign. Apart from a brute force attempt of creating bogus data, there's little security risk involved.
Also, there's no concept of a logged-in user, yet. Therefore, there is
no global lock-down needed/possible. The cancancan
and device
gems
are in place, though, for authorization and authentication as soon as
supporters get the ability to create/modify/destroy any other data or
have the ability to log in.
The application is fully localized. Views are localized through standard Rails I18n practices. User generated content is localized through Globalize.
We are using CircleCI.