Omran Jamal

RoastMyStartup: useSharedState - It's like useState but the state syncs across clients in real-time

I'm calling it AirState (https://airstate.dev). We're making a set of primitives and react hooks that help you build real-time applications in like 2 lines of change. Our first product is called SharedState, you can use it via the useSharedState hook in React.

It behaves exactly how to expect it to behave. It's a drop-in replacement for useState but it syncs across clients and computers in real-time. By default it connects to our cloud that has a free-tier but we'll also open source the server so that people can self-host it. Kinda following in the footsteps of PostHog.

SharedState™️ by AirState™️ uses CRDTs (YJS) under the hood so it is conflict-free by default and our server scales horizontally and never misses a message (i.e. the two browsers will never be out of sync if they're online) thanks to NATS.

We're also working on other companion products to be more complete. (do let me know if I can elaborate?)

The plan is to charge $20 per for 10,000 unique clients, with $2/GB transferred. Free tier: 256 unique clients and 2GB transfer every month.

What do you guys think? It's okay to be brutally honest if you guys want.

63 views

Add a comment

Replies

Best
Matt Carroll

sounds interesting, i like that it would be self-hostable. i dont really have a use for it in any of my projects currently, and to some extent i wonder of some examples where a feature like this drives business value?

like i appreciate that in notion we can all edit a doc at once, and occasionally i see it utilized, but are there like tons of apps that do this as a killer feature? maybe its just table stakes at this point for any CRM-y type app?

is there performance overhead or can i really just slap a big blob of json and use redux on top of it or something to run something like a google sheets alternative? sorry if thats a naive question, but honestly i havent really thought about this type of tool much before!

regardless congrats on building and launching (soon?)!

Omran Jamal
Launching soon!

@catt_marroll For use-case: part of some products' core offering could be real-time collaboration, think, a design review tool or a project management tool where if you're already connected via voice chat you could simply place your cursor somewhere and converse about things while providing context with your real-time shared cursor.

I'll be honest, there aren't already a ton of apps that do already this but I think in the apps that do, it's almost always a killer feature when working in a team, and that it should be a lot more common place than it is. Absolutely loved Figma but disliked Adobe XD for this reason although I was already a paying user of the Adobe ecosystem at the time, and thought XD had better ergonomics than Figma.

As for performance: of course there's a performance overhead if you make a huge change in one go. The keyword being change because we only encode and send changes over the wire, and never the entire new state. You should be fine with running a sheets alternative on top of it as it is mostly just text and changes are typically small enough.

Thank you for your time btw! We're launching on 1st June hopefully.