is built for developers. is built for developers.


2 min read

I previously wrote about why I created - now here is a follow-up especially for developers who might be interested in the project. was always open source, but it has been structured in a way that made it hard understand what's going on behind the scenes (one big repo). As a first step towards better (code) accessibility I extracted core functionalities into a developer friendly npm package. Not only can everybody better understand how this product works, it also allows developers to use this service programmatically within their own projects.

For context, sharing information in a truly secure way is harder than you'd think. You can only guarantee confidentiality with end-to-end encryption. In other words, the information you want to transmit has to be encrypted and decrypted on the client. This means you can't just create a secure server infrastructure and offer a public API - you also need code executed on the client. The good news is, you can now just do that.

scrt-link-core has just been published. Use it in your project. It's free.


In any node based environment you can just install the package like this:

yarn add scrt-link-core
# or: npm i scrt-link-core

Basic usage

The heart of the package is the createSecret function that handles the encryption of the secret, as well as the communication with the API. It returns an object containing secretLink. (This package assumes that you use as your backend, but it's not mandatory - feel free to create your own backend. See scrt-link for reference code.)

import { createSecret } from "scrt-link-core";

const { secretLink } = await createSecret("Some confidential information…");

Via (hosted) ES Modules

Now wait - before you think it's too much trouble - you don't even need to install any package. With e.g. Skypack it's possible to literally create a secret link with just two lines of code - wherever you need it. Just drop the following snipped into your HTML:

<script type="module">
  import { createSecret } from "";

  createSecret("Some confidential information…").then(({ secretLink }) => {console.log(secretLink)});

For more information and examples read the full documentation.

All code is open source and on Gitlab.

Feedback is very welcome :)

Did you find this article valuable?

Support Chris by becoming a sponsor. Any amount is appreciated!