This repository is no longer maintained.
(open-sourced by Dollar a Day on October 30th, 2015)
Welcome! This is a Rails app that ran Dollar a Day, from October 1st, 2014 until October 30th, 2015.
Here's the gist of it:
Take the idea and do whatever you want! This codebase is here to help you if you want to do a similar thing ($5 a Day, $10 a Month, or even just a daily newsletter).
This is a Rails 4.1 app built on top of a lot of great services & open-source software:
For development environments, just install ruby >=2 and run this:
script/bootstrap_configs
And then fill in the necessary credentials in the generated config/*.yml files.
Then setup your database:
bundle exec rake db:create db:migrate db:seed
Pow as development server and rbenv as a Ruby version manager work great for running the webapp locally.
This app supports 2 payment methods:
Stripe
Network for Good:
The donation form is currently tailored for Stripe, so there'd be a little extra work to make it fit Network for Good again.
The app is built to send emails via Mailgun (over SMTP and their API). Other services could work too, but Mailgun has a useful UI and just works.
It should be easy to deploy this with capistrano, after filling out some info in the deploy files. Suggested setup for your servers is:
# m h dom mon dow command
*/15 * * * * export cd /apps/my_app_name/current; bin/rails runner -e $RAILS_ENV 'Cron.tab' > /tmp/cronout
NB: the User
model is currently reserved for admin use, for which it uses Devise.
SUBSCRIBER
|
-> EMAIL -> NEWSLETTER
-> EMAIL -> NEWSLETTER
-> EMAIL -> NEWSLETTER
-> ...
DONOR
|
-> SUBSCRIBER
|
-> EMAIL -> NEWSLETTER
-> EMAIL -> NEWSLETTER
-> EMAIL -> NEWSLETTER
-> ...
|
-> CARD
|
-> DONATIONS
|
-> DONATION-NONPROFIT -> NONPROFIT
-> DONATION-NONPROFIT -> NONPROFIT
-> DONATION-NONPROFIT -> NONPROFIT
-> ...
GIFT
|
-> GIVER_SUBSCRIBER
|
-> DONOR
|
-> SUBSCRIBER
|
-> EMAIL -> NEWSLETTER
-> EMAIL -> NEWSLETTER
-> EMAIL -> NEWSLETTER
-> ...
|
-> CARD
|
-> DONATIONS
|
-> DONATION-NONPROFIT -> NONPROFIT
-> DONATION-NONPROFIT -> NONPROFIT
-> DONATION-NONPROFIT -> NONPROFIT
-> ...