The Full Stack JavaScript SDK
MIT License
vinxi
Compose full stack applications (and frameworks) using Vite, the versatile bundler and dev server, and Nitro, the universal production server. The core primitive in vinxi
is a router.
Inspired by the Bun.App API.
base
-prefixed routes. They can also specify a dir
and style
in some router modes to include a file system router that is provided to the handler. Routers specify their bundler configuration, via the build
property. The routers tell the bundler what entry points to build, what vite plugins to use, etc.There are currently two frameworks actively being developed on vinxi
:
There are also a few other frameworks experimenting with vinxi:
Primary goal is to build the tools needed to build a NextJS or SolidStart style metaframework on top of vite without worrying about a lot of the wiring required to keep dev and prod working along with SSR, SPA, RSC, and all the other acronyms. etc. On top of that, we should be able to deploy anywhere easily.
Mostly trying to disappear for the user outside the app.js file
The surface layer we are intending to tackle:
handler
API to control the servervinxi deploy
npm install vinxi
import reactRefresh from "@vitejs/plugin-react";
import { createApp } from "vinxi";
export default createApp({
routers: [
{
name: "public",
type: "static",
dir: "./public",
},
{
name: "client",
type: "client",
handler: "./app/client.tsx",
target: "browser",
plugins: () => [reactRefresh()],
base: "/_build",
},
{
name: "ssr",
type: "http",
handler: "./app/server.tsx",
target: "server",
},
],
});
import { createApp } from "vinxi";
import solid from "vite-plugin-solid";
export default createApp({
routers: [
{
name: "public",
type: "static",
dir: "./public",
},
{
name: "client",
type: "client",
handler: "./app/client.tsx",
target: "browser",
plugins: () => [solid({ ssr: true })],
base: "/_build",
},
{
name: "ssr",
type: "http",
handler: "./app/server.tsx",
target: "server",
plugins: () => [solid({ ssr: true })],
},
],
});