Skip to content

Repository files navigation

⚡ Snips (snips.emre.xyz)

CI License: MIT NIP-C0 Compliant TypeScript React 19

An open-source, decentralized code snippet sharing platform built on Nostr (NIP-C0: kind:1337), powered by Cloudflare Workers, Hono, React 19, and Tailwind CSS.

🌐 Live Website: https://snips.emre.xyz


🚀 Features

  • ⚡ Decentralized & Censorship-Resistant: Every code snippet is cryptographically signed and published to Nostr relays (kind:1337).
  • 🔑 Multi-Signer Support: Seamless login via browser extensions (NIP-07) and remote signers / Nostr Connect (NIP-46).
  • 🎨 Minimal & Modern UI: High-contrast syntax highlighting, default light theme with instant dark theme toggle.
  • 🌐 Edge-Native: Instant global delivery and API routing via Cloudflare Workers & Hono.
  • 🏷️ NIP-C0 Compliant: Full support for standard tags: l (language), name (filename), extension, description, runtime, license, dep, repo, and t (topics).
  • 🔍 Auto-Detection Engine: Automatic programming language and file type detection from code syntax, shebangs, JSON structure, and extensions (including Jupyter Notebooks).
  • 🖼️ Social Sharing: Dynamic server-generated OpenGraph / Twitter Card preview cards (/og/:id.svg).

🛠️ Tech Stack

  • Runtime & Deployment: Cloudflare Workers / Assets
  • Backend Framework: Hono
  • Frontend Framework: React 19 + TypeScript
  • Styling: Tailwind CSS v4
  • Nostr SDK: nostr-tools
  • Build Tool: Vite

💻 Getting Started

Prerequisites

  • Node.js v22+ (managed via .nvmrc)
  • npm

Installation & Development

# 1. Load Node version and install dependencies
make install

# 2. Start local development server
make dev

# 3. Type check, test & build
make typecheck
make test
make build

🏗️ Project Structure

snips/
├── .github/                    # CI workflows, PR & issue templates
├── .nvmrc                      # Node.js target version (v22)
├── AGENTS.md                   # Agent & Contributor instructions
├── CONTRIBUTING.md             # Contributor guide & development workflow
├── CODE_OF_CONDUCT.md          # Contributor Covenant v2.1
├── SECURITY.md                 # Vulnerability disclosure policy
├── ROADMAP.md                  # Project milestones and feature roadmap
├── scripts/                    # Automated verification test suites (Phases 1-6)
└── src/
    ├── server/                 # Hono server running on Cloudflare Workers
    └── client/                 # React 19 Single Page Application

📜 Protocol Reference: NIP-C0 (kind:1337)

{
  "kind": 1337,
  "content": "console.log('Hello, Nostr!');",
  "tags": [
    ["l", "javascript"],
    ["name", "hello.js"],
    ["extension", "js"],
    ["description", "A simple hello world script"],
    ["license", "MIT"],
    ["t", "javascript"],
    ["t", "starter"]
  ]
}

🤝 Contributing

Contributions are welcome! Please check out CONTRIBUTING.md to get started and read our Code of Conduct.


📄 License

MIT License © 2026 Emre Yılmaz.

About

An open-source, decentralized code snippet sharing platform built on Nostr (NIP-C0: kind:1337), powered by Cloudflare Workers, Hono, React 19, and Tailwind CSS.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages