https://github.com/donuts-are-good/shhhbb
bbs based on SSH
https://github.com/donuts-are-good/shhhbb
bbs bulletin-board-system golang hacktoberfest pubnix ssh tilde tildeverse
Last synced: 16 days ago
JSON representation
bbs based on SSH
- Host: GitHub
- URL: https://github.com/donuts-are-good/shhhbb
- Owner: donuts-are-good
- License: mit
- Created: 2023-03-17T05:00:27.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-18T16:04:13.000Z (2 months ago)
- Last Synced: 2025-04-06T21:14:59.734Z (18 days ago)
- Topics: bbs, bulletin-board-system, golang, hacktoberfest, pubnix, ssh, tilde, tildeverse
- Language: Go
- Homepage: https://donuts-are-good.github.io/shhhbb/
- Size: 91.8 KB
- Stars: 159
- Watchers: 3
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-github-repos - donuts-are-good/shhhbb - bbs based on SSH (Go)
- starred - donuts-are-good/shhhbb - bbs based on SSH (Go)
README
  
# shhhbb
ssh based BBS & chat over SSH

**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