<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vinny Tunnell on Medium]]></title>
        <description><![CDATA[Stories by Vinny Tunnell on Medium]]></description>
        <link>https://medium.com/@vinny.tunnell?source=rss-18e9d46a11b0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rrvV26CvhJS4vef5roXzVg.jpeg</url>
            <title>Stories by Vinny Tunnell on Medium</title>
            <link>https://medium.com/@vinny.tunnell?source=rss-18e9d46a11b0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 09:48:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vinny.tunnell/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The best way to build a SaaS web App for free!]]></title>
            <link>https://towardsaws.com/the-best-way-to-build-a-saas-web-app-for-free-427afeb43b20?source=rss-18e9d46a11b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/427afeb43b20</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Vinny Tunnell]]></dc:creator>
            <pubDate>Sun, 05 Sep 2021 06:56:56 GMT</pubDate>
            <atom:updated>2021-09-08T03:52:06.270Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9SgBwrm6-Ou47_pJ" /><figcaption>Photo by <a href="https://unsplash.com/@dianamia?utm_source=medium&amp;utm_medium=referral">C Dustin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A great way to monetize your skills as a developer is to create a SaaS (Software as a Service) web app. There are many hurdles involved in the process of actually implementing a successful SaaS app though. This article describes the architecture for a <strong>full stack web app complete with authentication and payments</strong>. The architecture optimizes for <strong>cost</strong>, <strong>simplicity</strong>,<strong> scalability, </strong>and <strong>flexibility</strong>. I am personally using this exact setup for a SaaS app, and it is my favorite that I have used so far. This article is primarily<strong> focused on the</strong> <strong>infrastructure</strong> to use rather than the idea for the app or specific frontend framework.</p><h4>Cost</h4><p>When I say for free, I mean for free until you have enough users that you will likely make enough money to cover your cloud bill anyway. The architecture is entirely <strong>serverless</strong>, meaning you <strong>pay based on how many people are using your app </strong>rather than paying for servers that are constantly running. When you have less than ~10000 users, you will likely be well within the free tier for all of the services used and the infrastructure will be totally free.</p><h4>Simplicity</h4><p>The hardest part of any project is getting started. The services I have chosen for the web app are deliberately quite <strong>simple to get up and running</strong>. The fact that everything is serverless, means you don’t have to manually configure your own servers.</p><h4>Scalability</h4><p>Every aspect of the infrastructure scales up and down near infinitely, fully automatically. This means your app will be <strong>fast no matter how many people are using it</strong>.</p><h4>Flexibility</h4><p>I believe each cloud provider has its pros and cons and that it is ideal to write code that can be used for multiple cloud providers. Eventually at a large number of users, serverless may become more expensive than running your own server, so we want to <strong>avoid locking ourselves into specific serverless tools</strong> too much.</p><h3>The Infrastructure</h3><p>I chose Amazon Web Services (AWS) for the majority of the infrastructure for the app. <strong>AWS is both cheap and has an extremely large number of services</strong> that you might want to utilize for your app. Some AWS services have some drawbacks though, so I have chosen alternative services in these cases.</p><h4>Serverless Framework</h4><p>Clicking through the AWS console to create infrastructure is both time-consuming and error-prone. It is considered <strong>best practice to define cloud infrastructure as code</strong> (IaC) instead. This allows us to instantly see the services we are using, and the exact configuration for each of these. We can version control our infrastructure configuration templates. Even if we lose access to our AWS account, we can deploy our entire infrastructure again by running a single command line command.</p><p>There are many different IaC tools, including some made by AWS like Cloudformation. Since we want a <strong>simple tool that is also flexible to multiple cloud providers, I chose Serverless Framework</strong> instead. Serverless Framework contains many helpful plugins and components to simplify the development of a serverless application. They recently added a nice user interface that lets you monitor your deployed resources also.</p><figure><img alt="Serverless Framework console" src="https://cdn-images-1.medium.com/max/431/1*EvAzbqSQayvnnV_VNKSCEg.png" /><figcaption>Serverless Framework Console</figcaption></figure><p>For an extremely simple solution for the core infrastructure for the app, Serverless Framework provides a template for a full-stack app on AWS. The template deploys a pre-built boilerplate for a <strong>React frontend</strong> which is deployed to an <strong>S3 bucket with Cloudfront as a CDN</strong> to serve the site at fast speeds around the world. It deploys a <strong>NodeJS backend with an Express API</strong> that runs on <strong>Lambda</strong> and has <strong>API Gateway</strong> in front of that, so it is accessible via HTTP. Finally, it deploys a <strong>DynamoDB</strong> <strong>database</strong> that is already connected to the NodeJS and Express backend. It contains tools that allow you to develop and deploy everything via the command line and your favorite IDE. Here is the Github repository for the full-stack app template: <a href="https://github.com/serverless-components/fullstack-app">https://github.com/serverless-components/fullstack-app</a>.</p><p>The template may not contain everything you need. If you already built a React app, or if you used another frontend framework like Angular or VueJS, you can replace the content of the ‘site’ folder with your frontend code, and adjust the build directory specified in the serverless.yml file in the ‘site’ folder. This is what I did personally, as I had already created a React app.</p><p>For the backend, you are locked into NodeJS and Express for this specific template. Serverless also provides support for different languages and frameworks though. Here is a tutorial for building a backend with Python, Flask, and DynamoDB: <a href="https://www.serverless.com/blog/flask-python-rest-api-serverless-lambda-dynamodb/">https://www.serverless.com/blog/flask-python-rest-api-serverless-lambda-dynamodb/</a>. If you were using React for the frontend and Flask for the backend, you could follow that tutorial, and just use the ‘website’ part of the full-stack app template: <a href="https://github.com/serverless-components/website">https://github.com/serverless-components/website</a>.</p><p>NodeJS and Express for routing aligns with the flexibility goal of the infrastructure, as you can easily move an Express backend to be hosted somewhere else later if need be. If you had done all of the routings using API Gateway, you would have to write this again if you moved your API to be hosted somewhere else.</p><h4>Authentication</h4><p>The full-stack app template uses PassportJS for authentication. PassportJS is good for flexibility but does not quite hit the simplicity goal in my opinion. You still have to write a lot of code to manage authentication and store authentication states in your own database. I prefer to instead use a more managed authentication solution that handles a lot of the details for you and avoids the problem of maintaining sensitive user credentials yourself.</p><p>AWS provides an authentication service called Cognito, but I find this service to be confusing to use. Google Cloud Platform (GCP) provides a managed authentication service in their Firebase platform called <strong>Firebase Authentication. This service is extremely easy to use, and it is free for unlimited users.</strong> You can easily add support for signing in with Google and Facebook among many others, as well as username and password.</p><figure><img alt="Firebase Authentication console" src="https://cdn-images-1.medium.com/max/1024/1*akHS6Byk1AlDS2ea0120tg.png" /><figcaption>Firebase Authentication Console</figcaption></figure><p>To add support for Firebase Auth, you need to set it up using the Firebase console in GCP, then add the Firebase Admin SDK to your NodeJS backend following this tutorial: <a href="https://levelup.gitconnected.com/how-to-access-firebase-from-aws-lambda-f7f494dd435a">https://levelup.gitconnected.com/how-to-access-firebase-from-aws-lambda-f7f494dd435a</a>. You also need to add the firebase sign-in functionality to your frontend following a tutorial like this: <a href="https://firebase.google.com/docs/web/setup">https://firebase.google.com/docs/web/setup</a>. Once this is all set up, you can get the ID Token of the user in the frontend, then send this ID token to your backend and validate the token using the Firebase Admin SDK. This allows you to get a unique ID for the user, and store information against them in your DynamoDB database.</p><h4>Payments</h4><p>Without the ability to accept payments from users, you can’t make any money. Coding this functionality from scratch would be an absolute nightmare. Thankfully, managed services for payments exist. The most critically acclaimed service for accepting payments in 2021 is definitely Stripe. <strong>Stripe is very simple to set up, has great documentation, and has a beautiful user interface</strong>. Stripe takes a small percentage of each payment you accept and has no other costs for using it. This fee is well worth it in my opinion as it takes away a huge amount of the hassle of setting up payments. You can set up many different payment plans, including a monthly subscription, or a one-off payment.</p><figure><img alt="Stripe Pre-Built Checkout" src="https://cdn-images-1.medium.com/max/1024/1*dR14ZMJzoAGoMKQKLMtDag.png" /><figcaption>Stripe Pre-built Checkout</figcaption></figure><p>Stripe has a React package and an excellent tutorial for setting it up: <a href="https://stripe.com/docs/stripe-js/react">https://stripe.com/docs/stripe-js/react</a>. You will also have to call your backend to authorize the payment, so you will need to install the Stripe package in your NodeJS backend. I used the Stripe pre-built checkout which looks professional and takes away the need to write credit card forms yourself.</p><h3>Conclusion</h3><p>Once everything is set up, you will have a fully functioning SaaS app that costs you nothing until you gain a significant number of users. No doubt you will have to do your own research, as this article is just a guide on a good tech stack to start you off. Good luck building the next unicorn company!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=427afeb43b20" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/the-best-way-to-build-a-saas-web-app-for-free-427afeb43b20">The best way to build a SaaS web App for free!</a> was originally published in <a href="https://towardsaws.com/">Towards AWS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>