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

@cored3v/web-core

v1.0.4

Published

Reusable licensed Express core for web applications

Readme

@cored3v/web-core

A generic, production-ready application core for Node.js, designed to provide reusable bootstrapping, configuration, authentication, and license-based execution enforcement across multiple frameworks.

It supports Express.js, Next.js, Nuxt (H3), and generic Node.js environments.

Features

  • License Enforcement: Protect your source code by enforcing valid license keys.
  • JWT Authentication: Optional, built-in JWT verification helper and middleware.
  • Database Management: Optional, automatic Postgres connection pooling and lifecycle management.
  • Security Defaults: Pre-configured Helmet and CORS for Express.
  • Multi-Framework: First-class adapters for Express, Next.js, and H3.

Note: Only License Enforcement and Routes are mandatory. Auth and Database modules are opt-in and handled via configuration.

Installation

npm install @cored3v/web-core
# or
yarn add @cored3v/web-core

Usage

Next.js (App Router & Middleware)

Use createNextApp to integrate core services.

src/lib/core.ts

import { createNextApp } from "@cored3v/web-core";

// Initialize once (singleton pattern recommended)
export const core = await createNextApp({
  appId: "my-next-app"
});

src/app/api/hello/route.ts

import { core } from "@/lib/core";
import { NextResponse } from "next/server";

export async function GET(request: Request) {
  // Verify Session
  const user = await core.verifySession(request);
  if (!user) {
    return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
  }

  return NextResponse.json({ message: "Hello World", user });
}

Express.js

Use createApp to bootstrap a full Express server.

import { createApp } from "@cored3v/web-core";

await createApp({
  appId: "my-express-app",
  http: { port: 3000 },
  routes: ({ app, router, auth, db }) => {
    
    // Protected Route
    router.get("/secure", auth.middleware(), (req, res) => {
      res.json({ message: "Secure Data", user: req.user });
    });

  }
}).then(({ start }) => start());

Nuxt / H3 / Nitro

Use createH3App for H3-based servers.

import { createH3App } from "@cored3v/web-core";

const core = await createH3App({ appId: "my-nuxt-app" });

export default eventHandler(async (event) => {
  const user = await core.verifySession(event);
  if (!user) {
    throw createError({ statusCode: 401, statusMessage: "Unauthorized" });
  }
  return { message: "Success", user };
});

Configuration

The library uses dotenv to load configuration. Ensure you have a .env file or environment variables set.

| Variable | Description | Required | Default | |----------|-------------|----------|---------| | LICENSE_PATH | Path to the license.json file | No | ./license.json | | JWT_SECRET | Secret key for JWT verification | Yes (if auth used) | - | | DATABASE_URL | Postgres Connection String | No | - | | PORT | Http Port (Express only) | No | 3000 |

Note: license.json is mandatory for the app to work. However, if the file exists in root directory, then LICENSE_PATH env variable is not required.

License

Private / Proprietary.