Skip to content

Instantly share code, notes, and snippets.

@arthuryeti
Last active November 4, 2015 23:27
Show Gist options
  • Save arthuryeti/81e3a17175a1b42e1973 to your computer and use it in GitHub Desktop.
Save arthuryeti/81e3a17175a1b42e1973 to your computer and use it in GitHub Desktop.

collection_sponsors.js

  • You need to create a package called sponsor.
  • The check with Helpers.isAdmin() need to done with allow/deny callback on collection.
  • Sponsors.insert need to be insertSponsor
  • Sponsors.remove need to be removeSponsor

routes.js

  • scrollToTop should be added in a filter that will be called onAfterAction on every pages
  • All the subscribe with a wait() method need to be put inside the function waitOn of Iron-router
  • The admin route need to check if the current user is an admin

stripe_recipient_form.js, stripe_customer.js and stripe_recipient.js

Why not using stripe checkout.js ? better support and builtin with everything.

admin.js

  • inDollars need to be done under a Utils namespace

create.js

  • 'submit #campaignForm' use autoform and put everything inside a before callback

login.js and signup.js

Why not using accounts-ui to provide those forms?

campaign_server.js, collections.js, transaction_server.js, transfer_server.js

Wrap every collection campaign,transaction, transfer into their own package and use simple-schema to define the database schema of each collection. We can use the validators of simple-schema to validate any insert or update.

external_api.js, stripe_methods.js

The stripe methods need to use the stripe package for server who provide sync methods instead of async.

loops.js

All the jobs need to be done with the package job-collection which is well written and made for this kind of case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment