SlideShare a Scribd company logo
How to build a SaaS solution in
60 days using MeteorJS.
Brett McLain
Application Systems Architect
PotashCorp
About Me
• Application Systems Architect at PotashCorp
corporate office.
• Programming for 12 years.
• Married with a 20 month old son - free time
comes at a premium.
What am I going to talk about?
• Why I decided to build a SaaS solution.
• What is MeteorJS and why is it special?
• MongoDB
• Twilio
• Stripe
Background
• In 2009 I read this post on hackaday.com:
–http://hackaday.com/2010/01/15/gsm-car-
starter/
• The authors car starter had extremely poor range.
• He purchased a GSM controlled relay from China.
• Wired the relay to his car starters key fob.
• Calling the GSM relay would press the button on the
key fob.
hackaday.com device
Background
• My truck’s car starter was garbage as well.
• Purchased the same type of device from
China and implemented the same solution by
cannibalizing one of my car starters key fobs.
• Added a 12V adapter to plug into my
cigarette lighter.
My Device
Did others have the same problem
as me?
• Step 1 - Build a car starter.
• Step 2 - Buy some devices from China and put
them on eBay.
• Step 3 - Profit???
What else can these be used for?
• Common use cases for these devices are:
–Turning an irrigation pump on/off.
–Opening/closing a gate for gated communities.
–Starting a vehicle.
–Restarting remote servers.
–Wild animal traps (feral hogs).
• Sales grew over time: 3000+ devices sold and
nearly $500,000 in sales. Some customers are
operating over 100 devices.
Fast forward 4 years...problems...
• Customers were manually keeping track of
their devices in Excel spreadsheets.
• Each device has a “whitelist” of allowed
phone numbers that can call it. This list is
manually maintained in Excel as well.
• Complex syntax for SMS commands meant
that using these devices required training.
• Over one hundred different devices in their
contacts lists on multiple phones added
complexity.
Solution
• Build a centralized command and control web
application to manage these devices, send
and receive SMS & phone calls, abstract away
command complexity, control their
“whitelist”, monitor SMS usage, and review
audit logs.
Initial Requirements
• Needs to be a web application
– MEAN Stack (Mongo, Express.js, Angular JS, Node JS)
• Ideally can be compiled for mobile
– Phonegap
• Payments
– Paypal
• SMS & Phone Calls
– Twilio
• Reactive?
Quickly ran into problems…
• Needs to be a web application
– MEAN stack has a lot of moving parts.
– Need to establish patterns from the ground up.
• Ideally can be compiled for mobile
– Phonegap – good.
• Payments
– Paypal, frustrating test API/sandbox.
– Requires https to even begin testing on their modern API.
• SMS & Phone Calls
– Twilio – good.
• Reactive
– Didn’t know where to start.
MeteorJS to the rescue!
• Needs to be a web application
– MeteorJS provides a full cohesive stack right out of the box with
established patterns for everything.
• Mobile
– MeteorJS compiles to Phonegap.
• Payments
– Stripe.js is outrageously easy to use, same package as Node.js.
• SMS & Phone Calls
– Twilio uses same package as Node.js.
• Everything is reactive out of the box!
What is MeteorJS?
• Think of it as a skeleton into which a number
of components are inserted in a logical
manner to create a cohesive ecosystem for
application development.
• Out of the box it comes with most of what
you need, however you can swap out almost
any piece.
MeteorJS Features
• Compiling
–Isobuild Package Manager (coffeescript, less.js,
minifiers, templating compilation, npm packages,
cordova packages).
• Server Side
–Runs on Node.js.
–LiveQuery (Mongo or Redis) Replication Sets/oplog
tailing.
–Fibers/Futures for dealing with callback spaghetti.
MeteorJS Features
• Communication Layer
–DDP (Distributed Data Protocol)
–EJSON (Serializes Dates, Binary)
• Browser
–Tracker (backbone for reactivity).
–Iron router (routing).
–Blaze+Spacebars (templating).
–Minimongo.
–Hot Code Push.
–Session (reactive UI variables)
MongoDB Features
• Is a NoSQL, Document style database that
uses BSON (similar to JSON) for storing data.
• Has the concept of “databases”, and tables
(called collections).
• Strongly consistent (though that can be
changed).
• Sharding.
• High availability via replica sets.
MongoDB
MongoDB
MongoDB
So where to start?
• Tempting to just start building some initial
basic pages…
• Should really start with authentication first so
it’s baked in right from the start.
Authentication/Login
• Meteor provides an accounts package that
securely manages authentication for you.
• Install the base package to just use simple
username and password:
– meteor add accounts-base
– meteor add accounts-password
• Provides simple API’s for user creation, account
verification (email), login, password reset, and
forgotten password.
User Creation Code
Login Code
OAuth wut?
• Simple username and password is fine, but I
really love websites that allow me to use my
google account to login to their site. This is
called OAuth.
• “OAuth is an open standard for authorization,
commonly used as a way for internet users to
log into third party websites using their
Microsoft, Google, Facebook, or Twitter
accounts without exposing their password.” -
Wikipedia.
OAuth wut?
Google OAuth in 5 Minutes
• In MeteorJS you can implement Google
OAuth in less than 5 minutes.
• Step 1 -Add the accounts-google package:
–meteor add accounts-google
• Step 2 - Sign up for a google developer
account if you don’t already have one, then
go to the google developer console:
–https://console.developers.google.com/
• Step 3 - Create a project in the google
developer console.
Google OAuth in 5 Minutes
• Step 4 - Create OAuth client ID.
Google OAuth in 5 Minutes
• Step 5 - Add the OAuth keys to the MeteorJS
settings.json file. This makes them globally
accessible (private is server side only, public
is both client and server side).
Google OAuth in 5 Minutes
• Step 6 - Add the service configuration for
Google on the server side using the google
clientId and secret that was generated by
your OAuth client ID.
Google OAuth in 5 Minutes
• Step 7 - Add login code on the client.
Google OAuth in 5 Minutes
• Step 8 - Add an Accounts.onCreateUser() hook.
Google OAuth in 5 Minutes
Other OAuth Packages Available
● oauth-encryption
● accounts-password
● accounts-google
● accounts-facebook
● accounts-twitter
● accounts-weibo
● accounts-meteor-developer
● accounts-github
● accounts-meetup
● accounts-oauth
Auth is done, so what next?
• Build out the app to allow users to manage
their devices.
• Send and receive SMS, and place phone calls.
• Pay for their subscription.
• Let’s go over each of these.
Client side routing with iron-router
Manage User Devices
Manage User Devices
Client Side:
Server Side:
Manage User Devices
Send/Receive SMS with Twilio!
• Twilio is a service that sells you a phone
number and allows you to send/receive SMS
and phone calls using their API’s.
• Founded in 2007, SMS API released in 2010.
• Extremely cheap:
Setup Phone #’s
• Set up a phone number for each
environment.
Setup TwiML Apps
Send/Receive SMS with Twilio!
Send SMS:
Receive SMS:
Place a Phone Call with Twilio!
• Twilio uses TwiML, an XML-based language
that consists of five basic verbs for Voice
calls: Say, Play, Gather, Record, Dial.
Phonecall Callback
Show Me The Money
• Our service now displays some devices and
let’s you send/receive an SMS or phone call.
• How do you make money off your service?
PayPal?
• Initially used PayPal as I had some experience
with it from working on PHP based e-
commerce sites.
• Requires SSL for their modern API’s, however
older features such as PayPal buttons work
without SSL.
• Their TEST sandbox is a confusing nightmare.
PayPal sucks, Stripe.js is best!
• Stripe is a payment service that was founded
in 2010 by John and Patrick Collison.
• Went live 2012.
• Extremely clean and simple API.
• PCI compliant out of the box; nothing is
handled on the server side thanks to
Stripe.js!
Set up subscription plans in Stripe
Initialize Stripe.js on the Client
Add Credit Card Code
Client Side:
Add Credit Card Code
Server Side:
Create a Subscription
Subscription Changes/Billing
• Stripe allows you a user to change their
subscription at any time and pro-rate it.
• Changing the subscription is as simple as
updating which plan the user wants and
that’s it, no hassle refunding the customer or
messing around with account balances.
Conclusion
• I taught myself Meteor JS and built the
majority of this site over the course of 2
months.
• I have no time tracking data available and
unfortunately have no idea how much time I
spent on this.
Commit History
Punchcard
Questions?

