Best tech stack for indie hackers in 2023
Tags: discuss, webdev, productivity, beginners
Published: 2023-05-27 18:00:00

What is the best tech stack for indie hackers - solopreneurs or small/medium teams? What software framework should you choose? What database? Should you use old-school MVC-style frameworks or a new and fancy JavaScript-based one? In this post, together, we will go through all these questions and try to select a stack that will work for us!

---

Before we dive deeper, let’s start with a few remarks: 
- The first and most important one is - no “ultimate tech stack” will help you solve any problem. You should always **select the right tool for the job!** 
- Next, even though it could be a viable option, I won't take No-Code into consideration as I believe it’s a very niche solution. 

That said, let’s start by defining our expectations.

The most valuable asset we have is **our time**. To move fast, we must reuse as much software, technology, and infrastructure as possible. It means we should write as little boilerplate code as possible and spend as little time dealing with infrastructure as possible. Also, the technology we will use **should be easy to work with** and, at the same time, be **flexible** enough so that we can apply it to solve most of the problems. 

So, we can say that:
1. We will use cloud computing services like [AWS](https://aws.amazon.com/), [Azure](https://azure.microsoft.com/en-us/) or [Google Cloud](https://cloud.google.com/) / [Firebase](https://firebase.google.com/).
2. We will use the battle-tested, “boring” software stack with many libraries and utilities.
3. We will not reinvent the wheel. For example: want to send emails? – use [SendGrid](https://sendgrid.com/); need authentication and authorization, but the framework doesn’t provide it out of the box? – use [Auth0 ](https://auth0.com/) or [Firebase](https://firebase.google.com/). I hope you got the idea.

Okay, with expectations set, let’s see what’s out there that we can use for our projects.

---

## Jamstack
[Jamstack](https://en.wikipedia.org/wiki/Jamstack) (JavaScript, API, Markup stack) is a novel approach to writing software for the web.

In essence, it means that
- You will use a Static Site Generator (SSG) – there is actually quite a lot of them. I would recommend looking at [Eleventy](https://www.11ty.dev/), [Jekyll](https://jekyllrb.com/) and [Hugo](https://gohugo.io/). Writing plain HTML (see [html5-boilerplate](https://html5boilerplate.com/)) is also an option, but SSG allows you to extract most of the boilerplate into a separate template, saving you much time.
- Most likely, you will not have a “traditional” back end. Instead business logic of your app will reside partially on the front end and partially in the serverless functions (like [AWS Lambda](https://aws.amazon.com/lambda/), [Cloud Functions](https://cloud.google.com/functions) etc.). One particularly good option is [Firebase](https://firebase.google.com/). It has everything you need - [authentication](https://firebase.google.com/docs/auth), [cloud functions](https://firebase.google.com/products/functions), [hosting](https://firebase.google.com/products/hosting), [database](https://firebase.google.com/products/realtime-database) and many more. 
- You will use vanilla JavaScript to add interactivity to your web app.

Overall, it’s a very solid option. Using Firebase, you will have hosting, database and authentication out of the box. Cloud functions will enable you to create an API for both web and mobile. In addition, you will not need to manage any infrastructure; Google will handle everything. 

But there are a few significant downsides as well:

- The first downside is Cloud functions – the truth is that it’s harder to manage complex business logic using cloud functions compared to the old-school backend approach. Having many functions doesn’t help either. Also, keep in mind that each function call is basically an HTTP call. 
- The second downside is vanilla JavaScript. Of course, you can use tools like [petite-vue](https://github.com/vuejs/petite-vue) or [Alpine.js](https://alpinejs.dev/), but they are far from what [React](https://react.dev/) or [Vue](https://vuejs.org/) has to offer. Keep in mind that there is a particular reason we use SSGs. Frameworks like React use a thing called [Virtual DOM](https://en.wikipedia.org/wiki/Virtual_DOM) which makes your website less [SEO](https://en.wikipedia.org/wiki/Search_engine_optimization) friendly, but luckily there is a solution.

### Next.js

[Next.js](https://nextjs.org/) is a framework that allows you to create a rich user interface using React and gives you all benefits of SSGs - you can fully pre-render your React code into static HTML, choose to render your component server-side on each request or render component on the client side like regular React component. 

Note, Next.js is a [Node.js](https://nodejs.org/) application, so you will have an additional complexity of deploying, managing/scaling/monitoring it.

Also, there are a bunch of frameworks similar to Next.js: [Remix](https://remix.run/), [Nuxt](https://v2.nuxt.com/), and [SvelteKit](https://kit.svelte.dev/), to name a few. They all provide similar functionality. Frankly, if you want the job to be done – Next.js is your best option, with tons of documentation, tutorials and libs.

---

## Old-school full-stack frameworks
Since we agreed to not reinvent the wheel, we should pick a framework that will resolve most of the hassle for us. Also, ideally, we would like to master one framework and apply it to as many projects as possible. Learning and mastering a new framework takes time which we would better spend delivering functionality to our users and testing new hypotheses. 

Let's consider the features we would prefer to have in a framework:

- It should be a **full-stack framework**. Having front-end and back-end separately has advantages but also comes with significant complexity. For example, using a full-stack framework you can fetch data from the database, render a template and return an HTML page to the user in one flow. With separate front-end and back-end, you must export an API, make HTTP calls, handle possible HTTP exceptions, etc.
- The framework should have **built-in database integration**. It should be able to manage database migrations and have utilities to fetch data from the database
- It should be **easy to expose an API** for your users or your mobile application
- Since most applications require **user authentication** in some form, we would like our framework to provide it as well. Of course, you can argue that there’s an [Auth0](https://auth0.com/) which can be integrated into any framework, and you will be correct. But native authentication provides a few benefits over Auth0. For example, simple tasks like changing password, email or deleting an account will be provided for you by the framework, whereas doing it with Auth0 is trickier 
- Finally, even though it’s not a “must have” requirement, I would like to have the ability to integrate [**WebSocket**](https://en.wikipedia.org/wiki/WebSocket) easily in case I need to communicate with the user in real-time

I deliberately didn’t mention performance/scalability in the list above. Using the modern cloud, [scaling](https://en.wikipedia.org/wiki/Scalability) your application vertically and horizontally, and [caching](https://en.wikipedia.org/wiki/Cache_(computing)) correctly will allow you to scale your service infinitely. Most likely, your SQL database will become the bottleneck first.

Given everything we discussed so far, only a handful of frameworks satisfy all our requirements – [Django](https://www.djangoproject.com/), [Ruby on Rails](https://rubyonrails.org/), [Laravel](https://laravel.com/) and [.NET](https://dotnet.microsoft.com/en-us/). I won't delve into the specifics of every framework here. Each one is good and will help you go a long way. Instead, let's make a high-level comparison and understand their strengths and weaknesses.

One interesting observation I want to share with you is that a headline on each framework’s website 100% accurately represents the essence of the framework:


### [Django](https://www.djangoproject.com/)
“Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source.”

#### Strengths
- Python – fantastic language, a huge library of packages, massive community
- User Authentication built-in
- Easiest among these four frameworks
- Amazing documentation

#### Weaknesses
- Weak [asynchronous support](https://docs.djangoproject.com/en/4.2/topics/async/)
- Outdated approach to the front end. Whereas other frameworks provide you with the tools like [Hotwire](https://hotwired.dev/) in Rails or [Blazor](https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor) in .Net, to achieve the same in Django, you will have to hack everything together yourself
- No built-in asset pipeline

By the way, I have [an article](https://medium.com/@the-fedor/building-a-django-web-application-with-authentication-and-file-uploading-9154eb09f45c) demonstrating Django’s capabilities.

 
### [Ruby on Rails](https://rubyonrails.org/)
“Rails is a full-stack framework. It ships with all the tools needed to build amazing web apps on both the front and back end. Rendering HTML templates, updating databases, sending and receiving emails, maintaining live pages via WebSockets, enqueuing jobs for asynchronous work, storing uploads in the cloud, providing solid security protections for common attacks. Rails does it all and so much more.”

#### Strengths
- The best framework here in terms of developer productivity
- [Hotwire](https://hotwired.dev/)
- Good documentation
- A lot of high-quality gems for every occasion

#### Weaknesses
- No User Authentication out of the box, though there are [a few solid options](https://guides.rubyonrails.org/security.html#user-management) that are relatively easy to integrate
- [Ruby](https://www.ruby-lang.org/en/) language is not for everyone. However, if you don’t have strong preferences, I encourage you to try it before making any judgements


### [Laravel](https://laravel.com/)
“Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.”

#### Strengths
- [Livewire](https://laravel-livewire.com/)
- [Starter Kits](https://laravel.com/docs/10.x/starter-kits)
- Perfect choice if you are already familiar with PHP

#### Weaknesses
- The most verbose framework out of these four
- Deployment process is quite complex, and it’s easy to shoot yourself in the foot


### [.NET](https://dotnet.microsoft.com/en-us/)
“.NET is the free, open-source, cross-platform framework for building modern apps and powerful cloud services.”

#### Strengths
- [Blazor](https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor) – .Net has the most advanced front-end stack among these four frameworks
- The best user authentication functionality among these four frameworks, including session-based authentication, JWT and easy [external provider authentication](https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social/?view=aspnetcore-7.0&tabs=visual-studio)
- Amazing asynchronous programming support
- Static typing
- The default [Identity framework](https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-7.0&tabs=netcore-cli) is highly customizable and has a decent default user interface, so you will not need to create sign-in, sign-up etc. templates from the ground up

#### Weaknesses
•	Documentation could be better
•	Steep learning curve


### A few words about the database

Even though it’s not an absolute requirement, the above-mentioned full-stack frameworks assume that you will use an SQL database. Frankly, if you need a database, there’s no good reason to avoid the SQL database. Modern [MySQL](https://www.mysql.com/) and [PostgreSQL](https://www.postgresql.org/) have everything you need, even the [json types with indexing](https://www.postgresql.org/docs/current/datatype-json.html) and are pretty cheap to spin up in the cloud.

---

## Conclusion 
So, “What stack is the best then?” you could ask me… Well, the answer is – it depends:

- If you want to test a hypothesis and hack [MVP](https://en.wikipedia.org/wiki/Minimum_viable_product) together super fast, the **Jamstack** will be your best friend
- Use **Next.js + Firebase** or **.Net** if you’re building a highly interactive web interface
- If you’re just starting and don’t have experience with any of the frameworks – **Django** or **Ruby on Rails** will be your best options
- If you’re building an AI application and want to keep the ML model along with your other code together in the same service, pick **Django**
- If you are an experienced developer or a team, I strongly encourage you to try **.Net**. The Blazor functionality is simply unmatched by other frameworks. Also, static typing, exceptional asynchronous programming support and Identity framework are solid selling points
- If you want a "Swiss Army Knife" framework your best options will be **Ruby on Rails** or **.NET**

In the afterword, I want to emphasize once again that there is no “ultimate tech stack”. You should always research and compare your requirements with what each technology offers. I hope this article can serve as a starting point for your research and will guide you in the right direction.