There are a lot of resources for startups and programmers on how to create a mobile app, but there are very few resources to learn which infrastructure or tech stack to use, especially if you want to keep things cheap or free.
I’m serious, this is not clickbait, you can build a mobile app complete of frontend, backend and database for absolutely zero upfront and monthly cost. And what’s even better is that you will be able to serve a lot of users with this infrastructure for free and scaling is 100% automatic.
This all started when I wanted to make an app. I was working as a software developer for an IT company, but I wanted to build an app that I had in mind since the one that I was using sucked and being a very frugal person I didn’t want to waste money on it, if I wasn’t sure someone was gonna use it. I knew how to build it, but the problem was gonna be the cost, especially the fixed monthly cost even if I had no customer. So my journey began, I dove into the deepest part of the web to find how I could host a complete app without the need to spend even a single cent on the infrastructure, at least not until I had some users.
Needless to say, I’ve found a way.
The ZERO dollar solution
The tech stack that I ended up on, was not only completely free, but was also one in which I was familiar with and that (in my opinion) it’s pretty cool. This solution allowed me to scale to 10,000 active users before I had to pay even a dime. Now, with 25,000 DAILY active users, I spend around 300$ per month and I’ve added more things to it that are not strictly necessary. Without further ado, let’s see what the tech stack is composed of.
The ZERO dollar frontend
For my frontend I use react-native. And I love it. Honestly I think that whatever you choose here doesn’t really make a difference since all the major frontend frameworks are free.
Bonus points since we went with Expo, which makes everything so much easier and faster, two words that I really like.
I will not try to convince you to use react-native, but as an honest advice, try to choose a framework that is well documented and widely used or at least with an active community. This will prove very important when you need to solve some unknown and obscure issue that you will face.
The ZERO dollar backend
In my previous job I used to develop in C# and I really liked it. I’ve started learning C# when I was fourteen and I think that I’m pretty good at it. So, being able to use it as my backend was really mandatory for me. Luckily Mr. Microsoft made the amazing Azure.
Azure as a service called Azure Functions in which you can host your http functions on a server less backend, pretty amazing! The pricing for the functions is very generous, giving you 3,000,000 invocations per month for free, you are gonna be set for a while.
BONUS: this also solves a very big problem that I didn’t wanna face: servers. I hate them. I don’t like them and they don’t like me, probably because I don’t understand how they work and I’m bad at it, but being able to avoid them has completely changed our developing experience. We don’t need to worry about server load, updates, security, ghost processes taking 80% of RAM, nothing. We just write code and ship it with a click and scale automatically.
Honestly I feel like this was my best decision and it was the choice that made it possible for us to go faster than anyone else.
Backend: Azure Functions
The ZERO dollar database
Having my backend logic on Azure, it’s only natural that my database is here too. But databases are big and require a lot of resources so they must cost money, right? Nope. Azure offers an amazing database called Cosmos DB. Cosmos it’s a non-relational database much like mongo db, but it’s from microsoft and completely integrated inside Azure as a service. The best part, it’s that all Azure accounts come with a free Cosmos DB tier which is not that bad!
Honestly I had never worked with non-relational database before, but the experience was fantastic. One of the best thing is that it forces you to think about your app in advance and plan how you have to structure your data, having said that, adding things is super easy. Plus you can just query it in SQL so for me the switch was very welcome.
Database: Cosmos DB
Are there alternatives?
I’m sure that there are a lot more completely free alternatives out there and more will come, the point is not that this is the best, but this is a very resilient solution that will scale very easily. And since it is based on big companies, it won’t just crumble or stop working.
You can expand this tech stack as you like. For instance we needed to cache some data, so we added Redis Cache (also hosted as a service on Azure) for as little as 24$ per month.
All of our apps are now running on this tech stack and it’s something that I would suggest to anyone. Having used it myself I feel confident recommending it to others especially to those that are insecure.
Having a lightweight infrastructure that doesn’t cost you thousand of dollars per month, especially when you have no customers, it’s really something that would benefit a lot of startup founders.
If you are building a SaaS business and were wondering if we have a completely free solution for you, you are in the right place! We have written an article for that too, learn how to launch a saas business for free all included.
If you have any question please, feel free to contact us, we are always happy to talk to like-minded people. Also, if you are a startup founder or are interested in running a startup in the future you might like what we have built here at Sturppy, a financial modelling tool for startups that is fast and easy.
Good luck on your journey.