Skip to content

Commit bf1b97f

Browse files
committed
Replace ASCII art in architecture.md with SVGs per REVIEW.md
1 parent 33ed39b commit bf1b97f

7 files changed

Lines changed: 463 additions & 98 deletions

File tree

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
- 'README.md'
1010
- 'scripts/install-online.sh'
1111
- 'scripts/install.sh'
12-
- 'images/**'
1312
- '.github/workflows/docs.yml'
1413

1514
permissions:
@@ -40,6 +39,7 @@ jobs:
4039

4140
- run: |
4241
cp README.md docs/index.md
42+
sed -i 's|docs/assets/|assets/|g' docs/index.md
4343
mkdocs build
4444
4545
- name: Copy install script and assets

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p align="center">
22
<picture>
3-
<source media="(prefers-color-scheme: dark)" srcset="assets/podbox-logo.svg">
4-
<img src="assets/podbox-logo.svg" alt="podbox">
3+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/podbox-logo.svg">
4+
<img src="docs/assets/podbox-logo.svg" alt="podbox">
55
</picture>
66
</p>
77

@@ -46,8 +46,8 @@ A single TOML definition is your single source of truth. `podbox build` processe
4646

4747
<p align="center">
4848
<picture>
49-
<source media="(prefers-color-scheme: dark)" srcset="assets/architecture.svg">
50-
<img src="assets/architecture.svg" alt="podbox architecture" width="100%" style="max-width: 820px;">
49+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/architecture.svg">
50+
<img src="docs/assets/architecture.svg" alt="podbox architecture" width="100%" style="max-width: 820px;">
5151
</picture>
5252
</p>
5353

docs/architecture.md

Lines changed: 24 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -7,60 +7,25 @@ Containerfiles, Quadlet systemd units, lock files, desktop entries — derives
77
from this one file. The user never writes a raw Containerfile or systemd unit
88
manually.
99

10-
```
11-
Definition File (myenv.toml)
12-
13-
▼ podbox build
14-
┌──────────────────┐ ┌─────────────────────────────────┐
15-
│ Containerfile │ │ Quadlet files │
16-
│ (generated) │ │ myenv.build │
17-
│ │ │ myenv.socket │
18-
└──────┬───────────┘ │ myenv.container │
19-
│ └──────────────┬──────────────────┘
20-
▼ │
21-
podman build podbox enable
22-
│ │
23-
▼ ▼
24-
localhost/podbox-myenv:latest systemctl --user daemon-reload
25-
│ systemctl --user enable --now myenv
26-
└──────────────────────────────────┘
27-
28-
▼ container starts
29-
catatonit (PID 1, via --init)
30-
31-
podbox-guest --entry
32-
├── fork → podbox-guest --daemon
33-
│ connects to host socket
34-
└── exec → bash / fish (user shell)
35-
```
10+
<p align="center">
11+
<picture>
12+
<source media="(prefers-color-scheme: dark)" srcset="assets/how_it_works.svg">
13+
<img src="assets/how_it_works.svg" alt="How podbox Works" width="100%" style="max-width: 820px;">
14+
</picture>
15+
</p>
3616

3717
## Codegen Pipeline
3818

3919
`podbox build` runs these steps in order. Each codegen step is a **pure function**:
4020
data in, string out, no I/O. Orchestration (file writes, podman invocations) is
4121
separate.
4222

43-
```
44-
Config struct
45-
46-
├── codegen::containerfile::generate(config, guest_binary_path) → String
47-
48-
├── codegen::quadlet::generate_build(config, containerfile_path) → String
49-
50-
├── codegen::quadlet::generate_socket(config) → String
51-
52-
├── codegen::quadlet::generate_container(config, host_env, xdg_dirs) → String
53-
│ (queries podman_version() internally for SSH agent gating)
54-
55-
└── lock::write(config_checksum, image_digest) → LockFile
56-
57-
Then (I/O phase):
58-
write build context to ~/.local/share/podbox/<name>/
59-
copy podbox-guest binary into build context
60-
podman build -t localhost/podbox-<name>:latest <context-dir>
61-
get digest via podman inspect
62-
write lock file
63-
```
23+
<p align="center">
24+
<picture>
25+
<source media="(prefers-color-scheme: dark)" srcset="assets/codegen_pipeline.svg">
26+
<img src="assets/codegen_pipeline.svg" alt="Codegen Pipeline" width="100%" style="max-width: 820px;">
27+
</picture>
28+
</p>
6429

6530
## Generated Containerfile
6631

@@ -144,19 +109,12 @@ The guest daemon connects to a Unix socket on the host to bridge container
144109
capabilities. Messages are length-prefixed JSON (see [protocol.md](protocol.md)
145110
for the wire format).
146111

147-
```
148-
Container process
149-
│ runs: notify-send "hello"
150-
151-
Interceptor symlink → podbox-guest (re-exec)
152-
│ connects to local daemon socket
153-
│ sends: {"type":"notify","summary":"hello"}
154-
155-
podbox-guest --daemon (event loop)
156-
│ forwards to host socket
157-
158-
Host socket handler → desktop notification appears
159-
```
112+
<p align="center">
113+
<picture>
114+
<source media="(prefers-color-scheme: dark)" srcset="assets/socket_protocol.svg">
115+
<img src="assets/socket_protocol.svg" alt="Host-Guest Socket Protocol" width="100%" style="max-width: 820px;">
116+
</picture>
117+
</p>
160118

161119
## Guest Daemon (podbox-guest)
162120

@@ -194,39 +152,12 @@ through the idmapped mount.
194152

195153
## Runtime Flow (Full Sequence)
196154

197-
```
198-
LOGIN
199-
200-
201-
systemd --user starts myenv.socket
202-
creates: /run/user/1000/podbox/myenv.sock
203-
204-
▼ (autostart=true)
205-
systemd --user starts myenv.service (from myenv.container)
206-
207-
208-
podman run --init --name myenv \
209-
-v ~/containers/myenv:/root:Z \
210-
-v ~/Documents:/root/Documents:z \
211-
-v /run/user/1000/wayland-0:/run/user/1000/wayland-0 \
212-
-v /run/user/1000/podbox/myenv.sock:/run/user/1000/podbox/myenv.sock \
213-
... localhost/podbox-myenv:latest
214-
215-
216-
catatonit (PID 1) → podbox-guest --entry
217-
218-
├── fork → podbox-guest --daemon
219-
│ ├── connect to host socket
220-
│ ├── handshake
221-
│ ├── install interceptors
222-
│ └── event loop
223-
224-
└── exec → bash (user shell)
225-
226-
│ user runs: notify-send "build done"
227-
228-
interceptor → daemon → host socket → notification
229-
```
155+
<p align="center">
156+
<picture>
157+
<source media="(prefers-color-scheme: dark)" srcset="assets/runtime_flow.svg">
158+
<img src="assets/runtime_flow.svg" alt="Runtime Flow Sequence" width="100%" style="max-width: 820px;">
159+
</picture>
160+
</p>
230161

231162
## Project Structure
232163

docs/assets/codegen_pipeline.svg

Lines changed: 135 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)