Library / SDK
jsr-io/jsr avatar
jsr-io/jsr

jsr-io/jsr: running the JavaScript registry stack locally

The open-source package registry for modern JavaScript and TypeScript

2,987 stars173 forksRustMIT

At a glance

What is it?
The jsr-io/jsr repository is the source code behind jsr.io, the JavaScript registry. Its README is aimed at contributors, and the split between frontend-only and full-stack development is the first decision you have to make.
Who is it for?
Adopt this repository if you want to change how jsr.io itself works, either the Fresh frontend or the Rust management API, and you are comfortable with Deno, Rust, sqlx and a local PostgreSQL. Do not adopt it if you want to run a private registry for your own packages: the README documents a contributor workflow, not a deployment guide, and the production topology is Cloudflare Workers, R2, Cloud Run and Cloud SQL.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • jsr-io/jsr2,987 ★ · +13
Star history
Repository2026-09-242026-11-25
jsr-io/jsr3k3k

13 Stars in the last 62 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What the jsr-io/jsr repository actually is

This is not a library you import. It is the source code for https://jsr.io, and the README says so in a blockquote that is easy to miss: the rest of the document is only relevant to people contributing to the registry, and anyone looking for usage information is pointed at https://jsr.io/docs. That single sentence sets the audience. You are here to change the registry, not to consume it.

The stated goals are short: robust, low maintenance, cheap, open source. The architecture those goals produce is split across providers. Module and package metadata live on Cloudflare R2, npm compatibility tarballs live on Cloudflare R2, the management API is Rust on Google Cloud Run, the frontend is Fresh running as a Cloudflare Worker, and PostgreSQL on Google Cloud SQL holds data that is not used for serving registry requests. Search is handled by Algolia. If you expected one process and one database, the repository layout (api/, crates/, frontend/, lb/, terraform/, workers-rs/) tells you otherwise before you read a line of code.

How requests flow through the lb worker

The interesting part of the design is what happens at the edge. According to the README, https://jsr.io, https://api.jsr.io and https://npm.jsr.io are all served by a Cloudflare Workers worker described as the LB. That worker does three different things depending on the path. Module, package metadata and npm tarball requests are served directly from R2, so they never touch the API. Requests under /api are proxied to the management API on Cloud Run. Everything else is proxied to the frontend Worker through a service binding, which the README notes avoids a public URL hop.

That split explains why the database is described as not used for serving registry requests. Reads of published artifacts go to object storage; the API handles the write path and account operations. For a contributor this matters because the two development modes exercise different halves of that picture. Running the frontend alone connects to the production API, so you are testing against live data. Running the whole stack gives you a local API, a local database and a local lb, and it is the only mode where your changes to Rust code are visible. Distributed tracing runs through Google Cloud Trace in production and Jaeger in development, and docker-compose.yml ships a jaegertracing/all-in-one service on ports 16686, 4317 and 4318 for that purpose.

Installing the toolchain and starting the frontend

The README documents two getting-started paths. The lighter one is frontend only, and it needs just Deno and a clone of the repository. The setup task adds the required /etc/hosts entries so that the local hostnames resolve.

sh
deno task dev setup frontend

After that, the frontend runs with a single task. The README gives this command and states that you can then view the registry at http://jsr.test.

sh
deno task prod:frontend

One warning is attached to this mode and it is worth repeating plainly: that frontend is connected to the production API, and the README tells you to use it with the same care you would use the live registry. You are not isolated from real data. If you want isolation, take the second path instead, which needs Deno, Rust, sqlx-cli installed via cargo install sqlx-cli, and either Docker and docker-compose on Linux or PostgreSQL installed through Homebrew on macOS. You also need an api/.env. The README walks through creating a GitHub App with the callback URL http://jsr.test/login/callback, disabling webhooks, setting account permission Email addresses to read-only, and copying GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET plus a DATABASE_URL into that file. Then:

Running the full stack and publishing to it

The full-stack setup command verifies prerequisites, configures /etc/hosts, installs frontend dependencies, copies api/.env.example to api/.env if it does not exist, creates the registry database and runs migrations. The README adds that under WSL it also touches the Windows hosts file.

sh
deno task dev

On Linux, if you manage PostgreSQL outside of Docker, the README shows deno task dev --no-docker-postgres instead. While the stack runs you get an interactive prompt with restart <name|all>, help, and quit or Ctrl+C. A single service can be started standalone with deno task dev start <name> [args...]. The registry is at http://jsr.test and the API at http://api.jsr.test.

Publishing to this local instance is a one-liner: create a directory with a deno.json, cd into it, and run deno publish with JSR_URL pointed at the local host.

bash
JSR_URL=http://jsr.test deno publish

To fill the registry with realistic data, the README suggests publishing deno_std. That requires making yourself a staff user first, which is done directly in the database rather than through the UI. Run psql registry, then SELECT name, github_id FROM users; to find your GitHub ID, then UPDATE users SET is_staff = true WHERE github_id = xxxxxxx; with that ID substituted. After that you copy your UUID from your profile URL, assign the std scope at http://jsr.test/admin/scopes/assign, clone deno_std alongside the jsr project, and publish with the same JSR_URL variable. Schema changes are applied with deno task db:migrate.

Where the contributor workflow gets rough

