{"id":22120352,"url":"https://github.com/maxpleaner/chatterer","last_synced_at":"2025-03-24T06:27:42.386Z","repository":{"id":84577046,"uuid":"77317379","full_name":"MaxPleaner/chatterer","owner":"MaxPleaner","description":"A base websocket server, CLI client and web wrapper. (Incomplete)","archived":false,"fork":false,"pushed_at":"2017-01-01T23:52:20.000Z","size":270,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T12:15:25.384Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaxPleaner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-25T08:28:23.000Z","updated_at":"2017-01-03T06:07:27.000Z","dependencies_parsed_at":"2023-03-12T23:42:45.303Z","dependency_job_id":null,"html_url":"https://github.com/MaxPleaner/chatterer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxPleaner%2Fchatterer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxPleaner%2Fchatterer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxPleaner%2Fchatterer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxPleaner%2Fchatterer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaxPleaner","download_url":"https://codeload.github.com/MaxPleaner/chatterer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245220428,"owners_count":20579779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T14:22:59.885Z","updated_at":"2025-03-24T06:27:42.350Z","avatar_url":"https://github.com/MaxPleaner.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"### About\n\nFrom a birds-eye view, the primary goal of this project is to build a websocket-based web application.\n\nThe secondary goal is to make a command-line client which can be reused by the browser client for primitive server-side rendering (using [w3m](http://w3m.sourceforge.net/))\n\nThe architecture is a little unconventional:\n\n```txt\n\nBase Server =\u003e CLI clients =\u003e Web clients\n\n```\n\nOnly one base server needs to be running. It can dispatch for many CLI clients.\n\nHowever, dynamic CLI-client launching is not yet implemented. So a web client is for a single user only.\n\n### Usage overview\n\n- First, clone the repo and run `bundle install`\n- Then, `cd server` and run `thin start` to run the base server\n- In a new terminal, `cd client`\n- `cp .env.example .env` and customize it\n- run the cli-client with `sh paned_repl.sh`\n- To start the web interface, run `start_server` in the repl.\n- Then visit `localhost:3000` or `ENV[CHATTERER_BASE_URL]`, if it's set.\n- Some special exit commands are provided in the repl:\n  - `stop_server` (closes the server pane)\n  - `stop_tmux` (exits the repl)\n\n### Components\n\n- \"server\" is the base websocket server.\n  - From this was extracted the generator gem [sinatra_sockets](http://github.com/maxpleaner/sinatra_sockets), which provides boilerplate for sinatra with faye-websockets (eventmachine)\n  - The server accepts two types of websocket requests, sent as JSON objects:\n    - **subscribe**:\n\n            {\n              'type': 'subscribe',\n              'channels': ['some_channel']\n            }\n    - **action**:\n\n            {\n              'type': 'action',\n              'channel': 'some_channel',\n              name: 'something',\n              data: 'hello'\n            }\n      - actions require a channel that has previously been subscribed to. Otherwise no message will be sent.\n      - The semantics of `name` and `data` are irrelevant to the base server.\n      They originate from and are interpreted by the clients\n\n- \"client\" was initially a simple IO wrapper over server. However it's been\nrevised to use [paned_repl](https://github.com/maxpleaner/paned_repl), which was written for this use-case.\n  - The `paned_repl` gem launches a [pry](http://pryrepl.org) repl in Tmux, and provides a Ruby API for the Tmux session.\n  - Each subscription is launched in a separate Tmux pane. Incoming messages are displayed there, and are also saved to file to be read by the web wrapper.\n\n- \"web wrapper\" is a script launched by the client that mirrors the cli **todo more explanation**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxpleaner%2Fchatterer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxpleaner%2Fchatterer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxpleaner%2Fchatterer/lists"}