Home

Awesome

<h1 align="center">YABin: Yet Another Pastebin</h1> <p align="center"> <a href="https://github.com/sponsors/Yureien"><img src="https://img.shields.io/github/sponsors/Yureien?label=Sponsor&logo=GitHub" alt="GitHub Sponsor" /></a> <a href="https://github.com/Yureien/YABin/blob/master/LICENSE"><img src="https://img.shields.io/github/license/Yureien/YABin.svg" alt="GitHub License" /></a> <img alt="Stars" src="https://img.shields.io/github/stars/Yureien/YABin"> <a href="https://bin.sohamsen.me/"><img src="https://img.shields.io/website-up-down-green-red/https/bin.sohamsen.me.svg" alt="Demo Website" /></a> </p> <p align="center"> <a href="https://ko-fi.com/A0A21C34E"><img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="ko-fi" /></a> </p>

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 contact@sohamsen.me. 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:

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.

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