The setup path assumes a lot. A GitHub App is required before the API will start, and the README's instructions for it are specific enough that any deviation (a different callback URL, webhooks left enabled, the email permission left unset) is on you to debug. The @denoland employees section simply says to download a .env file from 1Password, which is not an option for anyone else, so outside contributors follow the longer GitHub App route.

The staff and admin workflow is the clearest sign that this is an internal tool with a public repository. Promoting yourself means editing the users table with SQL, and assigning scopes means using an admin panel at a local URL. There is no documented command that does either. The bad-words loading procedure is similarly manual: it requires downloading the Cloud SQL Auth Proxy, running cloud-sql-proxy -g [database connection string] -p 5433, writing a bad_words.sql file by hand, and applying it with psql against a connection string on 127.0.0.1:5433. That is a production database operation dressed as a setup step, and the README does not document a rollback for it.

The README also does not document how to run the lb worker locally, how to point the stack at your own R2 bucket, or what a release process looks like. The repository has no published GitHub releases, so there is no versioned artifact to pin against. The documentation generation section points at deno_doc and shows a [patch.crates-io] entry for a local clone, which is useful only if you are already working on deno_doc itself.

JSR versus npm, from the contributor's seat

The related searches around JSR vs npm and npx jsr are about consuming packages, and this repository answers them only indirectly. What the source shows is the compatibility layer: npm compatibility tarballs are stored on R2 and served by the lb worker, which is the mechanism behind the npm.jsr.io hostname. So npm compatibility is not a translation service running on demand; it is precomputed artifacts sitting in object storage next to the native ones.

Compare that with a registry like Verdaccio, which is a self-hosted npm registry you run as a Node process with local storage. Verdaccio is the right tool when you want a private registry for internal packages and a proxy cache for the public one. jsr-io/jsr is not that. It is the implementation of one specific public registry, wired to Cloudflare and Google Cloud services, and the README never presents it as something you deploy for yourself. If your goal is hosting packages for your own team, the difference is not configuration, it is the entire premise. If your goal is understanding how a modern registry separates artifact serving from API writes, this repository is a readable example of that split.

Licence and the cost of keeping a fork alive

The repository is MIT licensed, which permits use, modification and redistribution provided the copyright notice and permission notice are preserved. Note the .licenserc.json file at the top level, which suggests per-file licence headers are checked; if you fork and add files, matching that convention is cheaper than discovering it in review. This is not legal advice, and if you plan to redistribute a modified registry, read the LICENSE file yourself.

Upgrade cost is the harder question. There is no release list to follow, so tracking upstream means tracking commits on main. The last push was on 2026-09-14. The stack spans Rust, Deno, Fresh, PostgreSQL with sqlx migrations, Terraform and Workers, so a fork inherits all of those upgrade surfaces at once. The sqlx migrations in particular mean schema changes arrive as files you apply with deno task db:migrate, and a fork that has diverged will have to reconcile them by hand. None of this is unusual for infrastructure code, but it is a real ongoing cost, and the README offers no upgrade guide.

Editorial conclusion

Adopt this repository if you want to change how jsr.io itself works, either the Fresh frontend or the Rust management API, and you are comfortable with Deno, Rust, sqlx and a local PostgreSQL. Do not adopt it if you want to run a private registry for your own packages: the README documents a contributor workflow, not a deployment guide, and the production topology is Cloudflare Workers, R2, Cloud Run and Cloud SQL. Before you start, verify that a GitHub App with the callback URL http://jsr.test/login/callback exists, that api/.env holds GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET and DATABASE_URL, and that deno task dev setup completes its prerequisite checks.

Frequently asked questions

What does JSR mean in the jsr-io/jsr project?

The README does not expand the acronym. It describes the repository as the source code for https://jsr.io, the new JavaScript registry, and the project's own description calls it the open-source package registry for modern JavaScript and TypeScript.

Is jsr-io/jsr the same thing as the JSR company or the JSR location?

No. This repository is the registry software behind jsr.io, written primarily in Rust with a Fresh frontend, and it is unrelated to companies or place names that share the letters JSR.

How do I run the jsr-io/jsr frontend locally?

Install Deno, clone the repository, run deno task dev setup frontend to add the required /etc/hosts entries, then run deno task prod:frontend and open http://jsr.test. The README warns that this frontend is connected to the production API.

How do I publish a package to a local jsr-io/jsr instance?

Create a directory containing a deno.json, cd into it, and run deno publish with the JSR_URL environment variable set to http://jsr.test.

What does deno task dev setup do in this repository?

The README states it checks that Deno, Cargo, sqlx and Docker or Postgres are installed, adds jsr.test, api.jsr.test and npm.jsr.test to /etc/hosts, installs frontend dependencies, copies api/.env.example to api/.env if missing, and creates the registry database with migrations.

How do I make myself a staff user in the local jsr-io/jsr environment?

Run psql registry, then SELECT name, github_id FROM users; to find your GitHub ID, then UPDATE users SET is_staff = true WHERE github_id = xxxxxxx; with that ID substituted. The README says you should see a success message confirming one row was updated.

Official sources

  1. Issues
  2. jsr-io/jsr on GitHub
  3. License: MIT
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/jsr-io-jsr.svg)](https://hysenlabs.com/projects/jsr-io-jsr)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/jsr-io-jsr.svg)](https://hysenlabs.com/projects/jsr-io-jsr)

Was this useful?