HomeNotesProjects

Built a micro-SaaS for fun. How?




I've built and deployed a micro-SaaS - actually I'm still working on it - and since it was a fun, enjoyable and learning experience, why not share it here?

For starters, I could say that there was a nice planning phase, but that would be a lie. The prototype was born on an Excel sheet. From there I picked my tech stack and started building.

Tech Stack

I know I probably over-engineered on this step, but this was supposed to be a fun experiment, so why not?

.NET 8 (C#)

The backend was entirely built using .NET 8 as this is the framework I'm most used to, so picking this one was a no-brainer for me. It's fast, it's reliable, it's scalable and it's simple to deploy so there isn't any reason not to use it.

PostgreSQL

On the data side of things I wanted a relational database. For the model structure I designed this was the best approach. Although this project could also work perfectly with a NoSQL approach. Why PostgreSQL? Mainly because SQL Server is too expensive to run in production and I wanted to use something different than MySQL/MariaDB this time. PostgreSQL also provides some different features and performance improvements, which, to be honest, won't be noticeable on my project unless I really scale.

Authentication: Firebase

It's free and fast to setup. I didn't want to implement an authentication system on my backend, so why reinvent the wheel?

Docker

It makes spinning up my local environment really straightforward and makes deployment much faster, so there wasn't any reason not to use it. I have my API (.NET), my PostgreSQL instance and pgAdmin on docker containers and everything just works.

NextJS

For the frontend I've used NextJS. I like React and I still want to get more hands-on experience with React, so I've just went with it. Since NextJS makes React development better (at least, for me) and already includes SSG, this was my choice.

WordPress

It may seem a bit odd, but I've picked WordPress for the landing page/blog. Fast to setup, SEO-ready and perfect for the blog.

Infrastructure

The entire infrastructure was built with scalability in mind. I can easily monitor each resource and scale them vertically if needed. Horizontal scaling, if needed, may need a bit more work but it's totally doable.

In a nutshell:

  • VPS for the API.
  • Managed DB PostgreSQL instance.
  • Hangfire for background jobs.
  • Authentication with Firebase.
  • Netlify for my NextJS app.
  • Cloudways for the landing page.
  • Sentry.io for logging and monitoring.
  • Cloudflare as DNS, SSL and caching.
  • GitHub for repository and CI/CD pipelines.


Development Process

Honestly, I work on this project on my free time, so I just pick a feature/bug when I get the time and start implementing it. I usually build both the backend and the frontend at the same time.

I organize my tasks on GitHub, using issues to keep track of bugs/improvements. I start my work session by creating a branch for the development I'm taking on. When it's done I just make a pull request to the main branch and my pipeline takes care of the deployment (both frontend and backend) and applies all necessary migrations to the database.

Next Steps

I'm happy right now since I have a production-ready and live application. I'm proud of what I've accomplished. I'll keep improving it with some UI/UX tweaks and new features that make sense for me and my end-users.

I still have to work on the most difficult step of launching any SaaS: marketing. So, a lot to learn there.

Final Notes

It's been a fun project overall. I was able to explore a few technologies and different approaches to software development. There are a lot of things I'll be able to reuse on future projects, which may make new ideas a lot faster to get to production. I know I could have simplified my tech stack a bit - but that's what I'm used with and, most importantly, it's what makes it fun for me to work.

Finally, it's a harsh realisation to see that it's WAY EASIER to get a product in production than it is to get actual people to use it. So, if I learned anything with this project is: Market validation is crucial!

I'm curious to see where will this project be in 3 months - note to make a follow-up on the project status in 3 months.

In case you're curious, the project is: PAYTICK (https://paytick.app).