dev / templates / app-common / README.md
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# __NAME__

TODO: one line on what __NAME__ is — live at
**[__HOST__](https://__HOST__)**, repo published at
**[git.ardegazu.ro/__SUB__](https://git.ardegazu.ro/__SUB__)**.

TODO: a short paragraph on what it does and why. Installable PWA, safe-area
aware, works from any static file host.

## Architecture

- **No server.** Browsers are [js-libp2p](https://libp2p.io) peers: they meet
  through a circuit-relay-v2 node, upgrade to direct WebRTC, and speak a
  room-scoped protocol under [`client/src/__NAME__/net/`](client/src/__NAME__/net/).
  Rooms are
  keyed by a secret in the URL fragment — membership is proved pairwise with a
  sealed hello, and every frame is end-to-end encrypted by libp2p's noise
  layer. The app only adds its wire frames and its own logic in
  [`client/src/__NAME__/app/`](client/src/__NAME__/app/).
- **Hosting without an origin server.** `client/dist/` is pinned to IPFS,
  named by IPNS and served straight from the gateway on the app's own domain
  (DNSLink). The published repo works the same way (`deploy/publish-repo.sh`
  + the shared `git.ardegazu.ro` source root).

## Develop

```bash
cd client && npm install && npm run dev   # http://localhost:4173
```

Open two tabs on the same `#room` URL to talk to yourself. From the suite
workspace, `ardz dev __SUB__` does the same (and `ardz relay` runs a local
dev relay on :9090).

## Deploy

```bash
ardz build __SUB__          # shadow-cljs release + workbox → client/dist
ardz release __SUB__        # pin to IPFS, publish the IPNS name
ardz publish-src __SUB__    # anonymity-gated source mirror → git.ardegazu.ro
```

Clone: `git clone https://git.ardegazu.ro/__SUB__.git`

MIT — see [LICENSE](LICENSE).

static mirror of HEAD · about · clone: git clone https://git.ardegazu.ro/dev.git