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

@web-remarq/cloud

v0.3.0

Published

Cloud storage adapter for web-remarq — Supabase-backed sync

Readme

@web-remarq/cloud

Cloud storage adapter for web-remarq. Sync annotations across team members through Supabase.

npm license

What it does

Replaces the default LocalStorageAdapter with a Supabase-backed one. Annotations made by anyone with the same project key sync to a shared backend, so designers and developers see the same set of markers across browsers and devices. Self-host Supabase — the free tier is enough for a team.

Install

npm install @web-remarq/cloud @supabase/supabase-js

@supabase/supabase-js is a peer dependency — bring your own version so it isn't duplicated in your bundle.

Setup (10 minutes)

1. Create a Supabase project

Go to dashboard.supabase.com, create a new project on the free tier, and save the Project URL and anon public key from Settings → API.

2. Apply the schema

Copy the contents of sql/001_init.sql into Supabase Studio → SQL Editor → New query → Run. Creates projects, annotations, RLS policies, and the current_project_id() helper.

3. Generate a project key

npx @web-remarq/cloud gen-key --name "My App"

Save the printed pk_... key — it can't be recovered. Paste the generated insert into projects ... snippet into Supabase Studio → SQL Editor → Run.

4. Wire it up

import { WebRemarq } from 'web-remarq'
import { createCloudStorage } from '@web-remarq/cloud'

WebRemarq.init({
  storage: createCloudStorage({
    supabaseUrl: import.meta.env.VITE_SUPABASE_URL,
    supabaseAnonKey: import.meta.env.VITE_SUPABASE_ANON_KEY,
    projectKey: import.meta.env.VITE_REMARQ_PROJECT_KEY,
  })
})

API

createCloudStorage(options): StorageAdapter

Returns a StorageAdapter you can pass to WebRemarq.init({ storage }).

Options:

  • supabaseUrl (required) — your Supabase project URL
  • supabaseAnonKey (required) — anon/publishable key (safe to ship to the browser — RLS gates everything)
  • projectKey (required) — pk_... key you generated in step 3
  • onError ('throw' | 'memory-fallback', default 'throw') — what to do when a Supabase call fails

createPreflightChecker(config, client?)

Adapts the AI comment pre-flight check to core's qualityGate.check signature — one line of wiring:

import { WebRemarq } from 'web-remarq'
import { createPreflightChecker } from '@web-remarq/cloud'

WebRemarq.init({
  qualityGate: {
    check: createPreflightChecker({ provider: 'openai', apiKey: import.meta.env.VITE_OPENAI_KEY }),
  },
})

Config:

  • provider (required) — 'anthropic' | 'openai'
  • apiKey (required) — your provider API key (BYOK)
  • model (optional) — defaults to claude-haiku-4-5 (Anthropic) / gpt-5-nano (OpenAI)

BYOK warning: the key is visible in the browser. Fine for local dev and dogfooding; for anything shared, put the LLM call behind a server-side proxy route and pass a custom check function that hits your route instead.

Persisting verdicts to Supabase requires the 003_quality.sql migration (see Upgrading below).

generateProjectKey(): string

Generates a pk_<32 random chars> key. Browser-safe (uses Web Crypto).

hashProjectKey(key): Promise<string>

SHA-256 hex (64 chars) of the key. This is what the database stores.

Security

  • The anon key is safe in the browser. Supabase RLS gates every operation by the project key sent in the x-remarq-project-key header.
  • The project key acts like a shared password — anyone with it has full read/write access to your annotations. Treat it as a secret.
  • The database only ever stores the SHA-256 hash of the project key, never the plaintext.
  • If a key leaks, generate a new one (step 3) and delete the old project row in Supabase Studio.

Limits (cloud-0.1.0 MVP)

  • One project key per team — no user accounts yet
  • No realtime sync — refresh the page to pick up other people's changes (coming in cloud-0.2.0 with MCP server + team UX)
  • No web dashboard — manage annotations via Supabase Studio for now
  • Two tabs editing the same annotation: last write wins

Upgrading to 0.3.0

@web-remarq/[email protected] persists the AI quality verdict (qualityCheck, core ≥0.7.13) in a new quality_check column. Run the additive migration in your Supabase SQL Editor:

-- packages/cloud/sql/003_quality.sql
alter table annotations add column if not exists quality_check jsonb;

Safe on production data — existing rows just read back with no verdict.

Upgrading from 0.1.x

@web-remarq/[email protected] adds a lifecycle column to the annotations table for full audit-trail persistence (core v0.7.0 feature). Run the additive migration in your Supabase SQL Editor before installing the new version:

-- packages/cloud/sql/002_lifecycle.sql
alter table annotations
  add column lifecycle jsonb not null default '[]'::jsonb;

The migration is safe to run on production data. Existing rows get an empty array; the core's migrateAnnotation synthesizes a created event on load when lifecycle is empty.

License

MIT