bzl

self-hosted ephemeral community engine
Log | Files | Refs | README | LICENSE

FUNCTIONALITY_REFERENCE.md (11709B)


      1 # Bzl - Functionality Reference (Video Script Aid)
      2 
      3 This document is a detailed feature rundown of the current Bzl build so you can write a video script, plan a demo, or create release notes.
      4 
      5 ## What Bzl is (one sentence)
      6 Bzl is an "ephemeral hive board": short posts ("hives") auto-expire after a TTL (or can be made permanent), and each hive has a live chat room with reactions, rich media, and moderation for small private communities.
      7 
      8 ## Core concepts / vocabulary
      9 - Hive: a post on the board. Has a title, body (first message), keywords, and optional media.
     10 - Chat: each hive has its own live chat room.
     11 - TTL: "time to live". Hives expire after a duration unless permanent.
     12 - Collections: curated categories (tabs) that hives belong to.
     13 - Roles:
     14   - Base roles: `member`, `moderator`, `owner`
     15   - Custom roles: owner/mod-created labels (optionally used to gate collections)
     16 
     17 ## UI tour (desktop)
     18 - Left sidebar: connection status, account/login, profile editor (your picture/color/bio), and owner instance settings (title/subtitle/policy).
     19 - Center panel: either the hive board (browse + create) or a user profile view (when you click a username).
     20 - Chat panel: the selected hive's chat room (or a DM thread).
     21 - Right panel: People (members + DMs) and Moderation (mods/owner only).
     22 
     23 ## "30 second pitch" (talking points)
     24 - Explore-first UX: browse hives, filter/sort, then create.
     25 - Ephemeral by default: hives naturally fade away unless made permanent by policy.
     26 - Activity-driven board: chat activity + boosts keep active conversations visible.
     27 - Community-first features: reactions, mentions, profiles, DMs, and moderation.
     28 - Self-hostable: designed for smaller private communities and personal instances.
     29 
     30 ## Demo path (recommended video flow)
     31 1. Show the hive board: explain that each card is a hive with its own chat.
     32 2. Open a hive chat: show reactions, replies, edits/deletes, rich media.
     33 3. Create a hive: title + body, collection, keywords, TTL; optionally protected/walkie.
     34 4. Filters + sorting: keyword filter, author filter, sort modes, collection tabs.
     35 5. People -> Profiles: click a user, show bio + pronouns + theme song + links.
     36 6. DMs: request/accept flow, thread list, chat.
     37 7. Moderation: reports, user actions, hive actions, moderation log, NUKE (owner only).
     38 
     39 ---
     40 
     41 ## Accounts & identity
     42 - Users sign in with a username + password.
     43 - First user created becomes the `owner` (single-owner MVP model).
     44 - Owner can promote/demote members to `moderator`.
     45 
     46 ### Persistent logins (sessions)
     47 - Sessions persist so users do not have to re-login on every disconnect/reload.
     48 
     49 ## Instance branding (owner)
     50 Owner can configure instance settings shown in the UI:
     51 - Title + subtitle (top-left branding)
     52 - "Allow members to make permanent hives" policy
     53 - Theme/appearance (Moderation → Server):
     54   - Theme preset + colors (background/panel text/accent)
     55   - Muted %, divider %, and panel tint %
     56   - Body font + mono font
     57 
     58 ## Hive creation ("Pollinate")
     59 When creating a hive, users can set:
     60 - Title (kept short for card display)
     61 - Body (rich text; becomes the first message in the hive chat)
     62 - Collection (required; must pick one of the curated collections)
     63 - Keywords (comma-separated, up to 6)
     64 - TTL (minutes):
     65   - 1 minute to 2 days (max 2880 minutes)
     66   - 0 means permanent (availability controlled by instance policy; see below)
     67 - Optional toggles:
     68   - Password protected (requires a password)
     69   - Walkie Talkie mode (audio-only "hold to talk" hive)
     70 
     71 ### Permanent hives (instance policy)
     72 Permanent hives are controlled by an owner setting:
     73 - Allow members to make permanent hives: if enabled, members may set TTL to 0.
     74 - Moderators/owner can always make hives permanent (or change TTL) via moderation tools.
     75 
     76 ## Hive board behavior (how posts rise/fall)
     77 - The board ordering favors recent activity (chat bumps the hive).
     78 - Users can boost a hive to keep it visible (bounded duration).
     79 - Sort modes include:
     80   - Most recent activity
     81   - Most popular (reactions)
     82   - About to expire (permanent hives sort last)
     83 
     84 ## Browsing tools (filters)
     85 - Collection tabs: switch between curated collections (plus personal Starred/Hidden views).
     86 - Filter by author: narrow the board to hives by a specific user.
     87 - Filter by keywords: comma-separated keyword search.
     88 - Sort dropdown + Clear: change ordering and reset filters quickly.
     89 - Hide Creator (UI option): makes the hive board feel more content-first while still showing authors inside chat.
     90 
     91 ## Collections (curated tabs)
     92 - Hives belong to a collection.
     93 - Collections appear as tabs on the hive board.
     94 - Moderators/owner can create and archive collections, and optionally gate collections.
     95 
     96 ### Collection gating (roles)
     97 - A collection can be public or gated.
     98 - Gated collections are visible only to users matching allowed tokens:
     99   - Base: `member`, `moderator`, `owner`
    100   - Custom: `role:<key>`
    101 
    102 ## Reactions
    103 ### Hive reactions
    104 - Hive cards support emoji reactions including Star.
    105 - Starred view: starring a hive stores it in your personal Starred list.
    106 - Hidden view: users can hide hives for themselves without affecting others.
    107 
    108 ### Chat reactions
    109 - Chat messages support a curated set of emoji reactions.
    110 - Reactions are shown inline with other message actions.
    111 
    112 ## Mentions (@username)
    113 - Typing `@` triggers mention autocomplete.
    114 - Mentions are highlighted in chat and can be clicked to open profiles.
    115 - If you are mentioned, Bzl can notify you (and optionally play a ping sound).
    116 
    117 ## Chat (in-hive)
    118 Chat supports:
    119 - Rich text + media (GIF/image/audio)
    120 - Replies (with a quoted reference block)
    121 - Emoji reactions
    122 - Reports (members can report a message)
    123 
    124 ### Edit/Delete chat messages (self-service)
    125 Users can:
    126 - Edit their own messages
    127   - Chat shows edited count + edited time
    128   - Edits are recorded for moderation visibility
    129 - Delete their own messages
    130   - Leaves a "message deleted" placeholder line
    131   - Deletion is recorded for moderation visibility
    132 
    133 ### Edit/Delete hives (self-service)
    134 Hive authors can:
    135 - Edit their hive:
    136   - Title + body
    137   - Keywords
    138   - Collection (must still be allowed by gating rules)
    139   - Protection/password (lock, unlock, or set/change password)
    140 - Delete their hive:
    141   - Soft-delete by the author (visible as deleted and logged)
    142 
    143 ## Password-protected hives
    144 - Authors (and moderators) can mark a hive as protected with a password.
    145 - Users must unlock to view/chat.
    146 - Moderators/owner can bypass protection for moderation purposes.
    147 
    148 ## Read-only hives (moderation)
    149 Moderators/owner can toggle a hive:
    150 - Read-only: members cannot send new messages; moderators/owner still can.
    151 
    152 ## Walkie Talkie hives (audio-only)
    153 - A hive can be created in Walkie Talkie mode:
    154   - No text chat (audio clips only)
    155   - Users press-and-hold the "Hold to talk" button (or `~`) to record
    156   - Audio is processed to sound radio-like and sent as an audio message
    157 
    158 ## People panel
    159 The People panel includes:
    160 - Members tab: shows users (online/offline) and their base role badge.
    161 - DMs tab: shows DM threads and incoming requests (accept/decline).
    162 
    163 ### Profiles (click-to-view)
    164 Clicking a username opens a profile view in the center panel:
    165 - Profile picture
    166 - Display color
    167 - Pronouns
    168 - Bio (rich text; supports media/emoji and YouTube embeds)
    169 - Theme song (audio)
    170 - Social/self-promo links (with safe URL validation)
    171 
    172 ### Profile editor (profile owner only)
    173 Users can edit their own:
    174 - Profile picture + color
    175 - Pronouns
    176 - Bio (rich text)
    177 - Theme song
    178 - Links list
    179 
    180 ## YouTube embeds (allowed platform)
    181 For safety and consistency, Bzl currently supports YouTube embedding:
    182 - Links in rich text can be auto-decorated into a YouTube-nocookie iframe embed.
    183 
    184 ## DMs (Direct Messages)
    185 DMs are:
    186 - 1:1 private chat threads with a request/accept flow
    187 - Stored server-side and encrypted at rest in the DM data file
    188 - Purged on a rolling 24-hour window by default (space-saving policy; configurable via `DM_RETENTION_MS`)
    189 
    190 Flow:
    191 1. You send a DM request to a member.
    192 2. They see an incoming request in DMs and can accept/decline.
    193 3. Once accepted, the DM becomes an active private chat thread.
    194 
    195 Blocking rules:
    196 - If either side blocks the other, DM requests and sending are denied.
    197 
    198 ## Ignore / Block
    199 From a profile, you can:
    200 - Ignore a user: hides their content for you (feed + chat) and suppresses pings/toasts.
    201 - Block a user: implies ignore + prevents DMs between you and that user.
    202 
    203 Restrictions:
    204 - You cannot block/ignore moderators or the owner.
    205 
    206 ## Reports (member workflow)
    207 Members can report:
    208 - A hive (post)
    209 - A chat message
    210 
    211 Reports appear in the Moderation panel for moderators/owner to review.
    212 
    213 ## Moderation panel (mods/owner only)
    214 Moderation is a dedicated panel (and its own page on mobile).
    215 
    216 ### Reports tab
    217 - Review open/resolved/dismissed reports
    218 - Resolve/dismiss with a reason (and optionally apply related actions)
    219 
    220 ### Users tab
    221 Moderators can:
    222 - Mute / unmute (time-based)
    223 - Suspend / unsuspend (time-based)
    224 - Ban / unban
    225 
    226 Owner can:
    227 - Promote/demote moderators
    228 - Create/archive custom roles (key + label + color)
    229 - Assign/remove custom roles to/from users (for flair and/or gating)
    230 
    231 Password reset (with moderator help):
    232 - Moderators/owner can reset a user's password (sessions are revoked).
    233 - The new password is not stored in moderation log metadata.
    234 
    235 ### Hives tab
    236 Moderators can:
    237 - Open chat
    238 - Purge recent messages
    239 - Delete (soft delete; can be restored)
    240 - Restore (if a restore snapshot exists)
    241 - Erase (hard delete; data is removed; uploads are removed when safe)
    242 - Set TTL:
    243   - Permanent
    244   - Presets (for quick actions)
    245   - Custom minutes
    246 - Toggle read-only
    247 - Manage protection:
    248   - Protect with password
    249   - Unprotect
    250   - Change password
    251 
    252 ### Log tab (append-only moderation log)
    253 All moderation actions write to an append-only log including:
    254 - Action type
    255 - Actor
    256 - Target type/id
    257 - Reason
    258 - Timestamp
    259 - Context metadata (when applicable)
    260 
    261 The Log page also includes a **Server dev log** view (for debugging):
    262 - Shows recent server/client dev log lines (in-memory; clears on server restart)
    263 - Useful for plugin debugging and UI event tracing
    264 
    265 ### Owner-only: NUKE
    266 Owner can NUKE the board (with an explicit confirm toggle) to:
    267 - Clear all hives, reports, moderation log, and hive media uploads
    268 - Keep users, profiles, and instance settings
    269 
    270 ## Media uploads & storage
    271 Media is stored as files (not data URLs):
    272 - Uploads go to `data/uploads/`
    273 - Posts/messages store short local URLs like `/uploads/<file>`
    274 
    275 Supported:
    276 - Images / GIFs
    277 - Audio (including walkie clips)
    278 
    279 ## Persistence
    280 Bzl persists runtime state locally:
    281 - Users + profile fields
    282 - Posts + chat + reactions
    283 - Reports
    284 - Moderation log
    285 - Sessions (persistent logins)
    286 - Collections + custom roles
    287 - Uploads
    288 - Instance settings
    289 
    290 ## Security & privacy notes (honest framing)
    291 Bzl is designed for small communities, not high-trust adversarial environments.
    292 
    293 Implemented:
    294 - Server-side role enforcement (client role claims are not trusted)
    295 - Moderation audit log
    296 - DMs encrypted at rest (still processed by the server to deliver messages)
    297 - Rate limits for common abuse vectors (login/register/posts/reports/mod actions/uploads)
    298 - Sensitive UI (like the LAN IP display) can be hidden for non-moderators
    299 
    300 ## Mobile UX
    301 - Swipe-based paging across panels.
    302 - People and Moderation behave as dedicated pages on mobile.
    303 
    304 ## UX polish highlights (quick callouts)
    305 - Subtle animation for new hives/messages
    306 - Compact filters and denser layouts
    307 - Resizable chat panel on desktop (drag the divider)
    308 - Inline reactions/actions row in chat bubbles
    309 
    310 ## Known limitations / future expansions (optional to mention)
    311 - Appeals workflow (future)
    312 - Automated moderation (future)
    313 - Federation/multi-server moderation (future)
    314 - Installer wizard / one-click hosting (in progress)