Skip to content

Commit a31effb

Browse files
kixelatedclaude
andauthored
Move demo page to demo/boy and bootstrap video catalog (#1212)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent af2ae08 commit a31effb

File tree

20 files changed

+228
-229
lines changed

20 files changed

+228
-229
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ node_modules
3030
*.m3u8
3131
*.m4s
3232

33+
# Cloudflare Wrangler
34+
.wrangler/
35+
3336
# We're using bun
3437
package-lock.json
3538
yarn.lock

bun.lock

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cdn/boy/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
gen/
2-
flake.lock

cdn/boy/boy-prepare.service.tftpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
[Unit]
2-
Description=Download ROM for boy-${name}
3-
Before=boy-${name}.service
2+
Description=Download all Game Boy ROMs
43

54
[Service]
65
Type=oneshot
76
RemainAfterExit=yes
87
User=root
98
WorkingDirectory=/var/lib/moq
109

10+
%{ for rom in roms ~}
1111
ExecStart=/var/lib/moq/pkg/bin/wget -nv https://rom.moq.dev/${rom} -O /var/lib/moq/${rom}
12+
%{ endfor ~}
1213

1314
[Install]
1415
WantedBy=multi-user.target

cdn/boy/boy.service.tftpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Unit]
22
Description=MoQ Boy - ${name}
3-
After=network-online.target boy-${name}-prepare.service
3+
After=network-online.target boy-prepare.service
44
Wants=network-online.target
5-
Requires=boy-${name}-prepare.service
5+
Requires=boy-prepare.service
66

77
[Service]
88
Type=simple

cdn/boy/justfile

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,30 +52,10 @@ deploy:
5252
systemctl enable monitor.service && \
5353
systemctl start vacuum.timer && \
5454
systemctl restart monitor.service && \
55-
systemctl enable boy-big2small-prepare.service && \
56-
systemctl enable boy-big2small.service && \
57-
systemctl enable boy-dangan-prepare.service && \
58-
systemctl enable boy-dangan.service && \
59-
systemctl enable boy-opossum-prepare.service && \
60-
systemctl enable boy-opossum.service && \
61-
systemctl enable boy-capybara-prepare.service && \
62-
systemctl enable boy-capybara.service && \
63-
systemctl enable boy-fofk-prepare.service && \
64-
systemctl enable boy-fofk.service && \
65-
systemctl enable boy-gb-run-prepare.service && \
66-
systemctl enable boy-gb-run.service && \
67-
systemctl start boy-big2small-prepare.service && \
68-
systemctl start boy-dangan-prepare.service && \
69-
systemctl start boy-opossum-prepare.service && \
70-
systemctl start boy-capybara-prepare.service && \
71-
systemctl start boy-fofk-prepare.service && \
72-
systemctl start boy-gb-run-prepare.service && \
73-
systemctl restart boy-big2small.service && \
74-
systemctl restart boy-dangan.service && \
75-
systemctl restart boy-opossum.service && \
76-
systemctl restart boy-capybara.service && \
77-
systemctl restart boy-fofk.service && \
78-
systemctl restart boy-gb-run.service"
55+
systemctl enable boy-prepare.service && \
56+
systemctl start boy-prepare.service && \
57+
systemctl enable boy-big2small.service boy-dangan.service boy-opossum.service boy-capybara.service boy-fofk.service boy-gb-run.service && \
58+
systemctl restart boy-big2small.service boy-dangan.service boy-opossum.service boy-capybara.service boy-fofk.service boy-gb-run.service"
7959

8060
# Check status of all boy services
8161
status:

cdn/boy/main.tf

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ locals {
1111

1212
# Generate systemd service files from templates
1313
resource "local_file" "boy_prepare_service" {
14-
for_each = local.roms
1514
content = templatefile("${path.module}/boy-prepare.service.tftpl", {
16-
name = each.key
17-
rom = each.value
15+
roms = values(local.roms)
1816
})
19-
filename = "${path.module}/gen/boy-${each.key}-prepare.service"
17+
filename = "${path.module}/gen/boy-prepare.service"
2018
}
2119

2220
resource "local_file" "boy_service" {

demo/boy/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
rom/
2+
.wrangler/

demo/boy/package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "@moq/demo-boy",
3+
"private": true,
4+
"type": "module",
5+
"version": "0.1.0",
6+
"description": "MoQ Boy Demo - Crowd-controlled Game Boy streaming",
7+
"license": "(MIT OR Apache-2.0)",
8+
"scripts": {
9+
"dev": "vite --open"
10+
},
11+
"dependencies": {
12+
"@moq/boy": "workspace:^"
13+
},
14+
"devDependencies": {
15+
"esbuild": "^0.27.0",
16+
"typescript": "^6.0.0",
17+
"vite": "^7.3.1"
18+
}
19+
}
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>MoQ Boy</title>
77
<style>
8-
body { margin: 0; padding: 0; background: #0a0a0a; }
9-
moq-boy { min-height: 100vh; }
8+
* { margin: 0; padding: 0; box-sizing: border-box; }
9+
body { font-family: system-ui, sans-serif; background: #0a0a0a; color: #e0e0e0; }
1010
</style>
1111
</head>
1212
<body>
13-
<moq-boy url="http://localhost:4443/anon"></moq-boy>
14-
<script type="module" src="./element.ts"></script>
13+
<script type="module" src="./index.ts"></script>
1514
</body>
1615
</html>

0 commit comments

Comments
 (0)