More Related Content

What's hot (18)

PPTX
Azure and web sites hackaton deck
Alexey Bokov
 
PPTX
Java PaaS Vendor Survey - September 2011
Craig Dickson
 
PPTX
WinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf
 
PPT
Sebastien goasguen cloud stack and docker
ShapeBlue
 
PDF
Microservice With Spring Boot and Spring Cloud
Eberhard Wolff
 
PPTX
Sherlock Homepage - A detective story about running large web services (VISUG...
Maarten Balliauw
 
PPTX
Building Micro-Services with Scala
Yardena Meymann
 
PPTX
Giles sirett welcome and cloud stack news
ShapeBlue
 
PDF
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Docker, Inc.
 
PDF
Fuse integration-services
Christian Posta
 
PDF
Using Rancher and Docker with RightScale at Industrie IT
RightScale
 
PPTX
Jeffrey Richter
CodeFest
 
PPTX
Structured Container Delivery by Oscar Renalias, Accenture
Docker, Inc.
 
PDF
Mini-Training: Netflix Simian Army
Betclic Everest Group Tech Team
 
PPTX
Simple tweaks to get the most out of your JVM
Jamie Coleman
 
PPTX
ASP.NET Core deployment options
Ken Cenerelli
 
PPTX
NetflixOSS for Triangle Devops Oct 2013
aspyker
 
PDF
Secrets in Kubernetes
Jerry Jalava
 
Azure and web sites hackaton deck
Alexey Bokov
 
Java PaaS Vendor Survey - September 2011
Craig Dickson
 
WinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf
 
Sebastien goasguen cloud stack and docker
ShapeBlue
 
Microservice With Spring Boot and Spring Cloud
Eberhard Wolff
 
Sherlock Homepage - A detective story about running large web services (VISUG...
Maarten Balliauw
 
Building Micro-Services with Scala
Yardena Meymann
 
Giles sirett welcome and cloud stack news
ShapeBlue
 
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Docker, Inc.
 
Fuse integration-services
Christian Posta
 
Using Rancher and Docker with RightScale at Industrie IT
RightScale
 
Jeffrey Richter
CodeFest
 
Structured Container Delivery by Oscar Renalias, Accenture
Docker, Inc.
 
Mini-Training: Netflix Simian Army
Betclic Everest Group Tech Team
 
Simple tweaks to get the most out of your JVM
Jamie Coleman
 
ASP.NET Core deployment options
Ken Cenerelli
 
NetflixOSS for Triangle Devops Oct 2013
aspyker
 
Secrets in Kubernetes
Jerry Jalava
 

Viewers also liked (14)

DOCX
Build Your Own SaaS using Docker
Julien Barbier
 
PPTX
How to build, manage and operate a successful saas business
kanimozhin
 
PPTX
How To Deploy And Scale Meteor Applications
Designveloper
 
PPTX
Building a production ready meteor app
Ritik Malhotra
 
PDF
Building a SaaS with Nodejs, Docker, and CoreOS
Ross Kukulinski
 
PPTX
Saas Challenges and Solutions
Techcello
 
PDF
SaaS Model & Metrics - How to build a successful software business
Brian Hutchins
 
PPTX
Leveraging azure and cello for multi tenancy
Techcello
 
PDF
Leverage Azure and SQL Azure to build SaaS applications
Common Sense
 
PDF
How to Build a Great Cloud/SaaS Business Case Analysis for Technology Investment
Gotransverse
 
PPT
How do i build the right SAAS application
Keyideas Infotech Private Limited
 
PPTX
Building the Billion Dollar SaaS Unicorn: CEO Guide
Kelly Schwedland
 
PDF
2016 SaaS Metrics Report
Totango
 
PPTX
The SaaS business model and metrics
David Skok
 
Build Your Own SaaS using Docker
Julien Barbier
 
How to build, manage and operate a successful saas business
kanimozhin
 
How To Deploy And Scale Meteor Applications
Designveloper
 
Building a production ready meteor app
Ritik Malhotra
 
Building a SaaS with Nodejs, Docker, and CoreOS
Ross Kukulinski
 
Saas Challenges and Solutions
Techcello
 
SaaS Model & Metrics - How to build a successful software business
Brian Hutchins
 
Leveraging azure and cello for multi tenancy
Techcello
 
Leverage Azure and SQL Azure to build SaaS applications
Common Sense
 
How to Build a Great Cloud/SaaS Business Case Analysis for Technology Investment
Gotransverse
 
How do i build the right SAAS application
Keyideas Infotech Private Limited
 
Building the Billion Dollar SaaS Unicorn: CEO Guide
Kelly Schwedland
 
2016 SaaS Metrics Report
Totango
 
The SaaS business model and metrics
David Skok
 
Ad

Similar to How to build a SaaS solution in 60 days (20)

PPTX
Meteor Mobile App Development
Sanjay Kumar
 
PPTX
Meteor Meet-up San Diego December 2014
Lou Sacco
 
PPTX
Magnificent Meteor -By Dipali Vyas (PM Zestard Technologies) for GDG Ahmedaba...
Dipali Vyas
 
PPTX
Meteor node upnorth-bobdavies
Mark Skeet
 
PPTX
Laurentiu macovei meteor. a better way of building apps
Codecamp Romania
 
PPTX
Meteor Day - Nov 6 at La Commune
Michael Elfassy
 
PDF
Meteor presentation
scandiweb
 
PPTX
Gartner Catalyst: How to succeed with your IT Mobile Strategy
Lou Sacco
 
PDF
Introduction to Meteor - Worldwide Meteor Day
M A Hossain Tonu
 
PPTX
Meteor
Michael Elfassy
 
PDF
Getting Started with Meteor
Michael Redlich
 
PDF
Meteor WWNRW Intro
Stephan Hochhaus
 
PDF
Meteor Intro @viennajs
Gerwin Brunner
 
PPTX
Meteor js App Development
Sanjay Kumar
 
PDF
Meteor
IT Weekend
 
PDF
Meteor
IT Weekend
 
PDF
Meteor for IT weekend
Dmytro Ovcharenko
 
PDF
Meteor
Sergei Panfilov
 
PDF
Intro to Meteor [Deprecated]
MeteorJS
 
PDF
CraftCamp for Students - Introduction to Meteor.js
craftworkz
 
Meteor Mobile App Development
Sanjay Kumar
 
Meteor Meet-up San Diego December 2014
Lou Sacco
 
Magnificent Meteor -By Dipali Vyas (PM Zestard Technologies) for GDG Ahmedaba...
Dipali Vyas
 
Meteor node upnorth-bobdavies
Mark Skeet
 
Laurentiu macovei meteor. a better way of building apps
Codecamp Romania
 
Meteor Day - Nov 6 at La Commune
Michael Elfassy
 
Meteor presentation
scandiweb
 
Gartner Catalyst: How to succeed with your IT Mobile Strategy
Lou Sacco
 
Introduction to Meteor - Worldwide Meteor Day
M A Hossain Tonu
 
Getting Started with Meteor
Michael Redlich
 
Meteor WWNRW Intro
Stephan Hochhaus
 
Meteor Intro @viennajs
Gerwin Brunner
 
Meteor js App Development
Sanjay Kumar
 
Meteor
IT Weekend
 
Meteor
IT Weekend
 
Meteor for IT weekend
Dmytro Ovcharenko
 
Intro to Meteor [Deprecated]
MeteorJS
 
CraftCamp for Students - Introduction to Meteor.js
craftworkz
 
Ad

Recently uploaded (20)

PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
July Patch Tuesday
Ivanti
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Python basic programing language for automation
DanialHabibi2
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
July Patch Tuesday
Ivanti
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 

How to build a SaaS solution in 60 days

  • 1. How to build a SaaS solution in 60 days using MeteorJS. Brett McLain Application Systems Architect PotashCorp
  • 2. About Me • Application Systems Architect at PotashCorp corporate office. • Programming for 12 years. • Married with a 20 month old son - free time comes at a premium.
  • 3. What am I going to talk about? • Why I decided to build a SaaS solution. • What is MeteorJS and why is it special? • MongoDB • Twilio • Stripe
  • 4. Background • In 2009 I read this post on hackaday.com: –http://hackaday.com/2010/01/15/gsm-car- starter/ • The authors car starter had extremely poor range. • He purchased a GSM controlled relay from China. • Wired the relay to his car starters key fob. • Calling the GSM relay would press the button on the key fob.
  • 6. Background • My truck’s car starter was garbage as well. • Purchased the same type of device from China and implemented the same solution by cannibalizing one of my car starters key fobs. • Added a 12V adapter to plug into my cigarette lighter.
  • 8. Did others have the same problem as me? • Step 1 - Build a car starter. • Step 2 - Buy some devices from China and put them on eBay. • Step 3 - Profit???
  • 9. What else can these be used for? • Common use cases for these devices are: –Turning an irrigation pump on/off. –Opening/closing a gate for gated communities. –Starting a vehicle. –Restarting remote servers. –Wild animal traps (feral hogs). • Sales grew over time: 3000+ devices sold and nearly $500,000 in sales. Some customers are operating over 100 devices.
  • 10. Fast forward 4 years...problems... • Customers were manually keeping track of their devices in Excel spreadsheets. • Each device has a “whitelist” of allowed phone numbers that can call it. This list is manually maintained in Excel as well. • Complex syntax for SMS commands meant that using these devices required training. • Over one hundred different devices in their contacts lists on multiple phones added complexity.
  • 11. Solution • Build a centralized command and control web application to manage these devices, send and receive SMS & phone calls, abstract away command complexity, control their “whitelist”, monitor SMS usage, and review audit logs.
  • 12. Initial Requirements • Needs to be a web application – MEAN Stack (Mongo, Express.js, Angular JS, Node JS) • Ideally can be compiled for mobile – Phonegap • Payments – Paypal • SMS & Phone Calls – Twilio • Reactive?
  • 13. Quickly ran into problems… • Needs to be a web application – MEAN stack has a lot of moving parts. – Need to establish patterns from the ground up. • Ideally can be compiled for mobile – Phonegap – good. • Payments – Paypal, frustrating test API/sandbox. – Requires https to even begin testing on their modern API. • SMS & Phone Calls – Twilio – good. • Reactive – Didn’t know where to start.
  • 14. MeteorJS to the rescue! • Needs to be a web application – MeteorJS provides a full cohesive stack right out of the box with established patterns for everything. • Mobile – MeteorJS compiles to Phonegap. • Payments – Stripe.js is outrageously easy to use, same package as Node.js. • SMS & Phone Calls – Twilio uses same package as Node.js. • Everything is reactive out of the box!
  • 15. What is MeteorJS? • Think of it as a skeleton into which a number of components are inserted in a logical manner to create a cohesive ecosystem for application development. • Out of the box it comes with most of what you need, however you can swap out almost any piece.
  • 16. MeteorJS Features • Compiling –Isobuild Package Manager (coffeescript, less.js, minifiers, templating compilation, npm packages, cordova packages). • Server Side –Runs on Node.js. –LiveQuery (Mongo or Redis) Replication Sets/oplog tailing. –Fibers/Futures for dealing with callback spaghetti.
  • 17. MeteorJS Features • Communication Layer –DDP (Distributed Data Protocol) –EJSON (Serializes Dates, Binary) • Browser –Tracker (backbone for reactivity). –Iron router (routing). –Blaze+Spacebars (templating). –Minimongo. –Hot Code Push. –Session (reactive UI variables)
  • 18. MongoDB Features • Is a NoSQL, Document style database that uses BSON (similar to JSON) for storing data. • Has the concept of “databases”, and tables (called collections). • Strongly consistent (though that can be changed). • Sharding. • High availability via replica sets.
  • 22. So where to start? • Tempting to just start building some initial basic pages… • Should really start with authentication first so it’s baked in right from the start.
  • 23. Authentication/Login • Meteor provides an accounts package that securely manages authentication for you. • Install the base package to just use simple username and password: – meteor add accounts-base – meteor add accounts-password • Provides simple API’s for user creation, account verification (email), login, password reset, and forgotten password.
  • 26. OAuth wut? • Simple username and password is fine, but I really love websites that allow me to use my google account to login to their site. This is called OAuth. • “OAuth is an open standard for authorization, commonly used as a way for internet users to log into third party websites using their Microsoft, Google, Facebook, or Twitter accounts without exposing their password.” - Wikipedia.
  • 28. Google OAuth in 5 Minutes • In MeteorJS you can implement Google OAuth in less than 5 minutes. • Step 1 -Add the accounts-google package: –meteor add accounts-google • Step 2 - Sign up for a google developer account if you don’t already have one, then go to the google developer console: –https://console.developers.google.com/ • Step 3 - Create a project in the google developer console.
  • 29. Google OAuth in 5 Minutes • Step 4 - Create OAuth client ID.
  • 30. Google OAuth in 5 Minutes • Step 5 - Add the OAuth keys to the MeteorJS settings.json file. This makes them globally accessible (private is server side only, public is both client and server side).
  • 31. Google OAuth in 5 Minutes • Step 6 - Add the service configuration for Google on the server side using the google clientId and secret that was generated by your OAuth client ID.
  • 32. Google OAuth in 5 Minutes • Step 7 - Add login code on the client.
  • 33. Google OAuth in 5 Minutes • Step 8 - Add an Accounts.onCreateUser() hook.
  • 34. Google OAuth in 5 Minutes
  • 35. Other OAuth Packages Available ● oauth-encryption ● accounts-password ● accounts-google ● accounts-facebook ● accounts-twitter ● accounts-weibo ● accounts-meteor-developer ● accounts-github ● accounts-meetup ● accounts-oauth
  • 36. Auth is done, so what next? • Build out the app to allow users to manage their devices. • Send and receive SMS, and place phone calls. • Pay for their subscription. • Let’s go over each of these.
  • 37. Client side routing with iron-router
  • 39. Manage User Devices Client Side: Server Side:
  • 41. Send/Receive SMS with Twilio! • Twilio is a service that sells you a phone number and allows you to send/receive SMS and phone calls using their API’s. • Founded in 2007, SMS API released in 2010. • Extremely cheap:
  • 42. Setup Phone #’s • Set up a phone number for each environment.
  • 44. Send/Receive SMS with Twilio! Send SMS: Receive SMS:
  • 45. Place a Phone Call with Twilio! • Twilio uses TwiML, an XML-based language that consists of five basic verbs for Voice calls: Say, Play, Gather, Record, Dial.
  • 47. Show Me The Money • Our service now displays some devices and let’s you send/receive an SMS or phone call. • How do you make money off your service?
  • 48. PayPal? • Initially used PayPal as I had some experience with it from working on PHP based e- commerce sites. • Requires SSL for their modern API’s, however older features such as PayPal buttons work without SSL. • Their TEST sandbox is a confusing nightmare.
  • 49. PayPal sucks, Stripe.js is best! • Stripe is a payment service that was founded in 2010 by John and Patrick Collison. • Went live 2012. • Extremely clean and simple API. • PCI compliant out of the box; nothing is handled on the server side thanks to Stripe.js!
  • 50. Set up subscription plans in Stripe
  • 52. Add Credit Card Code Client Side:
  • 53. Add Credit Card Code Server Side:
  • 55. Subscription Changes/Billing • Stripe allows you a user to change their subscription at any time and pro-rate it. • Changing the subscription is as simple as updating which plan the user wants and that’s it, no hassle refunding the customer or messing around with account balances.
  • 56. Conclusion • I taught myself Meteor JS and built the majority of this site over the course of 2 months. • I have no time tracking data available and unfortunately have no idea how much time I spent on this.