]> git.r.bdr.sh - rbdr/junction/blame_incremental - README.md
Format and update docs
[rbdr/junction] / README.md
... / ...
CommitLineData
1# Junction
2
3Connect people through any URL.
4
5Junction is a web extension for Firefox, Chrome and Safari that lets you start
6an audio call at any URL.
7
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.
58
59```
60$ pnpm install && pnpm build
61```
62
63#### Testing on Firefox
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
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.
69
70This will enable the extension and will allow you to use the inspector to
71debug.
72
73#### Testing on Chrome
74
75In order to test on chrome, first go to `chrome://extensions/`. Make sure
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.
82
83### Formatting
84
85Running `make format` will format the code with prettify and xcbeautify