News for hackers. Stuff that matters.

adrai

Re: on Saturday March 28, 2026 @04:09AM (#47552577)
Author here. Happy to answer questions about the technical decisions, the data, or the v26.0.0 release.

Show HN: A Vite and React starter kit for real-time chat with no back end

https://github.com/vaultrice/vaultrice-chat-starter

Hi HN, I built this because I think adding real-time features like chat should be much easier for frontend developers. This is a complete, multi-room chat app you can clone and have running in a couple of minutes. It's powered by a serverless tool I'm creating called Vaultrice. Looking for feedback on the DX and the overall concept. Thanks!

( Read More... | no comments | on HN )

Show HN: Internationalizationext selector API – selector t for TypeScript

https://www.locize.com/blog/i18next-typescript-selector-api

i18next released a new version of a new selector API that lets you pass a selector function to t instead of a string key:// before i18next.t('my.nested.key')// after i18next.t($ => $.my.nested.key)The change unlocks IDE autocompletion and “go to definition”, preserves JSDoc from your resource files at the call site, and — critically — removes the huge type-level unions that used to...

( Read More... | no comments | on HN )
The team at Convex is building an awesome product. You're right that you can absolutely achieve real-time functionality with Convex, but we think about the problem with a different philosophy and focus.

The way we see it, it comes down to the level of abstraction and what problem you're trying to solve:

Convex is a powerful, full-featured backend platform. It gives you a database, serverless functions (mutations and queries), and file storage. It's a fantastic choice if you're looking to build your entire backend on a modern, reactive stack. You write your logic in server-side functions, and Convex provides the infrastructure.

Vaultrice aims to be a simpler, more focused real-time component that often requires no backend code from you at all. Our goal is to feel like a frontend tool—like a "cloud-based localStorage".

The key difference is in the developer experience:

With Vaultrice, for things like cross-domain state sharing or a simple "who's online" list, you just instantiate our SDK on the client with your credentials and start using it. There are no backend functions to write. Our SyncObject API, where you just modify a JavaScript object and it syncs, is designed to completely abstract away the server.

So, a good way to think about it might be:

Choose Convex when: You need a complete backend replacement, with server-side logic, schema validation, and complex queries.

Choose Vaultrice when: You already have a backend (or don't want one for this feature) and you just need to drop in a real-time, cross-domain state layer with a dead-simple, frontend-friendly API.

Don't know exactly what you mean by users... users in the Game... probably yes. users in Vaultrice... no, in Vaultrice that would be 1 object (per game) of 1 class
Hey, thanks for the great questions!

Offline-first: That's a key distinction. The Vaultrice SDK is currently designed for "online-first" and "offline-sometimes" use cases. Its main strength is real-time, consistent synchronization that relies on an active connection.

Proper offline-first support with automatic conflict resolution is on our roadmap, as we have a backlog item for it ;-) However, you can easily achieve a robust offline capability in your own code today by using localStorage as a fallback.

Here’s a simple wrapper pattern (not tested, just for illustration) that reads from Vaultrice when online and falls back to a local cache when offline:

import { NonLocalStorage } from '@vaultrice/sdk';

// --- A simple offline-first wrapper --- function createOfflineStore(credentials, id) { const vaultriceStore = new NonLocalStorage(credentials, id); const localCacheKey = `vaultrice_cache_${id}`;

  // Helper to get local data
  const getLocal = () => JSON.parse(localStorage.getItem(localCacheKey) || '{}');

  return {
    // SET: Write to both Vaultrice (if online) and localStorage
    async setItem(key, value) {
      // Always update the local cache immediately
      const localData = getLocal();
      localData[key] = value;
      localStorage.setItem(localCacheKey, JSON.stringify(localData));

      try {
        // Attempt to write to the cloud
        await vaultriceStore.setItem(key, value);
      } catch (error) {
        console.warn('Offline: Data saved locally.', error.message);
      }
    },

    // GET: Try Vaultrice first, fallback to localStorage
    async getItem(key) {
      try {
        const item = await vaultriceStore.getItem(key);
        if (item) {
            // Optional: Update local cache with fresh data
            const localData = getLocal();
            localData[key] = item.value;
            localStorage.setItem(localCacheKey, JSON.stringify(localData));
            return item.value;
        }
      } catch (error) {
        console.warn('Offline: Reading from local cache.', error.message);
      }
      // Fallback to local cache
      return getLocal()[key];
    }
  };
}

Production Readiness: Yes, for its intended use case, Vaultrice is ready for production. We've put a lot of focus on a layered security model (from API key restrictions to E2EE) and built it on top of Cloudflare's infrastructure, which gives us a reliable and scalable foundation.

Hope that helps clarify things! Appreciate you checking it out.

and as long as it's used on those and other apps, it will for sure continue to exist ;-)
The team behind vaultrice.com is the same team behind locize.com and i18next.com...
Yes — that’s exactly the kind of thing Vaultrice is designed for.

Think of it like localStorage, but instead of being tied to one browser on one device, the data lives in a globally-available, real-time object. Any change one player makes (like moving their character or firing a shot) can be sent instantly to the other player’s browser — without having to set up your own server or WebSocket layer.

For your son’s zombie shooter: • Each game session could be one Vaultrice “object” (with an id like game-123). • Each player writes their position, health, actions to that object. • The other player’s browser listens for changes and updates the game state instantly. • Presence tracking is built-in, so you can show “who’s in the game” without extra code.

The nice part is that the SDK’s API feels familiar — setItem, getItem, and on() for events — so you can get a working multiplayer prototype with just a few lines. If you want even less boilerplate, the SyncObject API lets you just set properties on a shared object and Vaultrice syncs it behind the scenes.

It won’t handle game physics for you, but it’s a fast, simple way to make a turn-based or moderately real-time multiplayer experience without hosting your own backend.

Show HN: Vaultrice – A real-time key-value store with a localStorage API

https://www.vaultrice.com/

Hi HN,I'm Adriano, one of the makers of Vaultrice. I'm excited (and a little nervous!) to share what we've been building.For years, we found ourselves in a frustrating loop: whenever we needed a simple real-time feature—like a "who's online" list, a collaborative app, or just sharing state between a marketing site and our main app — we'd end up spending days...

( Read More... | 15 comments | on HN )
Re: on Wednesday February 01, 2023 @02:24AM (#34607527)
The joy and burden of maintaining an open-source project involves the influx of issues and pull requests, constant improvement, dealing with demanding users, and the importance of providing a minimal reproducible example to reduce time and effort for both maintainers and users, but despite the challenges, it is a rewarding experience that fosters a sense of community and collaboration.
Explore tips and tricks on how to use i18next, a powerful JavaScript library, to handle internationalization and localization effectively by utilizing features such as namespaces, pluralization, interpolation, fallbacks, context feature and integration with locize to deliver a better user experience.
Re:Free tool to translate your i18next resources on Sunday September 25, 2022 @12:40PM (#32973089)
I use localistars.com for human translations.
Re:Free tool to translate your i18next resources on Sunday September 25, 2022 @07:14AM (#32970354)
Like translate.google.com but for i18next. Respects also interpolated values and plurals.
This exists also the other way round: For me JS removes some of the frustrations of TS (and Java, C#, etc.)