Navigation
Let’s talk Pune, India / Independent developer
All writing

Two clients, one clipboard

How Croxync connects a Chrome extension and a PWA, and why its synchronization model matters.

A copied link is usually local to a device. Croxync gives it somewhere else to go: a shared collection available from a Chrome extension and an installable web app.

This is an implementation note based on the public source, rather than a deployment benchmark.

The extension and the web app

The extension has three pieces: a content script, a Manifest V3 service worker, and a popup. It captures copied text, selected text, and page links. The PWA retrieves, organizes, copies back, and deletes clips.

Both use the Next.js application API. A six-character code identifies the shared collection across devices.

Synchronization has a specific meaning

The dashboard refreshes every five seconds. The source contains the following effect:

dashboard/page.tsx
tsx
useEffect(() => {
  if (!code) return;
  const interval = setInterval(() => fetchClips(code), 5000);
  return () => clearInterval(interval);
}, [code, fetchClips]);

This is polling. Calling it “realtime” would hide the actual behavior. A newly saved clip becomes visible after a refresh, rather than being pushed over a persistent connection.

The cleanup matters too: changing the code or leaving the view clears the old interval.

Read the current schema

The README describes an earlier SQLite setup. The current Prisma schema declares PostgreSQL.

That is a small reminder about project descriptions: a README is useful context, but the implementation is worth checking before repeating a claim.

Keep the limits visible

The sync code is a lightweight access model. It should not be described as end-to-end encryption. The repository lists that as future work.

For the portfolio, the interface uses fictional clips and is labeled as a reconstruction. The case study still explains the product without exposing anyone’s clipboard or relying on a public deployment.

View the Croxync case study.