Skip to content
Logo di Tuvix.js

Tante app. Un'unica esperienza.

Tuvix.js monta micro app React, Vue, Svelte, Angular e vanilla JS in un'unica pagina host. Routing, event bus, sandboxing e rendering lato server sono pacchetti separati che aggiungi quando ti servono.

npx create-tuvix-app
src/orchestrator.ts
import { createOrchestrator } from 'tuvix.js';const orchestrator = createOrchestrator({  router: {    mode: 'history',    routes: [      { path: '/dashboard/*', app: 'dashboard' },      { path: '/settings/*', app: 'settings' },    ],  },});orchestrator.register({  name: 'dashboard',  entry: 'https://cdn.example.com/dashboard/main.js',  container: '#main-content',  activeWhen: '/dashboard/*',});orchestrator.start();
Shell host
URL/dashboard/overview
  • React 18+montataname: 'dashboard'activeWhen: '/dashboard/*'
  • Vue 3name: 'catalog'activeWhen: '/shop/*'
  • Svelte 3–5name: 'checkout'activeWhen: '/checkout/*'
  • Angular 15+name: 'settings'activeWhen: '/settings/*'
Event bus condiviso@tuvix.js/event-bus

Cosa include Tuvix.js

Otto blocchi. Installa il pacchetto ombrello tuvix.js per avere i cinque principali, oppure aggiungi singoli pacchetti man mano che la shell cresce.

  • Indipendente dal framework

    Esegui micro app React, Vue, Svelte, Angular e vanilla JS fianco a fianco in un'unica shell.

    Guida alle micro app
  • Nessuna dipendenza runtime di terze parti

    Ogni pacchetto dipende solo da altri pacchetti @tuvix.js. Installi quelli che importi.

    Tutti i pacchetti
  • Routing integrato

    Il router monta e smonta le app quando cambia l'URL, in modalità history o hash.

    @tuvix.js/router
  • Event bus

    Le app pubblicano eventi tipizzati e si iscrivono a essi senza condividere variabili globali.

    @tuvix.js/event-bus
  • Sandbox CSS e JS

    Lo shadow DOM tiene gli stili di ogni app dentro il suo container. JsSandbox esegue uno script su una window Proxy che puoi buttare via.

    @tuvix.js/sandbox
  • Caricamento dinamico

    Il loader scarica i bundle delle app su richiesta, li mette in cache e ripete i caricamenti falliti.

    @tuvix.js/loader
  • DevTools

    Un pannello nella pagina elenca le app registrate, la route attiva e il traffico dell'event bus.

    @tuvix.js/devtools
  • Rendering lato server

    Esegui il rendering delle micro app sul server e inserisci il loro HTML nel template della shell, come stringa o come stream.

    @tuvix.js/server

Scegli il tuo framework

Ogni adapter trasforma un componente in una micro app che l'orchestratore può montare, aggiornare e smontare.

  • React

    createReactMicroApp avvolge un componente. useTuvixProps e useTuvixBus leggono props ed eventi.

    npm i @tuvix.js/react
  • Vue

    createVueMicroApp monta un'app Vue 3, con composable per le props e l'event bus.

    npm i @tuvix.js/vue
  • Svelte

    createSvelteMicroApp monta componenti Svelte 3, 4 e 5.

    npm i @tuvix.js/svelte
  • Angular

    createAngularMicroApp esegue il bootstrap di un componente Angular 15+ nel suo container.

    npm i @tuvix.js/angular
  • Vanilla JS

    defineMicroApp fornisce hook mount, unmount e update in JavaScript puro.

    npm i @tuvix.js/core

15 pacchetti, ognuno con la sua versione

Parti dal pacchetto ombrello. Passa ai singoli pacchetti quando vuoi un'installazione più leggera.