The Guide to Tech Stack for Indie Hackers in 2023
The Ultimate Guide to Tech Stack for Indie Hackers in 2023
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:We will use cloud computing services like AWS, Azure or Google Cloud / Firebase.We will use the battle-tested, “boring” software stack with many libraries and utilities.We will not reinvent the wheel. For example: want to send emails? — use SendGrid; need authentication and authorization, but the framework doesn’t provide it out of the box? — use Auth0 or Firebase. I hope you got the idea.Okay, with expectations set, let’s see what’s out there that we can use for our projects.JamstackJamstack (JavaScript, API, Markup stack) is a novel approach to writing software for the web.In essence, it means thatYou will use a Static Site Generator (SSG) — there is actually quite a lot of them. I would recommend looking at Eleventy, Jekyll and Hugo. Writing plain HTML (see html5-boilerplate) 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, Cloud Functions etc.). One particularly good option is Firebase. It has everything you need — authentication, cloud functions, hosting, 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 or Alpine.js, but they are far from what React or Vue has to offer. Keep in mind, there is a particular reason we use SSGs. Frameworks like React use a thing called Virtual DOM which makes your website less SEO friendly, but luckily there is a solution:Next.jsNext.js 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 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, Nuxt, and SvelteKit, to name a few. They all provide similar functionality. Frankly, if you want the job done — Next.js is your best option, with tons of documentation, tutorials and libs.Old school full-stack frameworksSince 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 features we would prefer to have in the 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 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 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 your application vertically and horizontally, and caching 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, Ruby on Rails, Laravel and .NET. 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:DjangoDjango 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.StrengthsPython — fantastic language, a huge library of packages, massive community.User authentication built-in.Easiest among these four frameworks.Amazing documentation.WeaknessesWeak asynchronous support.Outdated approach to the front end. Whereas other frameworks provide you with the tools like Hotwire in Rails or 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 demonstrating Django’s capabilities.Ruby on RailsRails 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.StrengthsThe best framework here in terms of developer productivity.Hotwire.Good documentation.A lot of high-quality gems for every occasion.WeaknessesNo user authentication out of the box, though there are a few solid options that are relatively easy to integrate.Ruby language is not for everyone. However, if you don’t have strong preferences, I encourage you to try it before making any judgements.LaravelLaravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.StrengthsLivewire.Starter Kits.Perfect choice if you are already familiar with PHP.WeaknessesThe most verbose framework out of these four.Deployment process is quite complex, and it’s easy to shoot yourself in the foot..NET.NET is the free, open-source, cross-platform framework for building modern apps and powerful cloud services.StrengthsBlazor — .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.Amazing asynchronous programming support.Static typing.The default Identity framework 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.WeaknessesDocumentation could be better.Steep learning curve.A few words about the databaseEven 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 and PostgreSQL have everything you need, even the json types with indexing and are pretty cheap to spin up in the cloud.ConclusionSo, “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 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.