docs: add self-hosting info

This commit is contained in:
Jeremy Kahn 2022-09-11 20:52:47 -05:00
parent 1ea67e2c3a
commit e2bac732cf
2 changed files with 25 additions and 5 deletions

View File

@ -15,9 +15,10 @@ Chitchatter is a free (as in both price and freedom) communication tool. It is d
- Ephemeral - Ephemeral
- Message content is never persisted to disk - Message content is never persisted to disk
- Decentralized - Decentralized
- There is no API server. All that's required for Chitchatter to function is availability of GitHub for static assets and public WebTorrent and STUN/TURN relay servers for establishing communication. - There is no API server. All that's required for Chitchatter to function is availability of GitHub for static assets and public WebTorrent and STUN/TURN relay servers for establishing peer communication.
- [Self-hostable](#self-hosting)
Chitchatter was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). Chitchatter was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). The secure networking magic would not be possible without [Trystero](https://github.com/dmotz/trystero).
## How to use it ## How to use it
@ -91,7 +92,6 @@ This is a non-exhaustive list of things that are in Chitchatter's future:
- Voice calling - Voice calling
- Video calling - Video calling
- File sharing - File sharing
- Pairing and relay server configuration
- Indicators for when others are typing - Indicators for when others are typing
- Transcript backfilling for peers who join a room after there has already been activity - Transcript backfilling for peers who join a room after there has already been activity
@ -120,6 +120,16 @@ Builds the app for production to the `build` folder. It correctly bundles React
The build is minified and the filenames include the hashes. The build is minified and the filenames include the hashes.
### Deployment ### Self-hosting
The Production environment is updated when the `main` branch is updated. Chitchatter is designed to be forked and self-hosted. If you would like to change pairing or relay server configuration, or you simply prefer to control your own builds and versions, just [fork this repo](https://github.com/jeremyckahn/chitchatter/fork).
**Important step!** After forking, be sure to change the [`homepage` property in `package.json`](https://github.com/jeremyckahn/chitchatter/blob/1ea67e2c3a45115e054ebfe3457f2c3572c6213b/package.json#L4) to whatever URL your Chitchatter will be hosted from. Assuming you are using [GitHub Pages](https://pages.github.com/), this will be something like `https://github_user_or_org_name.github.io/chitchatter/`. **If you don't do this, your builds will not produce usable build artifacts**.
#### Runtime configuration
Explore the files in `src/config` to modify pairing and relay server configuration.
#### Deployment
When hosted on GitHub, the Production environment is updated when the remote `main` branch is updated.

View File

@ -1,4 +1,14 @@
// This object is provided as `config.rtcConfig` to Trystero's `joinRoom`
// function: https://github.com/dmotz/trystero#joinroomconfig-namespace
//
// https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection#parameters
export const rtcConfig: RTCConfiguration = { export const rtcConfig: RTCConfiguration = {
// These are the relay servers that are used in case a direct peer-to-peer
// connection cannot be made. Feel free to change them as you'd like. If you
// would like to disable relay servers entirely, remove the `iceServers`
// property from the rtcConfig object. IF YOU DISABLE RELAY SERVERS,
// CHITCHATTER PEERS MAY NOT BE ABLE TO CONNECT DEPENDING ON HOW THEY ARE
// CONNECTED TO THE INTERNET.
iceServers: [ iceServers: [
{ {
urls: 'stun:openrelay.metered.ca:80', urls: 'stun:openrelay.metered.ca:80',