npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aixyte/aixster

v4.2.5

Published

React translation library with automatic routing, real-time AI translation, and zero-flash rendering. One-line language routing setup.

Readme

@aixyte/aixster

Seamless website translation for React and Next.js applications with zero-flash rendering and automatic language routing.

Installation

npm install @aixyte/aixster react-router-dom

Quick Start

Option 1: Path Mode (Recommended - Automatic Language URLs)

One-line setup that automatically handles language routing like /en/pricing, /fr/pricing, /de/pricing:

import { LangRouter, AixsterProvider } from '@aixyte/aixster';
import { Routes, Route } from 'react-router-dom';
import { useRef } from 'react';

function App() {
  const navigateRef = useRef();

  return (
    <LangRouter defaultLang="en" langs={['en', 'fr', 'de', 'es']} navigateRef={navigateRef}>
      <AixsterProvider
        apiKey="aix_your_api_key"
        defaultLocale="en"
        locales={['en', 'fr', 'de', 'es']}
        routing="path"
        navigateRef={navigateRef}
      >
        <Routes>
          {/* No language prefix needed! */}
          <Route path="/" element={<Home />} />
          <Route path="home" element={<Home />} />
          <Route path="pricing" element={<Pricing />} />
          <Route path="about" element={<About />} />
        </Routes>
      </AixsterProvider>
    </LangRouter>
  );
}

Important: Pass the same navigateRef to both <LangRouter> and <AixsterProvider> for proper URL synchronization.

URLs automatically work as:

  • /en/, /en/home, /en/pricing, /en/about
  • /fr/, /fr/home, /fr/pricing, /fr/about
  • /de/, /de/home, /de/pricing, /de/about

Option 2: Query Mode (Simple - Query Parameters)

Use query parameters like /pricing?t=fr:

import { AixsterProvider } from '@aixyte/aixster';
import { BrowserRouter } from 'react-router-dom';

function App() {
  return (
    <BrowserRouter>
      <AixsterProvider
        apiKey="aix_your_api_key"
        defaultLocale="en"
        locales={['en', 'de', 'fr', 'es']}
        routing="query"
      >
        <YourApp />
      </AixsterProvider>
    </BrowserRouter>
  );
}

Next.js

// app/layout.tsx
import { AixsterProvider } from '@aixyte/aixster';

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <AixsterProvider
          apiKey="aix_your_api_key"
          defaultLocale="en"
          locales={['en', 'de', 'fr', 'es']}
        >
          {children}
        </AixsterProvider>
      </body>
    </html>
  );
}

Configuration

<AixsterProvider
  apiKey="aix_xxx"                    // Required: Your Aixster API key
  defaultLocale="en"                  // Required: Source language
  locales={['en', 'de', 'fr']}        // Required: Supported languages
  apiBase="https://..."               // Optional: Custom API endpoint
  routing="query"                     // Optional: 'query' | 'path' (default: 'query')
  switcherPosition="bottom-right"     // Optional: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'
  switcherOffsetY={20}                // Optional: Vertical offset in pixels
  editMode={false}                    // Optional: Enable edit mode
  editKey="KeyE"                      // Optional: Keyboard shortcut for edit mode
  mode="dom"                          // Optional: 'dom' | 'context' (default: 'dom')
  sitemap={true}                      // Optional: Auto-inject sitemap link (default: true) - NEW in v4.2.2
>
  {children}
</AixsterProvider>

Routing Modes

  • query (default): Language in query parameter /pricing?t=fr

    • Use with standard React Router setup
    • No URL structure changes needed
  • path: Language in URL path /fr/pricing

    • Use with <LangRouter> wrapper
    • Automatic language routing
    • SEO-optimized URLs
    • See PATH_EXAMPLES.md for detailed examples

Path Mode Helpers (v4.2+)

LangLink - Language-Aware Links

import { LangLink } from '@aixyte/aixster';

function Navigation() {
  return (
    <nav>
      {/* Automatically becomes /en/pricing or /fr/pricing */}
      <LangLink to="pricing">Pricing</LangLink>
      <LangLink to="about">About</LangLink>
    </nav>
  );
}

useLang - Get Current Language

import { useLang } from '@aixyte/aixster';

function MyComponent() {
  const lang = useLang(); // 'en', 'fr', 'de', etc.
  return <div>Current language: {lang}</div>;
}

useLangNavigate - Programmatic Navigation

import { useLangNavigate } from '@aixyte/aixster';

function MyComponent() {
  const navigate = useLangNavigate();

  const goToPricing = () => {
    navigate('pricing'); // Goes to /en/pricing or /fr/pricing automatically
  };

  return <button onClick={goToPricing}>View Pricing</button>;
}

Core Hooks

useAixster

Access locale state and switching:

import { useAixster } from '@aixyte/aixster';

