]> git.r.bdr.sh - rbdr/junction/blob - README.md
Fix typo
[rbdr/junction] / README.md
1 # Junction
2
3 Connect people through any URL.
4
5 Junction is a web extension for Firefox, Chrome and Safari that lets you start
6 an audio call at any URL.
7
8 ## Building
9
10 Running `make` or `make package` will regenerate the content script, and
11 package the extension for all browsers in the `./build/` directory with
12 the 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
20 The 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
39 The server is a socket.io server that relays messages between peers to help
40 establish a WebRTC connection.
41
42 #### Configuration
43
44 You 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
50 The extension uses WebExtension manifest v2 and is compatible with Firefox,
51 Chrome and Safari.
52
53 You can build all extensions using `make` in the root of the directory.
54
55 If 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
57 content script.
58
59 ```
60 $ pnpm install && pnpm build
61 ```
62
63 #### Testing on Firefox
64
65 In order to test on firefox, first go to `about:debugging`, then click
66 on the `This Firefox` option. Then click on `Load Temporary Add-On` and
67 point 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
70 This will enable the extension and will allow you to use the inspector to
71 debug.
72
73 #### Testing on Chrome
74
75 In 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
77 click `Load Unpacked` and point the browser to the `extension` directory.
78
79 #### Testing on Safari
80
81 Open `Junction.app` and then enable the extension in Safari.
82
83 ### Formatting
84
85 Running `make format` will format the code with prettify and xcbeautify