ProductPromotion
Logo

Open.Source

made by https://0x3d.site

GitHub - Yureien/YABin: Yet another pastebin, simple but feature-rich, along with a CLI client
Yet another pastebin, simple but feature-rich, along with a CLI client - Yureien/YABin
Visit Site

GitHub - Yureien/YABin: Yet another pastebin, simple but feature-rich, along with a CLI client

GitHub - Yureien/YABin: Yet another pastebin, simple but feature-rich, along with a CLI client

IMPORTANT: I recently graduated and I'm trying to balance work and life, and find time to contribute to open source software. If you have any issues, please do shoot out an email to [email protected]. GitHub notifications at times get buried down under tons of spam.

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.
  • Ability to edit pastes after creation, and a dashboard for viewing all your pastes.
  • NEW Feature to use custom path names.
  • Comes with a CLI tool to create and read pastes from the command line!

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, my instance is using PostgreSQL on Vercel.

.env Configuration

By default, it is configured to use PostgreSQL. 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.

  • DB_NAME is the database name;
  • DB_HOST database host (defaults to 'db', but can be changed to aything like localhost)
  • DB_USER database user
  • DB_PORT database port 5432
  • DB_PASSWORD the database user password
  • DATABASE_URL you don't need to modify this variable (thanks to dotenv-expand). keep it though!

Remember to modify SALT to something secure if you plan on using user accounts.

You can disable or enable public registration by modifying the PUBLIC_REGISTRATION_ENABLED variable to true or false.

You can enable custom paste paths for everyone with the variable PUBLIC_CUSTOM_PATHS_ENABLED. If it is false, only users who are logged in can use custom paths.

You can disable anonymous pastes by setting PUBLIC_ANONYMOUS_PASTES_ENABLED to false.

By default, if no e-mail services are configured, all user accounts will be marked as validated. To enable e-mail validation, please configure the MAIL_* variables.

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
# Or with Docker Compose
# Remember to change the DB password!
docker compose up

Fun fact: At a point of time, my instance used to be hosted in a Kubernetes cluster

Other Serverless Environments (Cloudflare Workers, Netlify 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.

My instance uses Vercel. Checkout the vercel branch for the Vercel configuration.

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

Articles
to learn more about the open-source concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Open-Source.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory