Today, I want to show you a small approach of building your own Software-as-a-Service (SaaS) application with low or almost no expenses during development. This allows you to start building your application, run it already on the final instances and then scale it to your users need automatically.
Going cloud native
For that, your approach must be cloud native for your SaaS application. You can check out the different offers, which hyperscalers provides and select from numerous services and products. Using products like serverless functions and static web apps are low consumption services by default for these providers, which means that they can be offered at freemium based model.
As example: Azure Functions, which lets you build serverless functions, allows you up to two million requests per month for free. For every additional million, the prices are again even low at 0.18 CHF per million.
As a full stack developer, you now must think even more in pieces, in how to design your application to run in a cloud environment. You also should not only think about all the services, which one hyperscaler like Azure or AWS provides.
Offers
In this short list, I want to showcase some of the best services, you might can use to start building your own application:
Service type | Name |
Serverless functions (Backend) | Azure Functions AWS Lambda Functions |
Frontend application | Azure Static Web Apps Netlify |
Data storage (Backend) | MongoDB Atlas M0 cluster |
Please note, all the services above need to require a valid credit card and may also can charge for fees, if you are not cautious. Always keep that in mind when you use these services.
Example
In the architecture above, you can see a real example of such SaaS service. It uses the static web apps for providing a frontend website. These frontend websites communicate then with a backend which is created by Azure Functions. As already said, the Azure Functions provide up to two million requests per month for free, which the static web page is completely free with storage and traffic limits.
Next, we also can use the Azure Functions for triggers like cronjobs, which gets executed every 4 hours for example. To store the data somewhere, since the Azure functions are only up during the requests, we use MongoDB Atlas, which offers us up to 512MB completely for free for one database. There we can store the data in a NoSQL database and working here with collections and documents.
To authenticate the users, which can later use these services, we need also an IAM service provider. For that we can use Auth0, providing space for up to 7500 users. We can there enable various third-party logins like Google, Facebook or build our own database with email and password, now even with passkey support.
Finally, we also need to monetize our SaaS solution. We have different options to do so: One is to place ads inside your application. This could be done via Google AdSense, or you cooperate directly with potential advertisers.
As a second option, we could build different subscription plans and distribute that via Stripe. With that you can offer your users specific functions for a small price per month, which you can use to provide your services.
Conclusion
As you can see, there are a lot of different services to choose, how you can build your own SaaS application. And the best thing of it, most of them you can start for free. You mostly pay for that, what you really consume, or how it is called “Pay-as-you-go”. This free tier models of these services, allows you to build your application at mostly no cost and if you are ready, you can upgrade any time to the higher tiers (or of course stay at the free tier as long as you don’t need it).
This is a big game changer, when you think back years ago, where you had to subscribe a complete server or even build your own server. This causes a lot of capital costs. With the models of the cloud services, we can skip these initial costs and pay only then, when we also make money, with ads or subscriptions from the users.
This freedom comes also with some side effects, which you really should care about. Always check the conditions of these services by yourself, since they can change from time to time (the blog post is from July 2024). Also protect your used services by using all the possible security recommendations from the provider itself. Always protect secret keys and think about the open APIs, which could cost you money in case of a DDoS attack.
With that I just want to show you how to, that it is the best time, to build your own application, since you can start without any cost (only internet and computer is required). If you have a SaaS application built, please feel free to post a link in the comments.
Leave a Reply