Coder Social home page Coder Social logo

donuts-are-good / shhhbb Goto Github PK

View Code? Open in Web Editor NEW
151.0 3.0 3.0 80 KB

bbs based on SSH

Home Page: https://donuts-are-good.github.io/shhhbb/

License: MIT License

Go 98.49% Dockerfile 1.04% Shell 0.47%
bbs golang ssh bulletin-board-system pubnix tilde tildeverse hacktoberfest

shhhbb's Introduction

image

donuts-are-good's followers donuts-are-good's stars donuts-are-good's visitors

shhhbb

ssh based BBS & chat over SSH

demo video link

instructions:

  1. create a directory called ./keys
  2. generate an ed25519 keypair in there without password ssh-keygen -t ed25519 -C "my cool keypair" -f ./keys/ssh_host_ed25519_key
  3. launch with ./shhhbb 2223 where 2223 is the port

api

the api is designed to allow users to create and retrieve chat messages and posts. it is secured with token-based authentication using bearer tokens.

base url

http://localhost:8080

authentication

all endpoints require authentication with a bearer token. to obtain a bearer token, the user must first log in and then authenticate themselves with their token in subsequent requests.

/token new
/token list
/token revoke

endpoints

get /chat/messages retrieve the last 100 chat messages.

  • parameters: none
  • authentication: bearer token required
  • response: a json object with a boolean success field and an array data field containing objects with the following properties:
    • sender: the hash of the message sender
    • message: the message body
    • timestamp: the time the message was sent in iso 8601 format

post /chat/create create a new chat message.

  • parameters:
    • sender_hash: the hash of the message sender
    • message: the message body
  • authentication: bearer token required
  • response: a json object with a boolean success field

post /chat/direct/create create a new direct message.

  • parameters:
    • sender: the hash of the message sender
    • recipient: the hash of the message recipient
    • message: the message body
  • authentication: bearer token required
  • response: a json object with a boolean success field

get /posts/list retrieve a list of posts.

  • parameters: none
  • authentication: bearer token required
  • response: a json object with a boolean success field and an array data field containing objects with the following properties:
    • post_id: the id of the post
    • author_hash: the hash of the post author
    • post_body: the post body
    • timestamp: the time the post was created in iso 8601 format

post /posts/create create a new post.

  • parameters:
    • author_hash: the hash of the post author
    • post_body: the post body
  • authentication: bearer token required
  • response: a json object with a boolean success field

get /posts/replies retrieve a list of replies to a post.

  • parameters:
    • post_id: the id of the post to retrieve replies for
  • authentication: bearer token required
  • response: a json object with a boolean success field and an array data field containing objects with the following properties:
    • reply_id: the id of the reply
    • post_id: the id of the post being replied to
    • author_hash: the hash of the reply author
    • reply_body: the reply body
    • timestamp: the time the reply was created in iso 8601 format

post /posts/reply create a new reply to a post.

  • parameters:
    • post_id: the id of the post being replied to
    • author_hash: the hash of the reply author
    • reply_body: the reply body
  • authentication: bearer token required
  • response: a json object with a boolean success field

shhhbb's People

Contributors

abbbi avatar donuts-are-good avatar virogenesis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

shhhbb's Issues

ideas: dev notes for features

some chat history mentioning various todo's

[@5Lal1Ngl]: I should come up with some type of multipane UI
[@SFh90dWP]: pubkey
[@5Lal1Ngl]: bubbletea looks fun https://github.com/charmbracelet/bubbletea
[@5Lal1Ngl]: try /pubkey
[@HHGo2s51]: bumholes
[@LMcXVU6x]: Was going to recommend that exact project. 
[@5Lal1Ngl]: Here's my question, is it more geared toward a client application, or is it a UI I can extend over the SSH connection?
[@HHGo2s51]: you can basically redirect any stdout over ssh
[@5Lal1Ngl]: They also have a library for designing SSH apps, which I think is what runs their hostable git server they made for the TUI
[@5Lal1Ngl]: I'll add it to the list
[@5Lal1Ngl]: You write any Go?
[@5Lal1Ngl]: ngl thats a nice username hash with Go right in the middle of it :D
[@5Lal1Ngl]: I should have done a vanity generator, what was I thinking hahaha
[@LMcXVU6x]: Just gonna have to limit the usernames
[@xpleIGhe]: bazooper
[@LMcXVU6x]: and soon maybe you'll need a /kick 
[@5Lal1Ngl]: There's an admin endpoint that's half built
[@5Lal1Ngl]: I was trying to come up with an idea that would be able to be handled by the community
[@5Lal1Ngl]: like 3 votes from different users and they get a 5 minute kick
[@ZHN7OXwP]: hhello
[@ZHN7OXwP]: hello
[@m7rqsm4p]: hello
[@5Lal1Ngl]: hello there my friend
[@m7rqsm4p]: anyone?
[@5Lal1Ngl]: we are all here :)
[@5Lal1Ngl]: we've been waiting for you
[@LMcXVU6x]: Ya'll have a good night, gotta go
[@EAt3L9UZ]: /quit
[@EAt3L9UZ]: /exit
[@5Lal1Ngl]: I know I need to do a /chat, I need to do /nick, and finish /ignore
[@5Lal1Ngl]: also need to rule out blank input
[@5Lal1Ngl]: i was thinking either /chat to print the last 100 lines all neat and tidy like when you login
[@5Lal1Ngl]: or /chat on /chat off and then spit out the last 100 lines when you /chat on
[@9DJ5TLro]: /hep
[@5Lal1Ngl]: /wax on /wax off
[@9DJ5TLro]: /wax on
[@9DJ5TLro]: quit
[@9DJ5TLro]: exit
[@9DJ5TLro]: /exit
[@9DJ5TLro]: /quit
[@5Lal1Ngl]: also need to filter out /this when it is the first word whther it matches a command or not
[@5Lal1Ngl]: try ctrl_C
[@5Lal1Ngl]: ctrl_d and ctrl_c work to disconnect.
[@5Lal1Ngl]: I need to also switch MOTD to be loaded from a file instead of hardcoded


           BB           BB           BB           BB           BB           
,adPPYba,  BB,dPPYba,   BB,dPPYba,   BB,dPPYba,   BB,dPPYba,   BB,dPPYba,   
I8[    ""  BBP'    "8a  BBP'    "8a  BBP'    "8a  BBP'    "8a  BBP'    "8a  
'"Y8ba,    BB       BB  BB       BB  BB       BB  BB       d8  BB       d8  
aa    ]8I  BB       BB  BB       BB  BB       BB  BBb,   ,a8"  BBb,   ,a8"  
'"YbbdP"'  BB       BB  BB       BB  BB       BB  8Y"Ybbd8"'   8Y"Ybbd8"'   BBS
> MIT 2023, https://github.com/donuts-are-good/shhhbb v.0.1.2    

 [RULES]                         [GOALS]
  - your words are your own       - a space for hackers & devs
  - your eyes are your own        - make cool things
  - no chat logs are kept         - collaborate & share
  - have fun :)                   - evolve

Say hello and press [enter] to chat
Type /help for more commands.


Welcome :) You are @5Lal1Ngl

API

We need an API for third party clients to be able to connect. This issue should track that activity.

art: github banner needed

image for readme.md

  • something that says shhhbb
  • something cute, accessible, trendy
  • aspect ratio 2:1 w:h, minimum 1280x640 @72
  • png

image for github repo card

  • should match readme.md image
  • cute, accessible and friendly
  • template is available below:
  • png

repo card template

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.