A modern, secure pastebin service built with Rust and React. RustyBin allows you to create, view, and share text snippets with optional syntax highlighting and encryption.
- Secure Text Sharing: Create and share encrypted text snippets
- Syntax Highlighting: Support for multiple programming languages using Prism
- Modern UI: Built with React and TypeScript
- RESTful API: API for creating, retrieving, and deleting pastes
- SQLite Database: Lightweight, file-based database for storing pastes
- End-to-End Encryption: Client-side encryption for sensitive data, server has no knowledge of the paste contents
- Rust (latest stable)
- Node.js (v18+)
- pnpm
-
Clone the repository:
git clone https://github.com/EternityX/rustybin.git cd rustybin
-
Set up environment variables:
cp .env.example .env # Edit .env with your configuration
-
Build and run the Rust backend:
cargo run
The backend server will start on http://localhost:3000 (or the port specified in your .env file).
-
Navigate to the frontend directory:
cd site
-
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
The frontend development server will start on http://localhost:5173.
POST /api/pastes
- Create a new pasteGET /api/pastes/:id
- Get a specific pasteDELETE /api/pastes/:id
- Delete a paste
Build the Rust application for production:
cargo build --release
Build the React application for production:
cd site
pnpm build
The built files will be in the site/dist
directory, which can be served by the Rust backend.
Please see the site/DEPLOYMENT.md
to deploy on CloudFlare pages.
This project is licensed under the MIT License - see the LICENSE file for details.