|
1 |
| -# ghostpaste |
| 1 | +# 👻 GhostPaste |
| 2 | + |
| 3 | +> Zero-knowledge encrypted code sharing platform where your secrets stay secret |
| 4 | +
|
| 5 | +[](https://opensource.org/licenses/MIT) |
| 6 | + |
| 7 | +## 🔐 What is GhostPaste? |
| 8 | + |
| 9 | +GhostPaste is a privacy-focused code sharing platform that ensures your code snippets remain completely private through client-side encryption. Unlike traditional code sharing services, our servers never have access to your plaintext content - everything is encrypted in your browser before being uploaded. |
| 10 | + |
| 11 | +### ✨ Key Features |
| 12 | + |
| 13 | +- **🔒 Zero-Knowledge Encryption** - Your code is encrypted locally using AES-GCM before leaving your browser |
| 14 | +- **👤 No Account Required** - Share code instantly without signing up |
| 15 | +- **✏️ PIN-Protected Editing** - Set a PIN to allow editing your snippets later |
| 16 | +- **⏱️ Self-Expiring Content** - Set snippets to auto-delete after a specified time |
| 17 | +- **👁️ One-Time View** - Create snippets that disappear after being viewed once |
| 18 | +- **📝 Version History** - Track changes with automatic versioning |
| 19 | +- **🎨 Syntax Highlighting** - Beautiful code display with CodeMirror 6 |
| 20 | +- **🌓 Dark/Light Mode** - Easy on the eyes, day or night |
| 21 | + |
| 22 | +## 🚀 Quick Start |
| 23 | + |
| 24 | +### Sharing Code |
| 25 | + |
| 26 | +1. Visit [ghostpaste.dev](https://ghostpaste.dev) |
| 27 | +2. Paste or write your code |
| 28 | +3. Add multiple files if needed |
| 29 | +4. Set optional expiration or PIN |
| 30 | +5. Click "Create" and share the generated link |
| 31 | + |
| 32 | +### Viewing Shared Code |
| 33 | + |
| 34 | +Simply open the shared link - the decryption key is in the URL fragment and never sent to our servers. |
| 35 | + |
| 36 | +## 🛡️ Security & Privacy |
| 37 | + |
| 38 | +- **Client-Side Encryption**: All encryption/decryption happens in your browser using the Web Crypto API |
| 39 | +- **Zero-Knowledge**: Servers only store encrypted blobs - we can't read your content even if we wanted to |
| 40 | +- **No Tracking**: No analytics, no cookies, no user tracking |
| 41 | +- **Open Source**: Verify our security claims by reviewing the code |
| 42 | + |
| 43 | +## 🛠️ Technical Stack |
| 44 | + |
| 45 | +- **Frontend**: Next.js 14+ with React |
| 46 | +- **UI Components**: shadcn/ui |
| 47 | +- **Code Editor**: CodeMirror 6 |
| 48 | +- **Encryption**: Web Crypto API (AES-GCM) |
| 49 | +- **Storage**: Cloudflare R2 |
| 50 | +- **Deployment**: Cloudflare Workers |
| 51 | + |
| 52 | +## 📊 Limits |
| 53 | + |
| 54 | +| Resource | Limit | Why? | |
| 55 | +|----------|-------|------| |
| 56 | +| File size | 500 KB | Covers 99% of code files | |
| 57 | +| Total size | 5 MB | Enough for ~10-20 typical files | |
| 58 | +| Files per paste | 20 | Keeps the UI responsive | |
| 59 | +| Versions kept | 50 | Balances history with storage | |
| 60 | + |
| 61 | +## 🔧 Development |
| 62 | + |
| 63 | +### Prerequisites |
| 64 | + |
| 65 | +- Node.js 18+ |
| 66 | +- npm or yarn |
| 67 | +- Cloudflare account (for R2 storage) |
| 68 | + |
| 69 | +### Setup |
| 70 | + |
| 71 | +```bash |
| 72 | +# Clone the repository |
| 73 | +git clone https://github.com/nullcoder/ghostpaste.git |
| 74 | +cd ghostpaste |
| 75 | + |
| 76 | +# Install dependencies |
| 77 | +npm install |
| 78 | + |
| 79 | +# Copy environment variables |
| 80 | +cp .env.example .env.local |
| 81 | + |
| 82 | +# Configure your Cloudflare R2 credentials in .env.local |
| 83 | + |
| 84 | +# Run development server |
| 85 | +npm run dev |
| 86 | +``` |
| 87 | + |
| 88 | +### Environment Variables |
| 89 | + |
| 90 | +```env |
| 91 | +CLOUDFLARE_ACCOUNT_ID=your_account_id |
| 92 | +CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key |
| 93 | +CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_key |
| 94 | +CLOUDFLARE_R2_BUCKET_NAME=ghostpaste-bucket |
| 95 | +NEXT_PUBLIC_APP_URL=http://localhost:3000 |
| 96 | +``` |
| 97 | + |
| 98 | +## 📖 Documentation |
| 99 | + |
| 100 | +- [Technical Specification](docs/SPEC.md) - Detailed architecture and implementation details |
| 101 | +- [AI Development Guide](CLAUDE.md) - Guidelines for AI-assisted development |
| 102 | + |
| 103 | +## 🤝 Contributing |
| 104 | + |
| 105 | +We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) (coming soon). |
| 106 | + |
| 107 | +1. Fork the repository |
| 108 | +2. Create a feature branch (`git checkout -b feature/amazing-feature`) |
| 109 | +3. Commit your changes (`git commit -m 'feat: add amazing feature'`) |
| 110 | +4. Push to the branch (`git push origin feature/amazing-feature`) |
| 111 | +5. Open a Pull Request |
| 112 | + |
| 113 | +## 📄 License |
| 114 | + |
| 115 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 116 | + |
| 117 | +## 🙏 Acknowledgments |
| 118 | + |
| 119 | +- Built with [Next.js](https://nextjs.org/) |
| 120 | +- UI components from [shadcn/ui](https://ui.shadcn.com/) |
| 121 | +- Code editing powered by [CodeMirror](https://codemirror.net/) |
| 122 | +- Hosted on [Cloudflare](https://www.cloudflare.com/) |
| 123 | + |
| 124 | +--- |
| 125 | + |
| 126 | +<p align="center"> |
| 127 | + Made with ❤️ by <a href="https://github.com/nullcoder">Thanan Traiongthawon</a> |
| 128 | +</p> |
| 129 | + |
| 130 | +<p align="center"> |
| 131 | + <a href="https://ghostpaste.dev">Visit GhostPaste</a> • |
| 132 | + <a href="https://github.com/nullcoder/ghostpaste/issues">Report Bug</a> • |
| 133 | + <a href="https://github.com/nullcoder/ghostpaste/issues">Request Feature</a> |
| 134 | +</p> |
0 commit comments