frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: A lightweight, E2E encrypted pastebin built with Svelte 5 and Hono

https://github.com/yashau/yPad
2•yashau•1d ago
I built this because I needed a simple way to send snippets to colleagues or copy/paste text from my phone to a random computer without logging into anything. I used a few other services for a while, but the downtime and general bloat finally got to me. I decided to build my own over the New Year break.

It is live here: https://yp.pe

Full disclosure: I vibe coded the vast majority of this using Claude Code, but I kept a pretty tight leash on the logic. The full commit history is public if you want to see the fumbles and the process. I will be the first to admit that some of my initial architecture decisions were not the best, and I completely own up to that, but I am happy with where the end result landed.

The Features:

- Fast and Lightweight: No ads and no tracking. CORS policy blocks Cloudflare analytics.

- Real-time Collab: Uses Yjs/CRDTs. It is limited to 10 concurrent editors by default on a first come first served basis, but it allows unlimited viewers.

- "Smart" Slugs: Slugs are kept as short as possible. I specifically removed ambiguous characters like capital I and lowercase l so it is easy to type the URL manually into another computer address bar.

- Note Controls: You can set notes to expire after a certain time or after a specific number of views. By default, any note not accessed in 90 days is automatically cleaned up.

- Privacy: No logins. E2E encryption for password protected notes. Passwords and hashes never leave your browser, only encrypted blobs do. There is a Playwright test in the repo that verifies this.

- The Rest: Custom slugs, syntax highlighting via highlight.js, rate limiting, PWA installable.

The Caveats: I wanted to avoid the complexity of ownership, so the rules are simple: anyone can edit or delete any note. It is designed for quick, ephemeral use rather than long-term storage. If someone takes your slug, they can delete it and you can take it back. It is a bit of a free-for-all, but it keeps the codebase clean.

Technical Stack:

- Frontend: Svelte 5 with runes

- Backend: Hono

- Infrastructure: Runs on Cloudflare Workers, using Durable Objects for the real-time sync and D1 for the database.

It has not been tested at scale, but since it is on Workers, I hope it holds up. Now that the holidays are over and I am heading back to work, I will not have a ton of time to maintain this, so PRs are very welcome if you find bugs.

I am hosting a public instance for now at yp.pe. If the costs get crazy I might not be able to keep it public, but I tried to make it as easy as possible to self-host with deployment scripts and documentation in the repo.