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

@dora-cms/server

v0.5.0

Published

Self-hosted API backend for dora-cms — content, blog and image-upload endpoints with admin auth. Deployable to Render as a Node service or to Vercel as serverless functions.

Downloads

996

Readme

@dora-cms/server

The API backend for @dora-cms/react — content, blog, image upload, and admin auth, backed by MongoDB. Deployable as a persistent Node service (Render) or as Vercel serverless functions.

Full guide, including the security model: docs/ARCHITECTURE.md in the repo.

Setup

cp .env.example .env

Fill in .env:

  • MONGODB_URI — a MongoDB connection string (MongoDB Atlas free tier works).
  • JWT_SECRET — openssl rand -hex 32.
  • DORA_ADMIN_PASSWORD_HASH — run npm run hash-password -- "the-clients-password" and paste the printed hash. Never put the plain password in .env.
  • ALLOWED_ORIGINS — comma-separated origins allowed to call this API from a browser.
  • Image storage — pick one with STORAGE_DRIVER (defaults to s3, so leaving it unset keeps the original behavior):
    • s3 (default): S3_BUCKET / S3_REGION / S3_ACCESS_KEY_ID / S3_SECRET_ACCESS_KEY — any S3-compatible storage (AWS S3, Cloudflare R2, Backblaze B2, ...). Set S3_ENDPOINT for non-AWS providers.
    • cloudinary: CLOUDINARY_CLOUD_NAME / CLOUDINARY_API_KEY / CLOUDINARY_API_SECRET.
    • vercel-blob: BLOB_READ_WRITE_TOKEN (only useful when this backend is itself on Vercel).
    • local: no vars required; writable disk only — works on Render or local dev, not Vercel.
  • REDIS_URL — optional; shares rate-limit counters across instances once you scale past one (defaults to an in-memory store, correct for a single instance).

Run locally

npm run dev    # tsx watch, http://localhost:4000

Deploy

Render (or any persistent Node host):

npm run build
npm start

Vercel: create a Vercel project with Root Directory = packages/server. The included api/index.ts and vercel.json route every request to the shared Express app as a single serverless function.

Either way, set the same env vars from .env.example in the platform's dashboard.

Endpoints

All routes are scoped under /api/sites/:siteId/....

| Method | Path | Auth | Purpose | |---|---|---|---| | POST | /auth/login | — | Exchange the admin password for a 2h JWT | | PUT | /auth/password | Bearer | Change the site's admin password | | GET | /content | — | Fetch all saved content for the site (cached for anonymous requests) | | PUT | /content/:slotId | Bearer | Save a text | richtext | image | color value | | DELETE | /content/:slotId | Bearer | Clear a saved value, reverting to the component's default | | POST | /upload | Bearer | Upload an image (multipart file field), returns { url } | | GET | /media | Bearer | List the site's previously uploaded images (media library) | | GET | /blog | — | List blog posts, newest first (cached for anonymous requests) | | POST | /blog | Bearer | Create a post (title, body, optional coverImage) | | PUT | /blog/:id | Bearer | Update a post | | DELETE | /blog/:id | Bearer | Delete a post | | PUT | /blog/reorder | Bearer | Persist a new post order ({ order: string[] } of post ids) |

License

MIT