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

@novahelm/config

v2026.6.1

Published

NovaHelm configuration loader — defineConfig() and typed application config.

Readme

@novahelm/config

Configuration package for NovaHelm -- defines the NovaConfig type, the defineConfig() factory, environment variable schema, and billing plan utilities.


Quick Start

pnpm add @novahelm/config

Create a novahelm.config.ts at your project root:

import { defineConfig } from "@novahelm/config";

export default defineConfig({
  app: {
    name: "My App",
    url: "https://myapp.com",
    supportEmail: "[email protected]",
  },
  features: {
    blog: true,
    analytics: true,
  },
  auth: {
    providers: ["credential", "google", "github"],
    requireEmailVerification: true,
    enableMfa: true,
  },
});

All properties are optional -- defineConfig() deep-merges your overrides with sensible defaults.


NovaConfig Sections

| Section | Key Options | |---------|-------------| | app | name, url, supportEmail, defaultCurrency, defaultLocale | | features | multiTenant, realtime, blog, analytics, remoteConfig, monitoring, sync | | defaultModules | Module slugs to auto-enable on new projects (e.g. ["commerce", "ai"]) | | auth | providers, requireEmailVerification, enableMfa, enableImpersonation, sessionMaxAge | | admin | basePath, requireRole, enableAuditLog, enableFeedbackWidget | | plans | Array of PlanConfig (billing tiers with Stripe IDs, limits, features) | | onboarding | enabled, steps[] with id, title, description | | notifications | inApp, email, push, sms, discord | | content | enableComments, enableNewsletter, legalPages | | analytics | provider, retentionDays, trackPageViews, trackCommerce | | health | probeIntervalMs, alertAfterFailures, notifyChannels | | engagement | enableSubscriptions, enablePersonas, digestSchedule | | storage | maxUploadSizeMb, allowedMimeTypes, enableVideoProcessing | | ai | provider, embeddingModel, embeddingDimensions, defaultModel | | rateLimit | enabled, tiers (public/authenticated/apiKey/sensitive), recordViolations | | backup | encryptionKey, defaultRetention, notifyOnFailure | | agent | enabled, maxConcurrent, executionTimeoutMs |


Billing Plans

Define billing tiers with Stripe integration, usage limits, and feature gates:

import { defineConfig } from "@novahelm/config";
import type { PlanConfig } from "@novahelm/config";

export default defineConfig({
  plans: [
    {
      id: "free",
      name: "Free",
      stripeProductId: "prod_free",
      stripePriceIds: { monthly: "price_free_mo" },
      roleSlug: "user",
      limits: { teamMembers: 1, storageBytes: 500_000_000 },
      features: ["basic-analytics"],
      sortOrder: 0,
    },
    {
      id: "pro",
      name: "Pro",
      stripeProductId: "prod_pro",
      stripePriceIds: { monthly: "price_pro_mo", yearly: "price_pro_yr" },
      roleSlug: "user",
      limits: { teamMembers: 10, storageBytes: 50_000_000_000 },
      features: ["basic-analytics", "ai", "priority-support"],
      sortOrder: 1,
      recommended: true,
    },
  ],
});

Plan Utilities

import { getPlan, getRecommendedPlan, getSortedPlans } from "@novahelm/config";

const plans = config.plans;
const pro = getPlan(plans, "pro");           // Find by ID
const recommended = getRecommendedPlan(plans); // Get recommended (or first)
const sorted = getSortedPlans(plans);         // Sort by sortOrder

Environment Variables

The config package includes a type-safe environment variable schema with Zod validation, scoped by runtime and deployment tier:

import { createNovaEnv } from "@novahelm/config";

const env = createNovaEnv({
  runtime: "nextjs",  // "nextjs" | "node" | "edge"
});

// All env vars are validated and typed
env.DATABASE_URL;     // string (required)
env.RESEND_API_KEY;   // string | undefined (optional)

Environment Schema

import {
  FORGE_ENV_VARS,
  getEnvVarsByScope,
  getEnvVarsByGroup,
  getRequiredVarsForTier,
  getEnvGroups,
} from "@novahelm/config";

// Get vars needed for production
const prodVars = getRequiredVarsForTier("production");

// Get vars by functional group
const dbVars = getEnvVarsByGroup("database");
const authVars = getEnvVarsByGroup("auth");

Platform Environment Client

Fetch environment variables from the NovaHelm Console platform API:

import { fetchEnvFromPlatform, clearPlatformEnvCache } from "@novahelm/config";

const env = await fetchEnvFromPlatform({
  platformUrl: "https://console.novahelm.dev",
  projectSlug: "my-app",
  apiKey: process.env.NOVA_API_KEY!,
});

API Reference

| Export | Description | |--------|-------------| | defineConfig(overrides) | Create a NovaConfig with defaults deep-merged | | NovaConfig | Full configuration type | | PlanConfig | Billing plan definition type | | getPlan(plans, id) | Find a plan by ID | | getRecommendedPlan(plans) | Get the recommended plan | | getSortedPlans(plans) | Sort plans by sortOrder | | createNovaEnv(options) | Create a validated environment object | | FORGE_ENV_VARS | Full environment variable schema | | getEnvVarsByScope(scope) | Filter vars by scope (server/client) | | getEnvVarsByGroup(group) | Filter vars by functional group | | getRequiredVarsForTier(tier) | Get required vars for deployment tier | | getEnvGroups() | List all env var groups | | fetchEnvFromPlatform(opts) | Fetch env vars from Console API | | clearPlatformEnvCache() | Clear cached platform env vars |