Re

RemoteStorage – sync localStorage across devices and browsers

Hacker News

RemoteStorage – sync localStorage across devices and browsers

Hey HN! Wanted to share a new library and server I've recently been working on called remoteStorage. When building frontends with Javascript, the native localStorage API is super useful for keeping track of state between sessions in the same browser, but it's not as good a solution when your data needs to be shared across multiple devices or browsers. For instance, let's say you want to show a welcome modal to all new users that sign up for your product. If you use localStorage to track if a user has already seen this modal, your users will end up getting the experience repeatedly every time they switch devices or browsers, or whenever Chrome decides to nuke your data. I built remoteStorage to help fix that. Using the same API as localStorage, remoteStorage allows you to easily read and write data on the fly while maintaining state across browsers and devices in order to provide a better user experience. The project is built as a monorepo in Typescript and contains a JS library that works across any Javascript stack (including Node.js and React Native) and is lightweight (~1 kb minified). The server is built with Nest.js with a disk-persisted Redis Database. It can be deployed in a few minutes using Docker. One of the biggest challenges when building this was coming up with a secure scheme for handling authentication while still keeping the API dead simple for frontend devs to use. While the project is intended to store non-sensitive data like impression events/preferences, I still wanted to make sure data couldn’t easily leak or be tampered with. One solution has been to generate a unique secret UUID per user on your own backend to identify the user. Alternatively, you could create a simple wrapper/proxy API around remoteStorage that uses your own authentication method to verify the user's identity before allowing them to access the data (this is super simple to build with React Server Components). Then, you could pick a secure and secret Instance ID that is not publicly available to ensure that only your application can access the data. Has anyone felt the same pain points with localStorage before? Is this solution useful? Let me know what you think or ideas for how I can improve it :)

Share card

Actual performance

129points
62comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: user, dock, new · Missing: mac, agents, macos
94%94% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Strong signals: including · Missing: supports, reddit linkedin, podcasting
88%88% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: ide, io, including · Missing: https docs, excited, just released
45%45% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: users · Missing: mobile apps, ios, personal
40%40% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: users · Missing: plus, platform, intuitive
30%30% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
8%8% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Pastebox
Pastebox27%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Sync text on all your devices.

Indie Hackerscommitment-side-project
pa
pairing browsers43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

pairing browsers

Hacker News1
Ev
Everyone is fighting over browsers, so we built something beyond48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Everyone is fighting over browsers, so we built something beyond

Hacker News3
Cheddar
Cheddar17%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Lists & Tasks, always in sync across all your devices.

Indie Hackerscommitment-side-project
I
I made a tool to sync my brainstorm with AI across tools and devices26%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I made a tool to sync my brainstorm with AI across tools and devices

Hacker News2
Un
Unsearch – Sync bookmarks, history, and tabs across browsers59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Unsearch – Sync bookmarks, history, and tabs across browsers

Hacker News9
of
offlinenotepad – an offline-first notepad that can sync across devices70%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

offlinenotepad – an offline-first notepad that can sync across devices

Hacker News12
No
Normalize browsers' default style54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Normalize browsers' default style

Hacker News2
SnippetSync-Ai
SnippetSync-Ai63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Sync & expand code snippets across all your browsers.

Product Hunt+6
Vi
ViClip – Sync your clipboard seamlessly across all your devices40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

ViClip – Sync your clipboard seamlessly across all your devices

Hacker News1