Bundlrs is a rewrite of Bundles in Rust without some of the extra features. https://stellular.net
Go to file
hkau 4917449f99 fix(rewrite): references to "::GUPPY_ROOT::" 2024-04-14 22:08:58 -04:00
.cargo add(backend): move to dorsal for database 2024-04-08 14:00:43 -04:00
src fix(rewrite): references to "::GUPPY_ROOT::" 2024-04-14 22:08:58 -04:00
static add(rewrite): home.rs 2024-04-13 15:08:42 -04:00
templates fix(rewrite): references to "::GUPPY_ROOT::" 2024-04-14 22:08:58 -04:00
.gitignore [add] pages::atomic_editor 2024-01-24 14:51:06 -05:00
Cargo.toml add(rewrite): home.rs 2024-04-13 15:08:42 -04:00
LICENSE Initial 2024-01-12 23:20:50 -05:00
README.md [add] guppy connection 2024-03-29 23:55:15 -04:00
justfile add(backend): move to dorsal for database 2024-04-08 14:00:43 -04:00
package.json add(atomic): better files page 2024-04-10 11:37:12 -04:00
static_build.ts add(atomic): better files page 2024-04-10 11:37:12 -04:00
tsconfig.json [add] pages::atomic_editor 2024-01-24 14:51:06 -05:00

README.md

☄️ bundlrs

Bundlrs is a rewrite of Bundles in Rust without some of the extra features.

Bundlrs is a super lightweight and anonymous social markdown platform featuring pastes with custom URLs, quick and full deletion, easy editing, live preview, advanced styling, and much more!

For migration from Bundles, please see #3.

Also see Puffer and Guppy! (required)

Install

Bundlrs provides build scripts using just. It is required that bun, just, redis, and (obviously) Rust are installed before running.

Build:

# release (sqlite)
just
# release (mysql)
just build mysql
# release (postgres)
just build postgres
# documentation
just docs

Documentation is automatically built when building for release.

Run:

# test
just test
# release
just run

Bundlrs supports the features sqlite, postgres, and mysql. These features dictate which database types will be used.

Configuration

Bundlrs is configured through flags given when running the server. The following flags are available:

  • --port 0000 optional (defaults to 8080)
  • --static-dir "/path/to/dir optional (defaults to ./static)
  • --db-type "type" optional (defaults to sqlite)

Environment variables:

  • INFO optional (defaults to /pub/info)
  • BODY_EMBED optional (defaults to nothing)
  • DB_HOST "host" optional (defaults to localhost) (only if --db-type is postgres or mysql)
  • DB_USER "user" required (only if --db-type is postgres or mysql)
  • DB_PASS "pass" required (only if --db-type is postgres or mysql)
  • DB_NAME "name" required (only if --db-type is postgres or mysql)
  • SITE_NAME "name" optional (defaults to Bundlrs)
  • AUTH_REQUIRED optional (defaults to (None)), disables creating pastes without an account
  • REGISTRATION_DISABLED optional (defaults to (None))

Features

Boards

Boards are simple forum-like rooms that can be created by users. Boards can be made private by changing is_private to yes in their configuration page; however this will not stop users with the Staff role from viewing and posting on the board.

Boards can be given tags in their configuration. All tags must start with + and must be space separated.

User Accounts

Users can register for an account with just a username. They are given a unique ID which will be used as their password. This ID is stored hashed on the server and cannot be reset.

User Permissions

  • ManagePastes - Ability to manage (edit metadata, delete) any paste
  • ManageBoards - Ability to manage (edit metadata, delete, view even with is_private) any board
  • ManageBoardPosts - Ability to manage (edit tags, delete) any board post
  • EditBoardPosts - Ability to manage (edit) any board post
  • ManageUsers - Ability to manage (edit metadata, delete) any user
  • StaffDashboard - Ability to view the staff dashboard (/d/staff), as well as be unable to be viewed in the user manager

Levels should be directly managed by managing entries in the Logs table. Levels must have a logtype value of level. Their content should be in a JSON-serialized format following the structure defined here. Their elevation should be an int between -999 and 1000. An elevation of -1000 is used for anonymous users.

Here's an example content value for a basic staff role with all permissions:

{
    "elevation":5, "name":"staff", "permissions":[
        "ManagePastes",
        "ManageBoards",
        "ManageBoardPosts",
        "EditBoardPosts",
        "ManageUsers",
        "StaffDashboard"
    ]
}