Skip to content

A simple, fast, and secure paste bin service for your code.

License

Notifications You must be signed in to change notification settings

EternityX/rustybin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

    git clone https://github.com/EternityX/rustybin.git
    cd rustybin
  2. Set up environment variables:

    cp .env.example .env
    # Edit .env with your configuration
  3. 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).

Frontend Setup

  1. Navigate to the frontend directory:

    cd site
  2. Install dependencies:

    pnpm install
  3. Start the development server:

    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:

cargo build --release

Frontend

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.

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.

About

A simple, fast, and secure paste bin service for your code.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published