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 🙏

© 2024 – Pkg Stats / Ryan Hefner

vinxi

v0.4.3

Published

<p align="center"> <h1 align="center" ><img src="/docs/public/logo.png" width="196" /></h1> <p align="center"> <i>The JavaScript SDK to build full stack apps and frameworks with your own opinions.<br>powered by <code><a href="https://github.com/vit

Downloads

95,307

Readme

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.

  • Routers are handlers that tell us how specific URLs should be handled. We support various router modes: "static", "spa", "http", (and new ones can be added). Routers specify the handler file (entrypoint) to use for their 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.

Examples

| Framework | Category | Example | StackBlitz Link | |-----------|----------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------| | React | RSC | SPA | Open in StackBlitz | | | SPA | Basic | Open in StackBlitz | | | | MDX | Open in StackBlitz | | | | TanStack Router (Pages) | Open in StackBlitz | | | | TanStack Router (App) | Open in StackBlitz | | | | Wouter | Open in StackBlitz | | | SSR | Basic | Open in StackBlitz | | | | Basic w/Cloudflare | Open in StackBlitz | | | | TanStack Router (App) | Open in StackBlitz | | | | Wouter | Open in StackBlitz | | Solid | SPA | Basic | Open in StackBlitz | | | SSR | Basic | Open in StackBlitz | | | | Solid Router | Open in StackBlitz | | Vanilla | | SPA | Open in StackBlitz | | | | TRPC | Open in StackBlitz |

Goals

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:

  1. Full stack builds (handle manifest stuff to figure out what assets to load at prod runtime)
  2. Dev time asset handling (avoiding FOUC in SSR frameworks) and smoothing over some of vite's dev/prod mismatching behaviours by providing common manifest APIs that work in dev and prod the same way
  3. File system router (not any specific file system conventions, just an API for interfacing with FileSystemRouters and utils to implement your conventions in them)
  4. Building the server, and providing a simple opaque handler API to control the server
  5. Adapter stuff to deploy to various platforms with support for all the features they provide
  6. Not to abstract away the platforms. Let people use what they want to the fullest
  7. Have little opinion about how the app should be authored or structured

Roadmap

  • [ ] vinxi deploy
  • [x] hooks throughout the app licycle:
    • dev: app:created, app:started, router:created

Try it out

npm install vinxi

React SSR

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",
		},
	],
});

Solid SSR

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 })],
		},
	],
});