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

@vactorynext/console

v1.0.1

Published

Admin console and feature flags for Vactory Next apps.

Readme

@vactorynext/console

Admin console and feature flags for Vactory Next apps.

Requirements

@vactorynext/core ≥ 3.1.0 is required. That release (and above) provides the webpack alias @vactorynext/console/project-flags → app-root flags.ts, and emits .runtime/project-flags.js for custom servers. Older core will not resolve project flags correctly — upgrade core before or together with installing this package.

This package cannot run alone. Every app must provide:

apps/<project>/flags.ts

exporting defaultFlags (system flag defaults). Runtime values are stored in database/flags-db.json (created automatically). Keep flags.ts outside database/ so an Easypanel/Docker volume on database/ does not hide defaults.

Editing flags.ts in a fork (published npm package) is the source of truth: the loader reads app-root flags.ts first, then falls back to .runtime/project-flags.js (Docker / no jiti). New or changed flag definitions are merged into flags-db.json on the next request (saved values in the DB are kept). Reload /admin after editing; a Next rebuild still refreshes .runtime/project-flags.js for production.

Next apps using @vactorynext/core createNextConfig get an automatic webpack alias:

@vactorynext/console/project-flags → flags.ts (app root; legacy database/flags.ts still accepted)

That static alias is required (no dynamic require / jiti) so Webpack does not warn about critical dependencies.

Entry points

| Import | Use | |--------|-----| | @vactorynext/console/client | FlagBagProvider, useFlags, useFlag (browser-safe) | | @vactorynext/console/server | getServerSidePropsFlags, updateFlag, createFlag, getFlags, syncFlags | | @vactorynext/console/flag-types | Flag type, FLAG_NAMESPACE_SPERARATOR (for your flags.ts) | | @vactorynext/console/admin | Admin page + getServerSideProps | | @vactorynext/console/api-route | createApiRoute for /api/admin/flags | | @vactorynext/console/middleware | Shield / IP helpers | | @vactorynext/console/components-resolver | addComponent for admin UI injections |

Do not import @vactorynext/console/lib/database/flags — use /server.

Project flags.ts example

import type { Flag } from "@vactorynext/console/flag-types"
import { FLAG_NAMESPACE_SPERARATOR } from "@vactorynext/console/flag-types"

export const defaultFlags: Flag[] = [
  {
    name: `system${FLAG_NAMESPACE_SPERARATOR}shield`,
    fieldLabel: "Enable shield",
    value: false,
    isSecure: false,
    type: "boolean",
    group: "shield",
    namespace: "system",
  },
  // ...
]

Widget admin flags still come from .runtime/widgets.config.json (Webpack) and are merged by the package.

Starter wiring

  • pages/_app.jsx → /client
  • pages/admin/[[...admin]].jsx → /admin + /components-resolver
  • pages/api/admin/flags.js → /api-route
  • SSR / offline → /server

Publish

See PUBLISH.md.

Tailwind

Admin theme content should include package sources, e.g.:

"../../node_modules/@vactorynext/console/src/**/*.{js,jsx,ts,tsx}"

Console UI / admin theme use stock Tailwind palettes only (no CSS-variable brand colors). In themes/admin/tailwind.config.js, semantic names are aliases:

  • primary → indigo
  • error → red
  • warning → amber
  • success → green

So shared CSS like border-primary-500 still compiles, and colors look the same in every project.