• Stars
    star
    170
  • Rank 223,357 (Top 5 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created almost 3 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Chatterbox lets you securely embed Hydrogen on any website!

Chatterbox

Chatterbox lets you securely embed Hydrogen within any website.

Chatterbox client screenshot

Requirements

To use Chatterbox you will need:

  • A homeserver which supports Token-authenticated registration. Currently the only known implementation is Synapse (which is available as a service from element.io).
  • An account on that homeserver which can create registration tokens. Synapse requires the account to be an admin.

Develop Instructions


  1. Clone the repo.
  2. Install dependencies (you only need to do this once):
    yarn install
  3. Modify config.json in public directory with your homeserver details.
    (See types/IChatterboxConfig.ts for the format)
  4. Start develop server:
    yarn start

Build Instructions


Follow the develop instructions above (steps 1-3), then:

  • Build chatterbox app into /target directory:
    yarn build

Embed Instructions


Assuming that the build output (inside /target) is hosted at <root> (eg: chatterbox.element.io), copy and paste the following snippet before the closing </body> tag:

	<script>
		window.CHATTERBOX_CONFIG_LOCATION = "path_to_config";
	</script>
	<script src="<root>/assets/parent.js" type="module" id="chatterbox-script"></script>

Testing

Chatterbox comes with a suite of integration tests, using cypress.

You can run them by doing

yarn cypress install
yarn cypress open

Ensure you copy the cypress/fixtures/demoInstance.sample.json file to cypress/fixtures/demoInstance.json and edit the keys accordingly.

Homeserver requirements & configuration

Chatterbox makes use of the Token-authenticated registration feature, and as such your homeserver implementation will need to support it.

Synapse

Synapse has supported this feature since at least 1.52.0. You can enable token registration in homeserver config with:

registration_requires_token: true

You will also need to manually create a registration token with the create token API. You must use the access token of an administrator for this. See the Synapse documentation for help.

$ curl --data '{ "uses_allowed": 50 }' -H 'Authorization: Bearer YOUR_ADMIN_TOKEN' 'https://your-homeserver/_synapse/admin/v1/registration_tokens/new'
200 OK
{
    "token": "defg",
    "uses_allowed": 50,
    "pending": 0,
    "completed": 0,
    "expiry_time": null
}

Note that you can use uses_allowed to set how many chatterbox users can register via this token before no more will be permitted. You can then use the value of token in the response inside your config.json.

More Repositories

1

element-web

A glossy Matrix collaboration client for the web.
TypeScript
10,230
star
2

element-android

A glossy Matrix collaboration client for Android.
Kotlin
3,054
star
3

element-ios

A glossy Matrix collaboration client for iOS
Swift
1,675
star
4

riot-android

A glossy Matrix collaboration client for Android
Java
1,416
star
5

synapse

Synapse: Matrix homeserver written in Python/Twisted.
Python
1,049
star
6

element-desktop

A glossy Matrix collaboration client for desktop.
TypeScript
943
star
7

element-x-android

Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
Kotlin
920
star
8

hydrogen-web

Lightweight matrix client with legacy and mobile browser support
TypeScript
586
star
9

element-call

Group calls powered by Matrix
TypeScript
402
star
10

element-x-ios

Next generation Matrix client for iOS built with SwiftUI on top of matrix-rust-sdk.
Swift
230
star
11

roadmap

Element public roadmap
78
star
12

element-meta

Shared/meta documentation and project artefacts for Element clients
45
star
13

matrix-authentication-service

Rust
28
star
14

riot-meta

A place to experiment with tracking features at a higher level than Riot web/iOS/Android.
25
star
15

swift-ogg

A Swift library for converting to and from opus/ogg format
Swift
21
star
16

ess-starter-edition-core

Jinja
17
star
17

logos

Logo artwork for Riot, Vector, Matrix etc
Shell
16
star
18

compound-web

Web implementation of the Compound design system
TypeScript
16
star
19

vector.im

static parts of vector.im site
HTML
14
star
20

jitsi-helm

Helm chart for HA Jitsi-meet
Lua
14
star
21

compound-design-tokens

Compound design tokens
JavaScript
13
star
22

riot-automated-tests

Java
12
star
23

policies

Policy documents for services run by New Vector
Python
12
star
24

element-builder

A minimalist auto-builder for Element and Element Desktop
TypeScript
12
star
25

feature-dashboard

A task summary, plan, and burndown chart for building software together
JavaScript
12
star
26

files-sdk-demo

Demo web client for using matrix-files-sdk
Svelte
11
star
27

compound

Element's design system
MDX
8
star
28

matrix-content-scanner-python

A web service for scanning media hosted by a Matrix media repository
Python
8
star
29

synapse-room-access-rules

Custom room access rules for Tchap
Python
6
star
30

nix-flakes

Development environments for various repos, powered by Nix Flakes.
Nix
6
star
31

element-integration-manager

Element Integration Manager related issues
6
star
32

compound-ios

SwiftUI implementation of the Compound design system
Swift
6
star
33

libopusencoder-android

Android wrapper for libopusenc, used to create Ogg files in with Opus frames.
C
6
star
34

ems-docs

Element and EMS documentation provided by the EMS team
Handlebars
6
star
35

stats

Python
5
star
36

jitsi_libre_maven

Maven repository for the LIBRE version of Jitsi
5
star
37

tailscale-k8s

Shell
5
star
38

oidc-playground

OpenID Connect project playground environment
5
star
39

element-web-ilag-module

Proof of concept for https://github.com/matrix-org/matrix-react-sdk-module-api
TypeScript
5
star
40

element.io

Public issue tracker for the element.io site
4
star
41

packages.element.io

Configuration files for packages.riot.im
CSS
4
star
42

element-feature-nag-bot

A Matrix bot that complains when riot-web features take too long
TypeScript
4
star
43

retro-nag-bot

A Matrix bot that complains when people don't finish their retro actions
TypeScript
4
star
44

user-stories

A place to write user stories for planned cross-platform enhancements.
4
star
45

kiwitcms-upload-action

Github Action to automate upload from junit output file to Kiwi TCMS
3
star
46

tchap-red-list

Python
3
star
47

ec-cli-rust

A small CLI tool that helps to emulate Element Call
Rust
3
star
48

element-design-tokens

Style dictionary containing design tokens for Element across all platforms.
JavaScript
3
star
49

compound-android

Kotlin
3
star
50

sfu-load-tester-go

A quick tool to create fake Element Call participants
Go
2
star
51

emsdocs-images

Hosting for images currently on ems-docs
CSS
2
star
52

design

2
star
53

helm-charts

Smarty
2
star
54

proj-mana-test

A test repo for playing with project management tools
2
star
55

lk-jwt-service

Minimal service to provide LiveKit JWTs using Matrix OpenID Connect
Go
2
star
56

tchap-displayname-from-email

A Synapse module used by Tchap to derive a display name from a new user's email address.
Python
2
star
57

riot-web-workflow-automation

A github thing that automates stuff on the workflow board, until Github supports the features
1
star
58

trafficlight-adapter-element-call

TypeScript
1
star
59

compound-ios-snapshots

The snapshots used for testing compound-ios.
1
star