Overview
ViteHub gives Vite, Nitro, and Nuxt apps a set of server primitives that ship as separate packages. You install one feature at a time, keep the runtime API small, and switch frameworks or providers without rewriting the code that actually uses the primitive.
Install one package
Pick the feature you need first. Each primitive ships independently, so you do not need to pull in the whole catalog.
pnpm add https://pkg.pr.new/vite-hub/vitehub/@vitehub/queue@main
Register the integration entrypoint
Use the entrypoint that matches your app surface.
export default defineNuxtConfig({
modules: ['@vitehub/queue/nuxt'],
})
Define one named resource
Create the file ViteHub discovers for that feature.
export default defineQueue(async (job) => {
return {
id: job.id,
accepted: true,
payload: job.payload,
}
})
Call the runtime helper
Use the package root for runtime APIs.
import { runQueue } from '@vitehub/queue'
export default defineEventHandler(async () => {
return runQueue('welcome-email', {
payload: {
email: 'hello@example.com',
},
})
})
Choose your next step
Common questions
Do I start from package docs or from here?
Start from this overview when you need help choosing a primitive or understanding the shared model. Jump straight to a package page when you already know the feature you want.
What stays stable across packages?
The package root owns public runtime helpers and types. The framework-specific entrypoints only handle integration and setup. Read Entrypoints for the exact split.