function MyComponent() {
  const { locale, setLocale, isLoading, config } = useAixster();

  return (
    <button onClick={() => setLocale('de')}>
      Switch to German
    </button>
  );
}

useAixsterTranslate

Manual translation control:

import { useAixsterTranslate } from '@aixyte/aixster';

function MyComponent() {
  const { translateElement, translateDOM } = useAixsterTranslate();
  
  const handleDynamicContent = () => {
    // Translate specific element
    const el = document.getElementById('dynamic-content');
    if (el) translateElement(el);
    
    // Or translate entire DOM
    translateDOM();
  };
  
  return <button onClick={handleDynamicContent}>Load Content</button>;
}

useAixsterEdit

Edit mode for excluding elements:

import { useAixsterEdit } from '@aixyte/aixster';

function MyComponent() {
  const { editMode, toggleEditMode, excludeElement } = useAixsterEdit();
  
  return (
    <button onClick={toggleEditMode}>
      {editMode ? 'Exit Edit Mode' : 'Edit Exclusions'}
    </button>
  );
}

Features

  • ✅ Zero-flash translations (rendered before browser paint)
  • ✅ Automatic route change detection
  • ✅ MutationObserver for dynamic content
  • ✅ Customizable language switcher
  • ✅ TypeScript support
  • ✅ Works with React Router and Next.js
  • ✅ Edit mode for managing exclusions
  • ✅ Automatic translation miss detection
  • Automatic multilingual sitemap generation (v4.2.2+)

Automatic Sitemap (v4.2.2+)

Your multilingual sitemap is automatically generated with zero configuration. Just install @aixyte/aixster and it works!

Zero Configuration

<AixsterProvider
  apiKey="aix_xxx"
  defaultLocale="en"
  locales={['en', 'de', 'fr', 'es']}
>
  <App />
</AixsterProvider>

// ✅ That's it! Sitemap exists automatically at:
// https://mvbumiwzjytmxswfjgzn.supabase.co/functions/v1/generate-sitemap/aix_xxx

Features

  • Auto-discovery: Pages automatically added as visitors browse
  • Multilingual: All language variants included
  • SEO-optimized: Proper hreflang tags for all locales
  • Always up-to-date: No manual regeneration needed
  • Cached: 1-hour cache for performance
  • Zero maintenance: Completely automatic

How It Works

  1. Page tracking: AixsterProvider tracks every visited page
  2. Link injection: <link rel="sitemap"> tag automatically added to <head>
  3. XML generation: Edge function generates sitemap from discovered pages
  4. Google discovers: Search engines find sitemap via link tag

Disable Sitemap (Optional)

<AixsterProvider
  apiKey="aix_xxx"
  defaultLocale="en"
  locales={['en', 'de', 'fr']}
  sitemap={false}  // Disable automatic sitemap
>
  <App />
</AixsterProvider>

Serve from Your Domain (Optional)

Netlify

# netlify.toml
[[redirects]]
  from = "/sitemap.xml"
  to = "https://mvbumiwzjytmxswfjgzn.supabase.co/functions/v1/generate-sitemap/YOUR_API_KEY"
  status = 200

Vercel

{
  "rewrites": [{
    "source": "/sitemap.xml",
    "destination": "https://mvbumiwzjytmxswfjgzn.supabase.co/functions/v1/generate-sitemap/YOUR_API_KEY"
  }]
}

Next.js

// app/sitemap.xml/route.ts
export async function GET() {
  const res = await fetch(
    'https://mvbumiwzjytmxswfjgzn.supabase.co/functions/v1/generate-sitemap/YOUR_API_KEY'
  );
  return new Response(await res.text(), {
    headers: { 'Content-Type': 'application/xml' }
  });
}

How It Works

  1. Wrap your app with <AixsterProvider>
  2. Locale detection from URL path or query params
  3. Translations loaded from Aixster API
  4. DOM translated before React paints
  5. MutationObserver catches dynamic content
  6. Language switcher appears for easy switching

License

COMMERCIAL LICENSE - NOT OPEN SOURCE

Copyright (c) 2025 Mertens Advies. All rights reserved.

For Agencies & Developers

You MAY:

  • Use Aixster in unlimited client projects
  • Charge clients for integration and development services
  • Deploy compiled code to client applications
  • Install via npm/yarn for development and production

You MAY NOT:

  • Resell or white-label Aixster as your own product
  • Redistribute source code or allow client modifications
  • Build competing translation products
  • Extract code for other purposes

For End Clients

End clients receive usage rights through their agency/developer and may operate applications containing Aixster, but may not modify, redistribute, or extract the software.

License

This software is licensed under the Aixster Commercial License. This is NOT open source software. All intellectual property rights remain the exclusive property of Mertens Advies.

See LICENSE file for complete terms and conditions.