Nostr-based contact form: a microproject to develop nostr-based web

Originally posted as a Nostr article

When I realized that I can publish website using just static HTML and Nostr as a backend, I fell in love with the idea. I don’t even need a domain name.

The idea

The idea is simple – use relays with long-form articles as a backend. And then display with some kind of front-end. Just generate a keypair, set profile info and go publish.

Never in the process is any kind of permissions, KYC, not even an e-mail. Permissionless like Bitcoin.

For people who are Nostr native, they can use their Nostr clients to view the content and interact with it – react, zap, reply, boost, follow, …

But there are many people who are not yet on Nostr. For them, it’s just a website like any other.

The tech stack

With projects such as npub.pro , I don’t need a domain name, not even an e-mail address. I generate a keypair and I am good to go. For further customization, I started using oracolo which is a static HTML. I can either upload it to my own domain and web hosting server, or use their hosted service. I can host the HTML on cloudflare or on pgs . For pgs, no e-mail required, just generate a ssh keypair. The limit is 20MB, which is more than enough for the static HTML.

Talking back

The problem with this approach is that this is broadcast only – in order to interact with the project, you need to have a Nostr client.

Anonymous micro blog

Well, not really. Or rather – “yes, but”. A Nostr client that can read is already in JavaScript embedded on the website. And this can also post. I have done interactions two ways: with anonmicroblog I have created a way to have shared Nostr identities to publish an anonymous micro blog. The key is derived in JavaScript in the browser using PBKDF2 (password-based key derivation function). A fancy way to turn a password into a key that is slow enough to make bruteforcing hard. This way anyone can post on the website, but in order for the client to get the password, they need a key. Check for example this post page for hundrator , or interact with it using Nostr at Hundrajúci (krypto)anarchisti.

Or if you prefer English, Unemployable is another project that uses the same code.

Backend for services

I also have developed an Eso level estimator . If you want to know how esoteric something is, just write the idea and it will send a Nostr message to the bot eso-level-estimator.

You can also tag it, although I’m not sure if that works very well, but it should reply (it only reacts to the note where it’s tagged, not to the whole thread).

The idea is the same – this is a Nostr native bot, but for those who are not yet on Nostr, they can use it from the web. It will generate an ephemeral keypair, send DM to the bot and wait for the reply. It communicates through the relays (and messages are encrypted, although only NIP-04). The bot doesn’t even know the request came from web – it’s a DM like any other, it just responds to messages.

Contact form

Back to the original idea of a website hosted on Nostr. I’ve done it for various projects by now, but the problem is that it was read-only. And every cool project should have a contact form. Usually, contact forms end up as a ticket in some ticketing system (which requires accounts with third parties or self hosting a database), or as an e-mail (which requires domains, e-mail addresses and often some form of KYC, or at least a phone number).

Welcome to the Nostr native contact form: nostr-contact-form .

It is derived from the eso level estimator poster, but it serves as a contact form. It also generates an ephemeral keypair. It optionally requires a way to contact the user back (e-mail, Nostr or Simplex), is configurable with meta tags (similar to how Oracolo works) and even does PoW to limit spam (although that needs to be enforced by the realys used to refuse DMs without PoW). All configurable.

Try it out here .

With this stack, we can do anonymous, pseudonymous websites, group projects, etc.

Why?

Why bother? The internet is becoming KYC and hostile to privacy. We all know about financial surveillance, but it does not end. This year, EU’s NIS2 Directive (Directive (EU) 2022/2555) is going to be enforced, which will require domain name registrars to verify contact information (including phone number verification!). What is sad is that it applies if you have an EU-based TLD (like .eu, .de), but also if you use EU-based registrar (think EuroDNS for an Argentinian domain). You yourself might have nothing to do with EU, but it still applies. I think this will be enforced by the network effects.

Having and alternative way to host content and interact with users is important. Nostr is great, but we might want to reach people who are not yet purple-pilled.