underbbs/README.md

46 lines
1.9 KiB
Markdown
Raw Normal View History

2024-04-22 00:02:44 +00:00
# underBBS
2024-09-28 17:39:03 +00:00
underBBS is a protocol-agnostic decentralized social media client and toolkit
2024-04-22 00:02:44 +00:00
2024-07-07 17:07:18 +00:00
## design
2024-09-28 17:39:03 +00:00
`underbbs` can run in two modes depending on its executable name:
### web client
2024-07-07 17:07:18 +00:00
`underbbs` supports multiple simultaneous account logins, mediating them for each user through a gateway server that handles all protocol-specific logic via `adapter`s and streaming content to the user through a single websocket connection with a singular data interface.
each distinct `adapter` connection/configuration is represented in the frontend as a tab, and using the websocket's event-driven javascript interface with web components we can simply either store the data or tell the currently visible adapter that it might need to respond to the new data
adapters receive commands via a quartzgun web API and send data back on their shared websocket connection
2024-09-28 17:39:03 +00:00
### CLI
`underbbs-cli` pulls adapter credentials from `~/.config/underbbs/cli.conf` and accepts commands on individual adapters, printing data to standard output.
## building and running
2024-04-22 00:02:44 +00:00
2024-07-07 17:07:18 +00:00
requirements are
- go 1.22 (for the backend)
- any recent nodejs that can do `typescript` and `webpack` 5 (for the frontend)
2024-07-07 17:07:18 +00:00
from the project root:
1. `./build.sh front` (if you will use the web components)
2. `./build.sh server`
3. `./underbbs` or `./underbbs-cli ADAPTER ACTION ARGS...`
## integrating
### with the API and web components
1. fill `Settings._instance` with adapter settings; these will mostly be authentication data (`SettingsElement` illustrates this)
2. instantiate whatever components you want on your page with their `data-gateway` and `data-target` appropriately set; further docs to come on these
3. call `DatagramSocket.connect(GATEWAY)` where `GATEWAY` is the domain of the `underbbs` API. `SettingsElement`'s connect button does this for you.
### with the CLI
1. Call the CLI directly from the serverside or locally
2. Process any output to your preference