https://github.com/eternityx/rustybin
A simple, fast, and secure paste bin service for your code.
https://github.com/eternityx/rustybin
paste pastebin rust rust-lang
Last synced: 2 months ago
JSON representation
A simple, fast, and secure paste bin service for your code.
- Host: GitHub
- URL: https://github.com/eternityx/rustybin
- Owner: EternityX
- License: mit
- Created: 2025-03-18T08:28:37.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-04-01T02:23:21.000Z (3 months ago)
- Last Synced: 2025-04-01T03:24:38.484Z (3 months ago)
- Topics: paste, pastebin, rust, rust-lang
- Language: TypeScript
- Homepage: https://rustybin.net/
- Size: 218 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
[RustyBin](https://rustybin.net)
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.
## Features
- **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## Getting Started
### Prerequisites
- Rust (latest stable)
- Node.js (v18+)
- pnpm### Backend Setup
1. Clone the repository:
```bash
git clone https://github.com/EternityX/rustybin.git
cd rustybin
```2. Set up environment variables:
```bash
cp .env.example .env
# Edit .env with your configuration
```3. Build and run the Rust backend:
```bash
cargo run
```The backend server will start on http://localhost:3000 (or the port specified in your .env file).
### Frontend Setup
1. Navigate to the frontend directory:
```bash
cd site
```2. Install dependencies:
```bash
pnpm install
```3. Start the development server:
```bash
pnpm dev
```The frontend development server will start on http://localhost:5173.
## API Endpoints
- `POST /api/pastes` - Create a new paste
- `GET /api/pastes/:id` - Get a specific paste
- `DELETE /api/pastes/:id` - Delete a paste## Deployment
### Backend
Build the Rust application for production:
```bash
cargo build --release
```### Frontend
Build the React application for production:
```bash
cd site
pnpm build
```The built files will be in the `site/dist` directory, which can be served by the Rust backend.
## CloudFlare
Please see the `site/DEPLOYMENT.md` to deploy on CloudFlare pages.
## License
This project is licensed under the MIT License - see the LICENSE file for details.