Git Product home page Git Product logo

yabin's Introduction

YABin: Yet Another Pastebin

GitHub Sponsor GitHub License Stars Demo Website

ko-fi

Demo

Demo Video

Why (yet) another pastebin?

Well, cause no pastebin I could find had ALL of the following features:

  • Modern and minimal UI (This site's design was inspired by bin).
  • Optional end-to-end encryption (we're using AES-256-GCM) with optional password protection (using PBKDF2).
  • Syntax highlighting (using Prism) that supports 297 languages.
  • API support to create and get pastes from command line.
  • View raw pastes. Normally, encrypted pastebins do not have this. With this site, you can either get the Base64-encoded encrypted paste, or decrypt it on the server side (even with the password) and get the raw paste.
  • Keyboard shortcuts!
  • And of course, being fully open-source and easily self-hostable.
  • Comes with a CLI tool to create and read pastes from the command line!
  • It can even be run on edge servers and in serverless environments!

API Documentation

See API.md.

CLI Usage

Installation and Usage

pip install yabin
yabin create
yabin read "<URL>"

See cli/README.md for detailed instructions and library usage.

How to Host

Requirements: Node.js (tested on 18+, should work with 14+), and a SQL database (tested on PostgreSQL, should work with MySQL and SQLite).

Right now, it is using PostgreSQL (cause I had a server lying around). However, it can be run using any SQL DB such as SQLite or MySQL. To use other backends, please update the provider in schema.prisma

Locally

yarn install
cp .env.example .env
# Modify .env to add the database URL and other parameters
yarn dev

Using Docker

docker run --env-file .env -it -p 3000:3000 yureien/yabin:latest

In a Serverless Environment (Cloudflare Workers, Netlify, Vercel, etc.)

I have not yet tested this, but this is made with SvelteKit. Please take a look at the SvelteKit documentation for more information. If there are any issues, please open an issue, and I will put up a proper guide on how to deploy on such environmments.

Public Instances

If you host one and want to make it public, just open an issue and I will add it here!

  1. bin.sohamsen.me Website Status

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.