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

@fluxfast/next

v1.2.0

Published

Next.js App Router adapter for FluxFast

Readme

@fluxfast/next

Next.js App Router adapter for FluxFast. FastAPI owns application routing, validation, authentication, and data loading; Next.js supplies the document, bundling, React runtime, and code splitting.

npm install @fluxfast/next

Wrap the Next config to generate the component allowlist and proxy only FluxFast protocol requests to the private FastAPI address:

import { withFluxFast } from "@fluxfast/next/next-config";

export default withFluxFast({
  reactStrictMode: true,
});

fluxfast init also creates a reserved server-only route for /fluxfast/healthz and /fluxfast/readyz. These checks proxy the private FastAPI runtime through the public Next.js origin without exposing its address.

Page paths may use ASCII letters, digits, _, ., @, parentheses, brackets, and hyphens, with / between directories and a .tsx or .jsx extension. The generator rejects other characters before emitting import paths.

Create the optional catch-all shell at app/(flux)/[[...flux]]/page.tsx:

import { createFluxNextPage } from "@fluxfast/next/server";
import { fluxConfig } from "@/fluxfast.config";

export default createFluxNextPage(fluxConfig);

During development, run the supervisor from the consuming application:

.venv/bin/fluxfast dev backend.app.main:app

The supervisor starts FastAPI on a private available port and Next.js on the browser-facing port. Browser transport stays same-origin, so no public backend port or development CORS configuration is required. The supervisor detects npm, pnpm, Yarn, or Bun from the consuming frontend.

Contract & Validator Generation

When the FastAPI application defines typed resources, general contracts, or JSON mutations, generate frontend artifacts with the Next.js CLI:

npx fluxfast generate
# or use the full-stack helper from Python:
fluxfast types backend.app.main:app --frontend frontend

This compiles:

  • types.generated.ts: TypeScript contracts for resources, general application models, and reusable mutation request bodies.
  • validators.generated.ts: Tree-shakeable native runtime validators powered by @fluxfast/core with zero third-party dependencies.
  • routes.generated.ts: Safely encoded, typed FastAPI page URL builders.
  • mutations.generated.ts: Typed mutation helpers consuming reusable body contracts.
  • pages.generated.ts: Component registry allowlisting discovered page components.

Pass generated validators to useForm for instant client-side validation and zero-network invalid submissions:

import { useForm } from "@fluxfast/next";
import { CreateUserInputValidator } from "@/.fluxfast/validators.generated";

const form = useForm(initialData, { validator: CreateUserInputValidator });

The package supports Next.js >=16.3.0 <17.0.0, React 19, and Node.js 22 and 24. See the complete Next.js adapter guide, general application contracts, native client validation, caching guide, and mutation guide.

FluxFast is licensed under the MIT License.