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

s42-core

v3.0.10

Published

S42-Core v3 is a Bun-first, 100% module-oriented backend framework where each module encapsulates everything needed to work autonomously in production systems.

Readme

s42-core

S42-Core

S42-Core is a Bun-first backend framework for building professional APIs, services, and modular cells. It is built around dynamic modules, high-performance HTTP primitives, and event-driven communication.

Developed by Cesar Casas (CEO & Head of Engineering at Stock42 LLC) with AI-assisted engineering workflows (Codex).

What S42-Core Solves

  • Fast HTTP backends on Bun (Bun.serve, Web Request/Response).
  • Modular architecture with convention-based loading.
  • Event-driven communication for distributed cells/services.
  • Built-in utilities for Redis, MongoDB, SQL, SQLite, SSE, and dependency container patterns.
  • Cluster orchestration and IPC for multi-worker runtimes.

Bun-First Architecture

Core runtime choices follow Bun APIs first:

  • HTTP server: Bun.serve
  • Route registration: Bun.serve({ routes }) + fallback matcher for wildcard patterns
  • Process/workers: Bun.spawn + IPC
  • File/module discovery: Bun.Glob
  • SQL/SQLite: Bun.SQL and bun:sqlite
  • Redis: Bun.RedisClient

Module System

S42-Core supports three module types:

  1. full Domain modules with controllers/ and optional events/.
  2. mws Middleware modules with mws/index.ts contract (default, beforeRequest, afterRequest).
  3. share Shared modules for reusable code (services, types, utils, etc.) with no route/event registration.

Load order:

  1. mws
  2. share
  3. full

Middleware execution is on-demand at controller level (requireBefore, requireAfter, beforeRequest, afterRequest).

Quick Start

Install:

bun add s42-core

Minimal bootstrap:

import { Modules, RouteControllers, Server } from 's42-core'

const modules = new Modules('./modules')
await modules.load()

const server = new Server()
await server.start({
  port: 5678,
  RouteControllers: new RouteControllers(modules.getControllers()),
  hooks: modules.getHooks(),
})

Run local module demo in this repo:

bun run modules/server.ts

Module Folder Conventions

modules/
  auth/
    __module__.ts          # type: "mws"
    mws/index.ts
  share/
    __module__.ts          # type: "share"
    services/
    types/
  operators/
    __module__.ts          # type: "full"
    controllers/
    events/

Documentation Index

English:

Spanish:

Current Priorities

See TODO.md for prioritized engineering backlog (P0-P3) based on full src/ analysis and Bun docs alignment.

License

MIT

Credits

S42-Core is developed by Cesar Casas and the engineering team at Stock42 LLC, a company focused on AI solutions, AI agents, and production-grade backend systems.