THE NEXT BIG THING OR JUST ANOTHER FAD? YOU DECIDE.
Sometimes there are ideas that change everything. Which one is Serverless? Let’s build something compelling and see for ourselves.
This video is a little outdated. I made it in 2016 and things have changed since then. The approach and ideas are sound and the code still works just fine - but there are new concepts (such as Firestore and a few other things) that I'll be addressing in the coming months.Buy Now $20
What You're About to Build
It's all about the code! Let's kick the tires on this serverless thing by actually building something interesting! A realtime ecommerce store.... You're about to code up:
A WEB SITE HOSTED BY FIREBASE, PROTECTED BY SSL UNDER OUR OWN DOMAIN
We'll generate a pure HTML ecommerce site using Middleman, the popular static site generator that uses Ruby. You don't need to use Middleman, you can use whichever app you like best!
CATALOG AND SALES POWERED BY THE FIREBASE REALTIME DATABASE
We'll use Node.js locally to load up our ecommerce platform, loading test data into the Firebase realtime system. We'll protect our data by setting up access rules and indexes.
A DIGITAL FULLFILLMENT SERVICE USING FIREBASE STORAGE
Once you sell something you have to deliver, and we'll do just that using Google's Cloud Storage, which is accessible from our Firebase Console. We'll set up expring, signed URLs to protect our assets and deliver them securely using Cloud Functions.
SERVER SIDE CODE RIGHT WHERE WE NEED IT USING CLOUD FUNCTIONS
We'll create routines to interact with Stripe, running charges and handling refunds. We'll also wire up functions to respond to discrete events happening in our realtime database, so we can execute the fulfilment process, interact with our email service (Drip) and...
PARANOID DATA RETENTION USING POSTGRESQL
I don't care what fad I'm working with as long as PostgreSQL is involved! Once our order is executed and fulfilled, we'll send the data over to PostgreSQL, hosted at Compose.io. All of this will happen in the background as our customers experience an interactive checkout
COMPREHENSIVE AUTHENTICATION USING FIREBASE AUTH
We'll set up authentication using common practices, including: email & password, OAuth with Github, Google and Twitter, and anonymous authentication using cookies and local storage. Firebase makes this part simple!
These videos have been 3 years in the making! I started this project in the spring of 2014 with a simple idea: what could I build without having to manage a server? The results were interesting, but not overly compelling. I wanted to SELL THINGS, and doing that by knitting together various services was a pain. Then came serverless and Firebase - let's get started!
One of the very nice things about Firebase is its hosting service. It's free and comes with SSL to boot. I like to use Middleman to help build the site out, but you don't have to! Use whatever tools you like, and serve the files with firebase serve.
Extremely simple to create with NodeJS. Simple to deploy, and fun to use, Firebase functions are incredibly flexible and fun. There are some tricks you need to know, however.
What are you doing this weekend?
Let's build something together! You might find something useful here... or maybe you won't. Either way you'll have an informed opinion, which is golden.
We'll plug in every aspect of a modern web application, all without logging into a single server. No SSH keys, convoluted deployment and worries about machine security.
Find out what the buzz is all about!