i18n & client data
Next.js i18n routing/dictionaries, a framework-neutral translation runtime, and two browser-only client-state primitives.
Two of these packages handle translated text (one Next.js-specific, one framework-neutral for non-Next apps); the other two handle state that lives only in the browser (a key-value store and reactive local-first collections).
@repo/internationalization
Next.js-specific i18n built on next-intl: locale list, middleware, request
config, and per-locale JSON dictionaries (en, lt, ru, managed via
languine). dictionary-loader is deliberately free of
any next-intl import so consumers that only need raw messages (an RPC
handler, an override merge) don't drag in the request-config machinery and
risk a module-eval-order cycle.
.—locales,Dictionarytype, andnext-intl'sNextIntlClientProvider/useLocale/useTranslations./middleware—createI18nMiddleware(options)./server—getDictionary,getLocale,getMessages,getTranslations,setRequestLocale./dictionary-loader—getDictionarywithout thenext-intlserver import./plugin—createNextIntlPlugin(fornext.config.ts)./locales,./dictionaries/*— the locale list and raw JSON dictionaries
@repo/intl-runtime
A small, framework-neutral translation runtime for apps that don't run on
Next.js/next-intl (or want a React-only useT hook over plain message
objects). Uses intl-messageformat for ICU syntax (variables, plurals,
select) and mirrors next-intl's useTranslations shape — missing keys fall
back to the raw key instead of rendering blank.
IntlProvider,useIntl— React context carrying{ locale, messages }useT(namespace?)— returns a(key, vars?) => stringformatter, with a per-locale/message-set formatter cacheloadMessages(locale, { fallback, loaders }),resolveLocale(input)— server/loader-side helpers for resolving and loading a locale's messagesMessages,FormatVarstypes;getMessageAtfor nested key lookup
@repo/browser-persistence
An Effect v4 key-value store over a StorageLike backend (real
localStorage, an in-memory test double, or an SSR noop). Values are
JSON-encoded in a versioned { v, data } envelope and decoded through a
Schema on read; a corrupt/stale value logs a warning and resets to the
caller's default rather than throwing.
KvStore—Context.Servicewithget,set,remove, andsubscriptionRef(aSubscriptionRefthat mirrors its updates to storage)KvStore.layerLocalStorage,KvStore.layerNoop,KvStore.layerFromStorage(storage)— pick the backend per environmentmakeMemoryStorage()— an in-memoryStorageLikefor testsKvParseError— tagged decode/parse failure
Not the same job as @repo/local-db: this package is an Effect KV store for scalar/object values,
while local-db is plain-TS reactive collections. Pick by whether the call site is already in
Effect.
@repo/local-db
A reusable wrapper around TanStack DB client-side collections, plus a per-browser sandbox primitive, for local-first UI state (carts, drafts, session prefs) that lives entirely in the browser and can be wiped in one call. Plain TypeScript and React 19 — no Effect.
resolveStorage()— reallocalStoragein the browser, in-memory everywhere else (SSR/tests);memoryStorage()— a fresh in-memory storecreateSandbox({ collections })—{ collections, reset() }, wherereset()clears every collection in the sandbox- Re-exports from
@tanstack/react-db:createCollection,localStorageCollectionOptions,localOnlyCollectionOptions,useLiveQuery,eq, and theCollectiontype useLiveQueryis browser-only (throws during SSR) — gate it behind a mount guard in components that render on the server
See the packages overview and the architecture guide.