- TypeScript 97%
- Java 1.1%
- Swift 0.9%
- CSS 0.6%
- JavaScript 0.3%
The Follows tab of the profile recovery dialog previously showed only a generic Users icon, a follow count, and a timestamp — making every historical snapshot look identical and giving users no way to distinguish one version from another. Now each snapshot renders an avatar stack of the followed profiles, which makes differences between snapshots visible at a glance. Changes along the way: - Extract the avatar-stack block from PeopleListContent into a shared PeopleAvatarStack component (sm/md/lg sizes, hover-to-pop-forward with display-name tooltip, "+N more" overflow). - Reverse `p` tags in kind 3 displays so the newest follows surface first. Kind 3 grows by appending, so the natural order is oldest-first — the same early follows would otherwise dominate every preview. Implemented as a getDisplayPubkeys(event, pubkeys) helper used at display sites only; mutations and filters keep the original array. - Compact the snapshot cards in ProfileRecoveryDialog by moving the Restore button into the top-right slot that already hosted the Current badge, and dropping the redundant "<icon> N follows" title row from the Follows card since the avatars communicate the same thing more clearly. |
||
|---|---|---|
| .agents/skills | ||
| .github/workflows | ||
| .gitlab/merge_request_templates | ||
| .vscode | ||
| android | ||
| docs | ||
| eslint-rules | ||
| ios | ||
| public | ||
| scripts | ||
| src | ||
| .env.example | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .mcp.json | ||
| AGENTS.md | ||
| capacitor.config.ts | ||
| CHANGELOG.md | ||
| components.json | ||
| CONTRIBUTING.md | ||
| eslint.config.js | ||
| index.html | ||
| LICENSE | ||
| NIP.md | ||
| NOSTR_WEBXDC.md | ||
| opencode.json | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.ts | ||
| tsconfig.json | ||
| vite.config.ts | ||
| zapstore.yaml | ||
Ditto
Your content. Your vibe. Your rules. A fun, customizable Nostr client that puts you in control.
About
Ditto is an open-source, decentralized social media client built on the Nostr protocol. It's designed for people who want to have fun online without feeding the Big Tech machine. Express yourself with custom themes, Lightning payments, and an ever-growing set of content types -- all while owning your identity and data.
Made by Soapbox.
Features
- Theming -- 9 built-in theme presets, 19 CSS token properties for full customization, and the ability to publish and share themes as Nostr events
- Infinite Content Types -- Text notes, articles, short-form videos (Divines), live streams, polls, follow packs, color moments, magic decks, geocaching, and Webxdc mini-apps
- Lightning Payments -- Zap posts and profiles with sats via Nostr Wallet Connect (NWC) or WebLN
- Comments -- Comment on anything: posts, URLs, profiles, hashtags, books, and more (NIP-22)
- Self-Hosting -- Builds to static HTML/JS/CSS. Deploy anywhere -- GitHub Pages, Netlify, Vercel, a VPS, or a Raspberry Pi
- Mobile -- Android native app via Capacitor, responsive design for all screen sizes
Getting Started
Prerequisites
- Node.js 22+
- npm 10.9.4+
Development
git clone https://gitlab.com/soapbox-pub/ditto.git
cd ditto
npm install
npm run dev
The dev server starts at http://localhost:8080.
Build
npm run build
The built site is output to dist/.
Test
Runs type-checking, linting, unit tests, and a production build:
npm test
Configuration
Ditto is configured through a ditto.json file at the project root, read at build time. This file is gitignored so each deployment can have its own configuration.
{
"theme": "dark",
"relayMetadata": {
"relays": [
{ "url": "wss://relay.ditto.pub", "read": true, "write": true }
]
},
"blossomServers": ["https://blossom.ditto.pub"],
"feedSettings": {
"showPosts": true,
"showReposts": true,
"showArticles": true
// ...and more content type toggles
}
}
Configuration is resolved in three layers (highest priority first):
- User settings stored in localStorage
- Build config from
ditto.json - Hardcoded defaults
Use an alternate config file path with: CONFIG_FILE=./my-config.json npm run build
Custom Branding
For self-hosted instances:
- Replace
public/logo.svgandpublic/logo.pngwith your logo - Update the app name in
index.htmlandpublic/manifest.webmanifest - Replace
public/og-image.jpgfor social sharing previews - Set default relays and upload servers in
ditto.json
Deployment
Ditto builds to static files and can be deployed anywhere that serves HTML.
- GitHub Pages / GitLab Pages -- Push to
mainand CI auto-deploys - Netlify / Vercel -- Connect your fork and deploy. A
_redirectsfile is included for SPA routing - VPS / Any web server -- Build and copy
dist/to your server. Configure SPA routing (e.g., Nginxtry_files $uri $uri/ /index.html)
Android
Build a native Android app with Capacitor:
npm run build
npx cap sync
npx cap open android
Tech Stack
| Layer | Technology |
|---|---|
| Framework | React 18 |
| Build | Vite |
| Language | TypeScript |
| Styling | TailwindCSS 3 + shadcn/ui |
| Routing | React Router 6 |
| Data | TanStack Query |
| Nostr | Nostrify + nostr-tools |
| Mobile | Capacitor |
| Testing | Vitest + React Testing Library |
Project Structure
src/
components/ UI components (100+), including shadcn/ui primitives
hooks/ Custom React hooks (65+)
pages/ Page components for each route (30+)
contexts/ React context providers
lib/ Utilities and shared logic
test/ Test setup and helpers
public/ Static assets, icons, manifest
Contributing
We welcome contributions but have high standards. Please read the full Contributing Guide before submitting a merge request. The short version:
- Bug fixes: One bug, one MR. Keep it small and focused.
- New features: Must link to an existing issue and align with the Ditto Philosophy.
- Required: Live preview URL, before/after screenshots, completed self-review checklist.
- Required tools: Claude Opus 4.6 (or latest frontier model), an AI coding agent with plan mode.
Read the Ditto Philosophy to understand what Ditto is and isn't.