mypubky.com is a portable profile card for the freedom web, powered by Pubky.
It is designed to feel more like a shareable identity card than a typical "link in bio" page. A profile can combine a user’s Pubky identity, avatar, bio, social links, custom background, latest posts, profile tags, sharing tools, and Paykit-ready donation flows into one visual page that can be shared anywhere.
- Presents a public profile at a route like
/:pubky - Reads shared identity data from
pubky.app - Lets the owner sign in with Pubky Ring and edit their profile
- Supports custom image or video backgrounds
- Supports left, center, or right card placement
- Supports multiple card background modes:
Dark,Blur, andClear - Shows up to 3 latest Pubky posts
- Shows Pubky profile tags
- Includes a share flow with profile link + QR
- Includes a donation flow with
Paykit QRand optionalBitcoin QR
The editing experience uses a 3D card flip. The public profile, share state, donate state, and editor all stay inside the same visual card system.
- Avatar, display name, shortened Pubky, and bio
- Button links under the bio
- Social icons
- Optional profile tags
- Up to 3 latest Pubky posts
- Share state as a card flip
- Donate state as a card flip
- Sign in with Pubky Ring QR auth
ContentandStyletabs inside the flipped editor- Avatar upload
- Name and bio editing
- Link button creation, deletion, and drag-to-reorder
- Social platform fields, including auto-derived Pubky profile URL
- Toggles for latest posts, profile tags, and donations
- Optional Bitcoin address field for Paykit / Bitcoin donate flow
- 3 default backgrounds plus custom upload
- Image and short looping video background support
- Card background modes:
DarkBlurClear
- Card position:
LeftCenterRight
- Share panel with profile link + QR
- Downloadable profile QR
- Donate panel with Paykit-native Pubky QR
- Optional Bitcoin QR tab when a Bitcoin address is set
- Paykit method publishing under the user’s public Pubky storage
- Vite
- Vanilla JavaScript
- CSS
@synonymdev/pubkyqr
This project is intentionally lightweight. It is built as a static frontend app and does not require a traditional database or custom backend for the core profile flow.
The app uses Pubky public storage and keeps shared identity data aligned with pubky.app where possible.
- Shared profile:
/pub/pubky.app/profile.json
- mypubky card settings:
/pub/mypubky.com/card.json
- mypubky uploads:
/pub/mypubky.com/files/*
- Paykit public method files:
/pub/paykit/v0/*
In practice:
name,bio,image, and portable links are aligned withpubky.app- presentation-specific settings live in
mypubky.com - optional payment method files live in
paykit
-
Install Node.js 24 LTS (Node 22.12 or newer is also supported)
-
Install dependencies:
npm ci
-
Start the dev server:
npm run dev
-
Open the local URL shown by Vite
The development server listens on 127.0.0.1 by default. Use npm run dev -- --host only when you intentionally need access from another device.
npm run check
npm auditThe regression suite covers untrusted profile data, media uploads, Bitcoin checksums, session and navigation races, progressive loading, partial-save retries, Paykit cleanup, and the existing Nexus /v0 integration.
See the security audit for the changes, verification, and remaining manual checks.
GitHub Actions runs on pull requests, pushes to main, and manual dispatch. It installs the lockfile with lifecycle scripts disabled, then runs tests and the production build on Node 22 and 24. The Node 24 job also runs npm audit --audit-level=high, failing on high or critical advisories. Actions are pinned to commit hashes and the workflow has read-only repository access.
| Location | Responsibility |
|---|---|
src/app.js |
Routes, UI events, state transitions, authentication and save coordination, DOM effects |
src/ui/ |
Homepage, profile, posts, editor, panels and dialog templates; keyboard focus restoration |
src/lib/pubky.js |
Profile loading and saving, retry checkpoints, Paykit synchronization |
src/lib/profile-data.js |
Draft defaults, validation and Social v0 document serialization |
src/lib/homeserver.js, src/lib/nexus.js |
Bounded public reads and Nexus v0 queries |
src/lib/media.js, src/lib/posts.js |
Media resolution, blob ownership and post loading |
src/lib/session.js |
SDK initialization, Ring authentication and session lifecycle |
View functions receive explicit data and state; they do not mutate application state or start network requests. The existing pubky.js exports remain available to callers.
Create a production build with:
npm run buildVite will generate a static output in dist/.
The Deploy workflow builds and publishes a container on pushes to main, then deploys it to the mypubky-com Cloud Run service behind the Google Cloud load balancer. It also supports manual dispatch. The Docker build runs npm run check before producing the Nginx runtime image, so failed tests or builds stop publication.
nginx.conf serves the SPA on port 3000, caches hashed assets, and supplies the response security headers used by the Cloud Run deployment. GitHub credentials and cloud deployment secrets are managed by the operations workflow.
The app is designed to be deployable as a static site.
Typical flow:
- Run
npm ci - Run
npm run build - Upload the generated
dist/folder to a static host
Good hosting options include:
- GitHub Pages
- Netlify
- Vercel
- Cloudflare Pages
- any static host that supports HTTPS
For profile routes like /:pubky, the host must rewrite unknown routes back to index.html so the client app can boot and resolve the Pubky itself.
This repo now includes common static-host fallback files:
public/.htaccessfor Apache-style hostingpublic/_redirectsfor Netlify-style hostingpublic/_headersfor Netlify and Cloudflare Pages security headers
After npm run build, make sure those files are uploaded with the rest of dist/.
The HTML includes a content security policy. Apache (mod_headers), Netlify, and Cloudflare Pages configurations additionally deny framing and set response headers, including long-lived caching for Vite's hashed assets. Other hosts need equivalent response-header configuration; the Vite preview server does not apply these hosting files.
The SDK loads at startup in a separate, cacheable bundle. The profile card appears before optional posts, tags, payment methods and mention details finish loading. Avatar and background preloads run together. Built-in backgrounds and the homepage demo use lossless WebP at their original dimensions; the original PNG sources are retained. Uploaded media is not recompressed.
Saves show the confirmed local profile immediately after storage writes finish. Optional content refreshes separately. Partial failures keep the editor and draft open, reuse successful uploads, and retry unfinished writes. Recovery checkpoints last while the draft remains open in this page; they are not a persistent offline queue. Multiple public-file writes are still not atomic.
Escape closes the topmost dialog first, then an open card panel. Closing the editor uses the same behavior as Cancel and discards unsaved edits. A save in progress cannot be dismissed. Closing the Ring dialog cancels its pending approval, and focus returns to the opening control when available.
- Auth is handled with Pubky Ring QR approval
- Cookie-session metadata is stored locally and restored when possible; the SDK keeps the authentication cookie separate
- The app includes lightweight session diagnostics to help explain when a session expires or loses required permissions
- Uploaded media is currently capped by app rules for simpler UX
- New uploads accept PNG, JPEG, GIF, WebP and AVIF images, plus MP4, WebM, Ogg and MOV backgrounds. SVG and HTML uploads are rejected. The 10 MB limit and media signatures are checked again before writing.
- Nexus remains on
/v0and shared profiles remain under/pub/pubky.app/. Social v1 migration is intentionally deferred.
mypubky.com is not just a links page.
It is meant to be a portable public identity surface for Pubky:
- who you are
- how to reach you
- how to verify it is really you
- how to follow you in the ecosystem
- how to support you
The goal is to make Pubky useful and shareable anywhere on the web.