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

@s3p/server-ui

v0.2.0

Published

The auto-generated /server admin console for an s3p project (object browser, users, roles, secrets, email, functions).

Readme

@s3p/server-ui

Framework-agnostic UI for a project's /server route (the operator-facing admin console of an S3-Native App Platform project). Embeds into any host page (Vue, React, Svelte, vanilla HTML) via a web component or a programmatic mount API. See ../../RUNTIME.md for the design.

s3p dev and s3p build auto-mount this package at /server/ for any project that has an s3p.config.json and hasn't shipped its own /server/index.html. You normally don't import it directly — the CLI wires it up for you.

Cards (today)

Rendered in this order when the host passes a project and the matching SDK facade:

| Card | Always shown | Requires | |---|---|---| | Identity | yes | active STS session — surfaces sub, role, raw claims | | Project | when project is passed | s3p.config.json | | Users | when platform.users set | app.users (Cognito User Pool admin perms) | | Roles | when platform.roleAdmin set | app.roleAdmin (IAM + Identity Pool perms) | | Database | when project set | nothing extra — uses S3 client | | Scratchpad | when project set | nothing extra — REPL over app.* | | Functions | when project set | server runtime registered handlers | | Object browser | yes | S3 client + bucket name | | Secrets | when project set | lists ciphertext only; decrypting needs server-role KMS perms | | Inbox / Outputs | yes | S3 client — lists data/inbox/* and data/outputs/* | | Body inspector | yes | populated by selection in browser or outputs |

All S3 calls go through the caller-supplied app.getS3Client() so the panel shares the host's STS session and credential refresh path — no second OIDC dance.

The panel uses refresh buttons everywhere (no auto-poll) so the UI doesn't churn while operators are typing.

Usage

Web component (drop-in HTML)

<script type="module">
  import { connect } from "@s3p/sdk";
  import "@s3p/server-ui";  // side-effect: defines <s3p-server-ui>

  const app = await connect();
  if (!app.signedIn) { app.signIn(); throw new Error("redirecting"); }

  const el = document.querySelector("s3p-server-ui");
  el.platform = app;          // pass the configured SDK client
  el.project = app.project;   // optional — enables Project/Users/Roles/etc cards
</script>

<s3p-server-ui></s3p-server-ui>

Programmatic mount

import { mountServerUi } from "@s3p/server-ui";

const unmount = mountServerUi(document.getElementById("server-root"), {
  platform: app,                 // anything that exposes getS3Client()
  defaultBucket: app.bucket,
  defaultPrefix: "data/",
  project: app.project,          // optional — enables Project + Secrets cards
});

// later
unmount();

Host shape

interface ServerUiHost {
  getS3Client(): Promise<S3Client>;
  getClaims?: () => { sub?, role?, preferred_username? } | null;
  users?: UsersFacade;          // enables Users card
  roleAdmin?: RolesFacade;      // enables Roles card
}

The PlatformClient returned by @s3p/sdk matches this shape; any equivalent object works.

Style isolation

The web component attaches a shadow root, so the panel's CSS doesn't leak into the host page and vice versa. Safe to drop into any layout.

Internals are vanilla TypeScript + DOM — no framework dependency, embedders pay nothing for it.

Dev loop

From the workspace root:

npm run build --workspace=@s3p/server-ui
npm test --workspace=@s3p/server-ui
npm run typecheck --workspace=@s3p/server-ui
npm run lint --workspace=@s3p/server-ui

Tests

Vitest covers:

  • Database card classifier (collection / log / doc detection from storage layout).
  • Scratchpad eval loop (REPL invariants, output formatting).