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

@thefinder/core

v0.6.0

Published

theFinder server engine: a framework-agnostic file manager backend with local disk and S3 storage, chunked uploads, zip, trash and version history. Zero dependencies.

Readme


Install

npm i @thefinder/core

Quick start

import { createTheFinder, createFileServer } from "@thefinder/core";
import { localDriver } from "@thefinder/core/local";

const driver = localDriver({ root: "./uploads" });
const finder = createTheFinder({
  volumes: [{ id: "files", name: "Files", driver, url: "/uploads" }],
});

// Bun, Deno, Hono, Next.js route handlers, Cloudflare Workers…
Bun.serve({
  routes: {
    "/api/files": finder.handler,
    "/uploads/*": createFileServer({ driver, prefix: "/uploads" }),
  },
});

On Express, Fastify, Koa or plain node:http, wrap the handler with an adapter:

import { toExpress } from "@thefinder/core/node";

app.all("/api/files", toExpress(finder.handler));

Then point the UI at it: @thefinder/react.

Entry points

| Import | What | |---|---| | @thefinder/core | createTheFinder, createFileServer, serveFile, zip stream, errors, types | | @thefinder/core/local | localDriver (Node.js / Bun file system) | | @thefinder/core/s3 | s3Driver for AWS S3, Cloudflare R2, MinIO, Spaces, B2 (no AWS SDK) | | @thefinder/core/node | toNodeHandler, toExpress, toFastify, toKoa | | @thefinder/core/sharp | sharpThumbnailer, sharpImages (optional peer sharp) | | @thefinder/core/client | The browser client used by the UI |

Highlights

  • Commands: list, tree, search, create, rename, copy/move (also across volumes), chunked upload, zip download, archive/extract, text and binary save.
  • Trash without a database: .tf-trash per volume, restore, retention.
  • Version history without a database: .tf-versions per volume. Overwritten files keep their previous content; restore, follows renames, retention limits.
  • Thumbnails: generated on the server and cached per volume (.tf-thumbs).
  • Bulk images: resize / compress / convert with images: sharpImages(); converting keeps the original next to the new file.
  • Storage stats and cleanup for a dashboard (stats, cleanup).
  • authorize hook: false → 403, throw UNAUTHORIZED → 401, { readOnly: true } → a read-only request.
  • onEntriesChanged hook: structured moved / trashed / restored / deleted / purged / replaced events, so a database that refers to files by its own id stays in sync when paths change.
  • Safe by default: no path traversal, symlinks kept inside the root, CSRF header on writes, zip-slip and zip-bomb guards, HTML/SVG served in a sandbox.

S3, R2, MinIO

import { s3Driver } from "@thefinder/core/s3";

const cloud = s3Driver({
  bucket: "my-bucket",
  region: "auto",                                    // "auto" for R2
  endpoint: "https://<id>.r2.cloudflarestorage.com", // leave empty for AWS
  accessKeyId: process.env.S3_KEY!,
  secretAccessKey: process.env.S3_SECRET!,
  prefix: "uploads/",
});

Signing (SigV4) uses Web Crypto, so it also runs on edge runtimes. Uploads use multipart and the server keeps no state between requests.

All theFinder packages

| Package | | |---|---| | @thefinder/core | Server engine, drivers, adapters, client (this package) | | @thefinder/react | The file manager UI and file picker | | @thefinder/next | Next.js routes, standalone-ready | | @thefinder/ckeditor | CKEditor 5 / 4 connector |

License

MIT © Alper Koşay