12
46 Comments

What’s the Best Framework for Building B2B SaaS Apps?

As a React developer who wants to become a full stack developer, I have a question for all the B2B SaaS developers out there: what framework(s) do you guys use?

I’m interested in building multi-tenant SaaS apps, like Basecamp, where each organization has its own account with multiple members.

I’m looking for a framework that is easy to learn (because I’m self-taught) and fast to develop (for building MVPs).

What are your recommendations and why? What are the pros and cons of each framework? How did you learn them and what resources did you use?

Please share your thoughts and experiences in the comments. I appreciate your help and feedback.

  1. 8

    I am thinking about the same question as you.

    I'm also a self-taught developer. I currently learn the MERN stack (Mongo, Express, React, Node). To me, it looks pretty good.
    I like the way MongoDB works with Express on the backend. It feels like a good way to learn the basics of programming. It has also been important for me that I am learning Javascript as it both allows me to build my own product ideas while I learn a technology (Node.js + React) that can help to get hired or find jobs quickly (at least it appears that there quite a lot of junior dev jobs available for someone with this type of Javascript experience).

    However, based on my research I do believe that there are better choices than MERN if you want to be a one-person entrepreneur.

    Rails - based on Ruby
    The most famous framework for the one-person entrepreneur is probably Rails. Based on what I read it got a huge library of tools that makes it easy and fast to launch new applications. It seems like Ruby on Rails 7 + Hotwire + Tailwind CSS + Stimulus JS should be an amazing combo. This should also reduce the need for a tool like React.

    Other Javascript web frameworks
    In the Javascript world, there are two interesting React-based web frameworks:
    Remix
    Next

    Especially Remix looks very good to me. It was just acquired by Shopify so it can be a good sign.

    Next seems to be more used/more popular.

    Blitz and Redwood also seem to be quite powerful full-stack frameworks.

    I have also looked at other Javascript-based frameworks: Nest, Adonis, Sails, Ember, Meteor, Adonis.

    Then there is Laraval - based on PHP.

    Django - based on Python.

    Phoenix - based on Elixir.

    Spring - based on Java.

    Some indie hackers also recommend using the so-called SaaS boilerplates. They contain UIs, and business logic to manage authentication, onboarding flows, profile pages, payments, etc.

    For Rails:
    Bullettrain
    Jumpstartrails

    For Node.js and React
    Usegravity
    Wasp-lang

    I didn't research boilerplates for the other frameworks.

    Would be great to have some of the experienced indie hackers share their views on web frameworks and boilerplates.

    1. 4

      Wow, thank you for your detailed and informative comment. You have done a lot of research on different frameworks and boilerplates. I appreciate you sharing your findings and opinions with me. I’m also learning the MERN stack right now, but I’m curious about other options as well. I have heard good things about Rails and Remix, but I haven’t tried them yet. I’m also interested in the SaaS boilerplates you mentioned. They sound like a great way to save time and effort on building common features. Do you have any experience with using them? How do they compare to building from scratch? I would love to hear more about your journey and what you are working on. Thanks again for your help.

      1. 3

        Regarding SaaS boilerplates, they can be a fantastic resource to save time and effort when building common features. They provide pre-built UIs and business logic for various functionalities like authentication, payments, and more.

        If you are currently learning the MERN stack, I think you will be interested by Modern MERN. It's built on the MERN stack (MongoDB, Express, React, Node.js) and designed to help you kickstart your SaaS project efficiently. Modern MERN provides a solid foundation for building scalable and modern web applications.

        It might be a valuable resource for accelerating your SaaS development process.

        If you have any specific questions about Node.js SaaS Boilerplate or if there's anything else you'd like to know, feel free to ask. I'm here to help!

        For your information, I'm the author of the Modern MERN.

    2. 1

      ExpressJs is very good, but unfortunately it uses a lot of deprecated / unmaintained libraries, and full of vulnerabilities that can make also your app vulnerable.

      I recommend fastify, and very similar to expressjs.

  2. 5

    The best framework is the one you personally fell most comfortable working on. Don't get attach to others personal preferences. The stack people use is just the mean to accomplish wathever they are building.

    As a main dev person for the past 16 years+, what I could tell you is to focus on delivery a solution, and not go delivery a solution using X. You will learn people don't give a crap on what you are using under the hood if it solves there problem.

    Just look around the amount of money people are still doing selling spreadsheets.

    1. 1

      Thank you for your comment. I agree that the most important thing is to deliver a solution that solves the problem of the customers. I also understand that different frameworks have different strengths and weaknesses, and that personal preference plays a role in choosing one. However, I still want to learn from other developers who have built B2B SaaS apps and see what frameworks they use and why. I think it can help me make better decisions and avoid some pitfalls. Do you have any specific framework that you use or recommend? What are the benefits and challenges of using it? I would appreciate your insight and experience. Thanks again for your help.

  3. 3

    The best framework is the one you know and can be most productive in. My 2c... it's more important to understand the tradeoffs you're making by choosing a particular stack/framework/tool.

    For example... trading easy development of standard functionality (auth, subscriptions) at the start of a project can mean getting boxed in later on when you hit the limits of a no-code solution. Limitations last thing you want to be dealing with if you find great product-market fit and the business if moving quickly.

    Alternatively, working with a "no batteries included" solution can cause you to waste excess time on boilerplate that doesn't necessarily advance your business. The amount of functionality required to stand up even a simple SaaS app is mind-numbing.

    Plug... navigating this tradeoff is the exact material I'm teaching at https://saas-from-scratch.com I'm an engineer at a FAANG on one of the largest web apps in the world and you'd be shocked to know how long the lifespan of initial decisions affects your application.

    TLDR on the material: RedwoodJS is an excellent balance between no-code & no-batteries-included. If you know JS, combine it with some instruction on the basics to minimize time spent on boilerplate while retaining max flexibility in the future. Then, use your boilerplate template as starting point for each idea/iteration. Build once, build right then template. I've looked at everything out there and this is where I've landed.

    1. 2

      Great idea for a course: SaaS-from-scratch

    2. 1

      Thank you for your insightful reply. I agree with you that it’s important to understand the tradeoffs of each framework and choose the one that suits your needs and goals. I appreciate your perspective as an engineer at a FAANG company. That’s impressive!

      I have not heard of RedwoodJS before, but it sounds like a promising framework for building B2B SaaS apps. I’m curious to learn more about it and how it balances between no-code and no-batteries-included. How did you discover RedwoodJS and what are some of the projects you have built or are building with it? What are some of the challenges or benefits of using RedwoodJS?

      I’m also interested in checking out your course at https://saas-from-scratch.com. It looks like a valuable resource for aspiring SaaS developers like me. What are some of the topics or skills that you cover in your course? How long does it take to complete the course and what are the prerequisites?

      Please share more details and examples in the comments. I look forward to hearing from you and learning from you. Thank you for your help and feedback!

      1. 2

        Hi David... thanks for the reply. I've been following Redwood for a while now. I came across it because of Tom Preston-Werner's involvement. Tom founded a little company named GitHub.

        When I see someone with essentially unlimited resources putting time & money into an open source project out of passion for developers need, I pay attention.

        I’m curious to learn more about it and how it balances between no-code and no-batteries-included

        Great question. Out of the box you get a fully linked setup with: Node, React, TypeScript (optional), GraphQL, Prisma, Jest, Storybook, scripting & a choice of databases. This is a really sane, well-supported selection of tools and not having to spend the energy to spin them all up is a godsend.

        From there you get some nicely thought out "generators" to create all the boilerplate for common workflows...eg - creating components, services, tests, et al.

        They support a wide range of authentication solutions & there's an active, funded developer community.

        So... for the "batteries included" part, it's very fast time to coding.... like minutes.

        If you don't like a particular pattern, approach, you're not locked in. You can just code in the convention you're familiar with. If you want to replace a core piece, things will be more challenging, but the tool selection is sane enough that it's more than adequate to build even a large product.

        As far as the course, the topics are mostly listed on the site. I'm covering all the pieces I had a hard time learning about while building products. The big ones include authentication, setting up multi-users per account, all things subscriptions, setting up multiple "apps" (landing page, administration app & your application itself) within a single repo, validation rules to make certain you don't botch your setup & a lot more.

        The amount of material will be substantial. It will also be very clear, so total time to go through it would maybe be a month of nights?

        My goal is to show you how to build a really solid SaaS template that you can then use as a starting point for each idea you have. When I want to try something, I just want to fork my template, input some relevant .env variables and get to work on the idea, not the boilerplate. The course will get you to that point.

        Prerequisites = You need to know how to code & have a basic working knowledge of the tool we're using. This is an intermediate+ level course, not for beginners. There are a million folks teaching React, Node & GraphQL. I show you how to use them to accomplish a business goal. I don't explain the code past it's role in the lesson.

        Hope that helps. If you have more questions, fire away.

        1. 1

          Here is a possible smart reply to be given on this post:

          Hi, thanks for the detailed answer. I appreciate your enthusiasm and expertise on Redwood and SaaS development. I’m impressed by the features and flexibility that Redwood offers and how it can speed up the development process. I’m also interested in the topics that you cover in your course, especially the ones related to authentication, subscriptions, and validation. I think your course would be very valuable for anyone who wants to build a robust and scalable SaaS product with Redwood.

          I have a few questions about your course:

          How do you deliver the course content? Is it video-based, text-based, or a mix of both?

          How much does the course cost and how can I enroll?

          How do you support the students during and after the course? Do you have a community forum, Q&A sessions, or feedback mechanisms?

          Do you provide any certificates or badges upon completion of the course?

          Do you have any testimonials or reviews from previous students?

          I’m looking forward to hearing from you and learning more about your course. Thanks again for sharing your knowledge and passion.

          1. 1

            How do you deliver the course content? Is it video-based, text-based, or a mix of both?

            Video

            How much does the course cost and how can I enroll?

            Don't know $$ yet. Still validating demand, but it looks strong. Enrollment will be via the site into something like Teachable.

            How do you support the students during and after the course? Do you have a community forum, Q&A sessions, or feedback mechanisms?

            Most teaching platforms have these as standard functionality. At a minimum there will be the ability to ask questions & get answers.

            Do you provide any certificates or badges upon completion of the course?

            Your nice, templated boilerplate SaaS app is the output.

            Do you have any testimonials or reviews from previous students?

            Haven't launched yet so no!

      2. 1

        Oh I forgot to add... try the Redwood tutorial. It's great.

    3. 1

      When will the course launch? So excited and perfect timing for me

      1. 1

        Hey! Thanks for the interest. The lessons are planned & I'm working my way through video creation now. So... it will be a couple of months. Before I got too deep I wanted to validate need. This was actually the first time I dropped the link anywhere & had quite a bit of response, so that's positive!

  4. 3

    You're react developer I assume you're pretty confident with JavaScript/Typescript I'd focus on using these but on the backend.

    I'd consider using the MERN stack, build with what you already know.

    I think people overthink this and it's exhausting. There are so many frameworks to choose from but your users don't care what technology you use only developers and companies you may work for.

    Good luck.

  5. 3

    For building B2B SaaS applications, one of the best frameworks is Django. Django offers a powerful authentication system, a convenient admin panel, and a flexible architecture that makes it easy to scale and maintain the application. Additionally, Flask is also a good choice, providing a lightweight and flexible platform for developing B2B SaaS applications with minimal constraints and high customization. The choice between Django and Flask depends on the specific project requirements and developer preferences.

    1. 1

      Hi,

      Thank you for your reply. I appreciate your recommendation and explanation of Django and Flask. I’m not very familiar with Python or these frameworks, but I’m interested in learning more about them. Can you tell me more about how you use Django or Flask to build B2B SaaS applications? What are some of the advantages and disadvantages of each framework? How do you handle multi-tenancy, subscriptions, and billing in your B2B SaaS applications? Do you have any examples or resources that you can share with me? I’m eager to learn more about how Django and Flask work and how they can help me build better B2B SaaS applications.

      Thanks again for your help and feedback.

  6. 3

    Use any framework you are comfortable with - fine to do things that do not scale in the beining. Far more important to get feedback from users as soon as possible

    1. 1

      I generally agree with this - all frameworks have pros and cons, so take what you like most. I use Java/Spring (Bootify.io could help a lot with the boilerplate), but a lot to learn here first to get quick. Maybe you find something more approachable.

    2. 1

      Thank you for your comment. I agree that getting feedback from users is very important and that I should not worry too much about scalability in the beginning. However, I still want to learn a framework that can help me build B2B SaaS apps faster and easier. Do you have any specific framework that you use or recommend? What are the benefits and challenges of using it? I would love to hear more about your experience and advice. Thanks again for your help.

  7. 2

    Hello, I'd say Ruby on Rails :)
    It's a widely adopted framework known for its simplicity and convention over configuration approach. It offers robust support for building multi-tenant applications with features like database-level separation, user authentication, and authorization. Rails has a large community and a wealth of learning resources available, including documentation, tutorials, and online courses.
    Pros: Rapid development, mature ecosystem, strong community support, extensive libraries and gems.
    Cons: Requires knowledge of Ruby programming language, may have a learning curve if you're new to Ruby on Rails.

    1. 1

      Thank you for your reply. I appreciate your suggestion and explanation. Ruby on Rails sounds like a great framework for building B2B SaaS apps. I have heard a lot of good things about it, but I have never tried it myself. How long did it take you to learn Ruby on Rails and what resources did you use? Do you have any tips or advice for someone who wants to get started with Ruby on Rails?

  8. 2

    Hey @Davidtech

    It is great to create such an application that actually solves a problem.

    The most popular frameworks used among the B2B SaaS developers I've encountered are Node.js, Ruby on Rails, JavaScript (Angular and React), Django, Play, and Grails. Each framework has its own pros and cons, and there is no one-size-fits-all solution.

    Node.js is an excellent choice if you are looking to quickly and easily build a back end for a SaaS application. It is lightweight and can handle massive amounts of data. It has robust libraries as well. Ruby on Rails caters to software engineers who don’t have game development backgrounds, and you can build RESTful APIs with it. JavaScript frameworks like Angular and React allow for fast development cycles, and you have access to many libraries to build your app. The Django framework makes it easy to create complex applications with relatively little code. Play is a great option if you are looking for a java based framework. Lastly, Grails is more akin to Groovy and is great for making cloud-ready applications.

    I personally used Node.js and JavaScript (React and Angular) to develop my projects. I learned them by taking online courses from providers like Udemy, which provide detailed courses on the frameworks. I also sought out help from the community by posting on forums and getting input from experienced developers. This was a great way to learn the ins and outs of each framework and really understand which one I wanted to use in my projects.
    Golang is also one of the best backend tech stacks for high concurrent requests.

    Overall, each framework has its own advantages and disadvantages, and there is no one-size-fits-all solution. It is important to do your research and find the right framework for your project.

    My recommendation:
    At the same time, all of these are damm complex with a huge learning curve to develop them individually. You have to have a good knowledge of the backend tech stack along with React and Mongo

    Lastly, if you are looking for an SSO (Single Sign-On) solution and team management for your project, I would recommend you try SSOJet, a cheaper and more reliable solution available in the market. They are offering a one-month free trial too.

    1. 1

      Thank you for your comprehensive reply. I appreciate your overview of the different frameworks and their pros and cons. You have given me a lot of useful information to consider.

      I’m impressed by your experience with Node.js and JavaScript (React and Angular). Those are the frameworks that I’m most familiar with as well. How long did it take you to master them and what kind of projects did you build with them? What are some of the challenges or benefits of using them?

      I’m also curious about Golang. I have heard that it is a fast and scalable language for back end development. How does it compare with Node.js in terms of performance and ease of use? Have you used Golang in any of your projects?

      I’m also interested in SSOJet. It sounds like a convenient and affordable solution for SSO and team management. How does it work and what are its features? How does it integrate with different frameworks and platforms? Do you have any examples or testimonials of SSOJet in action?

      Please share more details and examples in the comments. I look forward to hearing from you and learning from you. Thank you for your help and feedback!

  9. 2

    Have you tried NextJS? It's React-based, so you should be at home from the start, but it includes backend functionality. Single repo, can be deployed with one click to Vercel or Netlify for free, or to AWS Amplify (paid).

    1. 2

      For the DB you can use MongoDB or any other hosted option.

    2. 1

      Thank you for your reply. I have heard of NextJS, but I have not tried it yet. It sounds like a convenient and powerful framework for building full-stack React apps. How do you like it and what are some of the projects you have built or are building with it? What are some of the challenges or benefits of using NextJS?

      I’m also curious about the deployment options you mentioned. How easy or difficult is it to deploy a NextJS app to Vercel, Netlify, or AWS Amplify? What are the pros and cons of each platform? How do they handle scaling, security, and performance?

      Please share more details and examples in the comments. I look forward to hearing from you and learning from you. Thank you for your help and feedback!

  10. 2

    Hello, when it comes to building B2B SaaS apps, the MERN (MongoDB, Express.js, React.js, Node.js) stack is a popular and powerful choice. It provides a comprehensive set of tools and technologies for developing robust and scalable web applications :)

    1. 1

      Hi, thank you for your reply. I appreciate your suggestion and insight on the MERN stack. I’m bit familiar with React.js and Node.js, but I haven’t used MongoDB or Express.js much. Can you tell me more about why you prefer MongoDB over other databases, such as PostgreSQL or Firebase? And how do you use Express.js to handle routing, authentication, and authorization in your B2B SaaS apps? Do you have any examples or resources that you can share with me? I’m curious to learn more about how the MERN stack works and how it can help me build better B2B SaaS apps. Thanks again for your help and feedback.

  11. 2

    Rails is the standard indie stack because it has the lowest time to market and can be maintained by one person as a monolith, all else being equal. That being said, it’s whatever you’re most comfortable with, as others have mentioned.

  12. 2

    As a self-taught developer myself, I really love Flask because of its simplicity.

    I'd recommend the "Flask Mega-Tutorial" by Miguel Grinberg - you can get up and running in a day or two and the tutorial includes everything you need to build a multi-tenant B2B SAAS app. Miguel also has a tutorial on how to combine react with Flask.

    FWIW, I built our YC-backed startup based on that tutorial and it worked great.

    Good luck!

  13. 1

    It's basically inevitable that you'll make bad/newbie decisions and create more-than-necessary technical debt in your first full-stack projects, so I would try not to set too high a bar for yourself at any point nor let the perfect be enemy of the good-enough.

    The main thing that keeps me from just saying, "go with X React framework since you know React" is that to my eye there's no clear winner for X, and the hot thing in React seems to change every couple weeks.

    It also concerns me how popular Mongo is in server-side JavaScript circles—makes me think there are no responsible adults in the room.

    If you go outside JavaScript-land, consider Ruby on Rails.

    For context, I'm a long-time Rails dev (also PHP, React, and several other things). I like Svelte for JavaScript component stuff, and I'm looking at Phoenix/Elixir for future server-side/full-stack projects, because I want to try a different paradigm.

  14. 1

    I personally recommend Laravel, it's the framework I have better experience with and so far I loved it, I'm not quite sure if it suits your specific need but it got everything else you need, it's simple to learn thanks to the well written documentation, it has first party support for packages any webapp needs that are easy to implement(auth, payment etc..) so that you can build an mvp fast, I also have some experience with Django(python), node(javascript) and gin(go) however Laravel is the one that I personally love and recommend

  15. 1

    I would learn JavaScript and React, these are great for building scalable apps. Then I would use services which would help me building my SaaS app. For example, I recently launched my SaaS app which uses Firebase (authentication, real-time database, storage), Vercel (code building/bundling, zero config infrastructure). I think using some of these services are the fastest way to build products, see results & validate ideas.

  16. 1

    side advice: for b2b, build the mvp and then focus on selling and having conversations with real potential customers instead of spending time creating the perfect product.

  17. 1

    I agree with the top comment that the best one is the one you're most comfortable and productive with.

    However, I've found for me that the VANS Stack - Vercel, NextJS and Supabase (using AWS underlying services) is the quickest way to develop new products - I did a YouTube video outlining it if you want to learn more (https://youtu.be/t44Yr6bcO3I) - but despite a slight learning curve with Supabase, it makes you crazy productive within weeks. (You mentioned knowing React so Next should be easy to pick up and Vercel is basically "plug and play".

    You can deploy on the free tiers until quite high volumes which also makes it cost effective

  18. 1

    Whatever you know best. That's always the answer.

    Python -> Django
    Ruby -> Ruby on Rails
    PHP -> Laravel
    Javascript -> ...?

    Sorry about the last one, have no idea if JS has a comparable framework to the ones I mentioned above.

    I would certainly got for a monolith app as opposed to building a backend.frontend separately. Just saves time and reduces amount of bugs. Less code, less bugs.

  19. 1

    I've built many B2B solutions across different companies.
    This is my personal choice: the stack allows to fastly iterate and built in very little time.

    Backend: Serverless AWS Python.
    Infra: also python, CDK (not terraform).
    Frontend: Vue
    CI/CD: either gitlab or AWS Codepipeline.

  20. 0

    Hello, I'm Deluar a digital business adept but here to share my thoughts and experiences on the best framework for building B2B SaaS apps.

    As I'm not a developer and don't have expertise in this field I don't know any definitive answer to this question, as I know different frameworks have different strengths and weaknesses, and the best choice may depend on your specific needs, preferences, and goals.

    However, here are some of the most popular and widely used frameworks for building B2B SaaS apps, along with some of their pros and cons:

    • Ruby on Rails: This is a full-stack web development framework that uses the Ruby programming language. Some of the advantages of using Ruby on Rails are its productivity, simplicity, scalability, security, and testability.

    • Django: This is a full-stack web development framework that uses the Python programming language. Some of the advantages of using Django are its versatility, reliability, scalability, security, and testability.

    • Laravel: This is a full-stack web development framework that uses the PHP programming language. Some of the advantages of using Laravel are its readability, usability, scalability, security, and testability.

    • React: This is a front-end web development library that uses the JavaScript programming language. Some of the advantages of using React are its performance, modularity, maintainability, flexibility, and testability.

    Ultimately, the best framework for you will depend on your project requirements, preferences, skills, budget, timeline, etc. You should do your own research and testing before choosing a framework for your B2B SaaS app.

    I think you will find the best one for you. But I have a big question: How you will manage big amount of design resources to sell on your SaaS?

    1. 1

      Did you really need chatGPT to write reply?

      1. 1

        Why should I need it? Well, I'm writing a huge amount of characters and that makes you crazy to think I'm using ChatGPT or something like that. But not really, I love to gather knowledge and help someone build a friendship. You don't know I work in the Sales and Marketing Department at UIHUT B2B. And every marketing representative shouldn't build a relationship before exchanging something like a product or dream?

  21. 0

    When it comes to choosing the best framework for building B2B SaaS (Software as a Service) apps, there are several options available, each with its own strengths and considerations. Here are a few popular frameworks that are commonly used for building B2B SaaS applications:

    Ruby on Rails: Ruby on Rails (RoR) is a robust and mature framework known for its productivity and simplicity. It follows the "convention over configuration" principle, making it efficient for building web applications, including B2B SaaS apps. RoR offers a wide range of libraries and gems that can accelerate development.

    Node.js with Express.js: Node.js is a JavaScript runtime that allows developers to build server-side applications using JavaScript. When combined with Express.js, a minimalist web framework, it provides a lightweight and flexible approach to building B2B SaaS apps. Node.js is particularly suitable for applications that require real-time functionality or handle a large number of concurrent connections.

    React.js with a backend framework: React.js is a JavaScript library for building user interfaces. While it is primarily focused on the front end, React.js can be combined with various backend frameworks (such as Express.js, Django, or Laravel) to create a full-stack solution for B2B SaaS apps. This approach leverages React's component-based architecture and allows for building interactive user interfaces.

    The choice of the best framework depends on various factors such as your familiarity with a particular language, the complexity of your application, team expertise, scalability requirements, and specific features you need for your B2B SaaS app. It's important to consider these factors and evaluate the strengths and trade-offs of each framework before making a decision..

    1. 1

      Pure chatGPT copy / paste.

  22. 0

    Thanks for sharing this informative article.

Trending on Indie Hackers
Passed $7k 💵 in a month with my boring directory of job boards 57 comments How I got 1,000+ sign-ups in less than a month with social media alone 22 comments 87.7% of entrepreneurs struggle with at least one mental health issue 14 comments How to Secure #1 on Product Hunt: DO’s and DON'Ts / Experience from PitchBob – AI Pitch Deck Generator & Founders Co-Pilot 13 comments Competing with a substitute? 📌 Here are 4 ad examples you can use [from TOP to BOTTOM of funnel] 10 comments Are you wondering how to gain subscribers to a founder's X account from scratch? 9 comments