]> git.r.bdr.sh - rbdr/junction/blame - README.md
Format and update docs
[rbdr/junction] / README.md
CommitLineData
02bc8bc5
RBR
1# Junction
2
bab26a4d 3Connect people through any URL.
1ed219c8 4
bab26a4d
RBR
5Junction is a web extension for Firefox, Chrome and Safari that lets you start
6an audio call at any URL.
1ed219c8 7
bab26a4d
RBR
8## Building
9
10Running `make` or `make package` will regenerate the content script, and
11package the extension for all browsers in the `./build/` directory with
12the following outputs:
13
14- `junction.xpi`: The firefox extension
15- `junction.zip`: The chrome extension
16- `Junction.app`: The safari extension app
17
18## Developing
19
20The project is divided into three main parts:
21
22- `server`: A server that handles message passing to establish the WebRTC
23 connections.
24- `extension`: The main code of the extension itself.
25- `safari`: The safari app, it wraps the extension using symlinks.
26
27### Dependencies
28
29- `make` to run the build commands.
30- `xcode` to build the safari extension.
31- `node` and `pnpm` to build the extension, and if you want to run the server
32 directly.
33- `podman` and `podman-compose` if you want to run the server as a container.
34- `prettier` to format Javascript, JSON, Yaml, and Markdown.
35- `xcbeautify` to format swift
36
37### Server
38
39The server is a socket.io server that relays messages between peers to help
40establish a WebRTC connection.
41
42#### Configuration
43
44You can use environment variables to control the server.
45
46- `JUNCTION_SERVER_PORT` which port to listen on. Defaults to `8000`.
47
48### Extension
49
50The extension uses WebExtension manifest v2 and is compatible with Firefox,
51Chrome and Safari.
52
53You can build all extensions using `make` in the root of the directory.
54
55If you want to run manually then you can run `pnpm install` from the
56`extension` folder to install dependencies, and `pnpm build` to generate the
57content script.
e3dca99b 58
59```
80172072 60$ pnpm install && pnpm build
e3dca99b 61```
62
bab26a4d 63#### Testing on Firefox
1ed219c8
RBR
64
65In order to test on firefox, first go to `about:debugging`, then click
66on the `This Firefox` option. Then click on `Load Temporary Add-On` and
bab26a4d
RBR
67point the browser to the `build/junction.xpi` file if you're using `make`, or
68`extension/manifest.json` file if you're testing without packaging.
1ed219c8 69
bab26a4d
RBR
70This will enable the extension and will allow you to use the inspector to
71debug.
a94a5407 72
bab26a4d 73#### Testing on Chrome
a94a5407
RBR
74
75In order to test on chrome, first go to `chrome://extensions/`. Make sure
bab26a4d
RBR
76`Developer mode` is enabled. You can drag the `build/junction.zip` file or
77click `Load Unpacked` and point the browser to the `extension` directory.
78
79#### Testing on Safari
80
81Open `Junction.app` and then enable the extension in Safari.
ec4adc33 82
bab26a4d 83### Formatting
ec4adc33 84
bab26a4d 85Running `make format` will format the code with prettify and xcbeautify