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

adstruo-proximus

v0.0.1-beta.10

Published

Helper library for NextJS projects

Readme

AdstruoProximus

Helper library for my NextJS projects: single user and self hosted apps.

Middlewares

By default, this package includes an authentication middleware, a route based language switcher middleware and a factory helper to circunvent the fact that, currently, NextJS only supports one middleware configuration file.

Setup

In your /middleware.ts import the necessary dependencies from this package. Then, register the middlewares in the factory with their proper configuration.

Example:

import { auth, configuration, factory, i18n } from 'adstruo-proximus/middleware';

export const config = { ...configuration };

const languages = {
  default: 'en',
  languages: ['en', 'fr', 'de', 'it'],
};

const routes = {
  authApi: '/api/auth',
  signIn: '/signIn',
  main: '/',
};

export default factory([i18n(languages), auth(routes)]);

The i18n module needs a default language to fallback and a list of languages that will be appended in the URL on runtime.

The auth modules needs to know a few routes: the protected main page and the public sign in page and api endpoint. It also needs to have set up these environment variables in the project's /.env

APP_PASSWORD="password"         # the sign in password
JWT_KEY="your-secret-key"       # unique key to encript session
JWT_ISSUER="your-issuer"        # JWT unique issuer
JWT_AUDIENCE="your-audience"    # JWT unique audience

The JWT key should be 32 character long. One easy way generated it is with this command: openssl rand -base64 24.

Configurtion

The following matcher config needs to be exported from the midware.ts file manually this. The use of a variable or import/export for this expression will trigger a bug in Next.js and routing will be broken.

export const config = {
  matcher: [
    '/((?!_next/static|_next/image|locales|favicon.ico|manifest.json|robots.txt|sw.js|.*\\.png$|.*\\.css$).*)',
  ],
};