gitwtfhub

wtf is pknotes?

ddyy/pknotes — explained in plain English

Analysis updated 2026-05-18

1TypeScriptAudience · developerComplexity · 4/5Setup · moderate

TL;DR

pknotes is a self-hostable notes app on Cloudflare Workers where your passkey, not a password, generates the key that encrypts everything, so the server never sees readable data.

Mindmap

mindmap
  root((pknotes))
    What it does
      Encrypted notes
      Cloudflare Workers
      Passkey login
    Tech stack
      Hono
      D1
      React
      Vite
    Use cases
      Private journaling
      Self hosted notes
      Crypto learning
    Audience
      Developers
      Privacy minded users
    Security
      No master password
      Recovery code
      Documented threat model

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Keep personal markdown notes that only you can read, even from the server operator.

REASON 2

Self-host a private notes app on your own Cloudflare account for family or friends.

REASON 3

Study a small, auditable example of client-side end-to-end encryption using WebAuthn passkeys.

What's in the stack?

TypeScriptHonoCloudflare WorkersD1ReactViteCodeMirror

How it stacks up

ddyy/pknotes0xkinno/neuralvault0xmayurrr/ai-contractauditor
Stars111
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardeasy
Complexity4/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Needs a Cloudflare account and a passkey provider that supports the WebAuthn PRF extension.

The README does not state a license.

Wtf does this do

pknotes is a note taking app that encrypts everything you write using your passkey instead of a password. It runs on Cloudflare Workers, and the encryption key comes from your passkey through a WebAuthn feature called PRF, so there is no master password and the person running the server has no way to read your notes. When you log in with your passkey, the same action that proves who you are also produces the bytes used to unlock your notes on your device. Those bytes never leave your browser. The server only ever stores your passkey's public key, an encrypted copy of your real encryption key, and the encrypted notes themselves. If someone copied the entire database, they would find nothing readable. Adding a new device just wraps the same key again, so passkeys can sync across your devices through services like iCloud Keychain without re-encrypting anything. A one-time recovery code, shown once when you sign up, is the backup way to unlock your key if you lose your passkeys. The project is upfront about its limits. The server can see how many notes you have, roughly how big they are, and when they change, and it could show you an old version of a note, though it cannot alter or swap one. Like any web app, whoever hosts the code you run in your browser could in theory ship a bad version, so trust rests on the code being small and readable, about 1,500 lines, and on the option to host it yourself instead. Under the hood it is built with Hono for the server, a Cloudflare D1 database for storage, and a React and Vite frontend with a CodeMirror editor for writing markdown. Losing every passkey and the recovery code means the notes cannot be recovered, since nobody, including the developer, holds a spare key. It can be deployed with one click on Cloudflare or set up manually, and registration can be closed once your own account exists.

Yoink these prompts

Prompt 1
Deploy pknotes to my own Cloudflare account and explain what SESSION_SECRET is used for.
Prompt 2
Walk me through how pknotes derives its encryption key from a WebAuthn passkey using PRF.
Prompt 3
Show me how to close new registrations on my self-hosted pknotes instance.
Prompt 4
Explain the difference between pknotes' recovery code and a normal password reset.

Frequently asked questions

wtf is pknotes?

pknotes is a self-hostable notes app on Cloudflare Workers where your passkey, not a password, generates the key that encrypts everything, so the server never sees readable data.

What language is pknotes written in?

Mainly TypeScript. The stack also includes TypeScript, Hono, Cloudflare Workers.

What license does pknotes use?

The README does not state a license.

How hard is pknotes to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is pknotes for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.