20
11 Comments

I turned an open-source state machine library into a SaaS startup, AMA!

Hey everyone, I'm David (@davidkpiano on Twitter and everywhere else).

I created XState (github.com/statelyai/xstate), a state machines and statecharts library, about 6 years ago as a fun experiment at first. It quickly grew to be one of the most popular state management libraries (and probably the most popular state machine library) for the web.

As a Microsoft engineer, I was working nights and weekends on it, with other amazing contributors, but soon realized that this wasn't sustainable – the project deserved much more attention and I needed to work on it full-time and build visual tooling for it.

So that's exactly what I did – I quit and started doing this full-time. Stately (stately.ai) is a team of 6 working on making app logic visually collaborative and accessible to everyone, not just developers.

We've released a visualizer (#3 product of the day on Product Hunt) and will soon be releasing a visual editor.

Visual editor preview

We have so many things planned, and we're just getting started. You can learn more by:

Looking forward to your questions, and how I turned an open-source project into something much, much bigger. Ask me anything!

  1. 4

    when do you start charging money?

    1. 2

      The open-source libraries, visualizer, and inspection tools will always be free. We are building services around visual editing, synchronization with GitHub repos, collaboration, analytics, and more, which will have a pricing model similar to Figma and CodeSandbox (free up to a limit for public projects, subscription-based pricing for private/teams, etc.) We anticipate that to happen sometime next year.

  2. 2

    How are you planning on balance all the OSS work you do on Stately with building a profitable and sustainable Business?

    1. 1

      The two aren't mutually exclusive. We want to make the open-source parts of Stately as good as possible (XState, visualizer, various tools, etc.) as a primary goal. Without the OSS, the services aren't that useful, and without the services, the OSS isn't sustainable (or rather, it will reach an upper limit of usefulness without the tooling & services).

  3. 2

    6 people working full-time on that project: how do you sustain yourself? It's easily 250k euros where I live, I always wondered what source of income people in your situation have (and need) in order to make a living....

    1. 2

      We're thankful to have investors after relying on our own funds (from OpenCollective, GitHub Sponsors, etc.) for so long, which was not sustainable. Monetization is top of mind next year, but for now, we can comfortably support a team of 6 to 10 with our current funding.

  4. 1

    @davidkpiano Great job on building this. I'm new to the open source and AI world so I have some questions. 1) How can you monetize open source code (I thought that it was free for everyone)? 2) Can you talk about what open source you used as the product core? Thank you for taking the time to do this!

    1. 1

      Thanks! The open-source code itself can't be monetized, because, as you said, it's free for everyone, and always will be. Instead, tools and services that enhance the usage of the OSS can be monetized, and you can see this in lots of companies, most recently Hashicorp and Apollo.

      The product core is built with Next.js and XState itself!

  5. 1

    With the funding and resources you now have to dedicate to the project, how do you think that has affected what you can do to enable the community to grow, explore, and innovate with statecharts?

    1. 1

      Great question! The funding, resources, and team that we have now have enabled us to reach out to even more people and start working on education and advocacy material. We believe that learning about state machines & statecharts is important not only for developers, but also designers and less technical people like project managers and other stakeholders. Now, we can focus more effort on reaching out to those different audiences.

      We also have the capacity to constantly communicate directly with the community, help answer questions and solve problems, and even talk directly with companies on usage of state machines, statecharts, XState, and our tools in the future. This is something we weren't able to easily do before having funding and a team, so we're really thankful for it and have some ambitious plans to spread the knowledge.

  6. 1

    This comment was deleted a year ago.

  7. 3

    This comment was deleted 2 years ago.

    1. 2

      I've given a couple of talks on "Mind-reading with adaptive user interfaces" that makes heavy use of state machines and statecharts to easily provide predictive analytics based on anonymized user behavior in an app. There's further ideas on using ML for the actual creation of machines, as well as optimization. Expressing your complex logic as a statically analyzable directed graph enables all sorts of future AI magic!

Trending on Indie Hackers
Reaching $100k MRR Organically in 12 months 29 comments Passed $7k 💵 in a month with my boring directory of job boards 15 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 11 comments Worst Hire - my lessons 11 comments Competing with a substitute? 📌 Here are 4 ad examples you can use [from TOP to BOTTOM of funnel] 10 comments