Add builder service: scaffold, ASC API, devices UI, fastlane profile manager

Phase 1-3 of the builder subsystem on the Mac mini:
- Express + SQLite + sessions scaffolding, LAN-only service on port 3090
- App Store Connect JWT client (ES256 signing, devices/profiles/bundleIds)
- Device management UI with Apple-side registration
- Fastlane sigh wrapper with profile cache + auto-install to ~/Library/
- launchd plist + deploy script for Mac mini supervision
This commit is contained in:
trey
2026-04-11 13:28:01 -05:00
parent a1e60d390d
commit e9b6936904
19 changed files with 1666 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
<!-- Include pattern note: this file is not served directly; each page hand-inlines the nav for simplicity. -->
<header>
<div class="header-left"><h1>🔨 Builder</h1></div>
<nav>
<a href="/">Builds</a>
<a href="/devices">Devices</a>
<a href="/settings">Settings</a>
<a href="/logout" class="logout">Logout</a>
</nav>
</header>

View File

@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Devices - Builder</title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<header>
<div class="header-left"><h1>🔨 Builder</h1></div>
<nav>
<a href="/">Builds</a>
<a href="/devices" class="active">Devices</a>
<a href="/settings">Settings</a>
<a href="/logout" class="logout">Logout</a>
</nav>
</header>
<main>
<h1 class="page-title">Devices</h1>
<div class="section">
<h2>Register a device</h2>
<div class="card">
<form id="add-form">
<div class="field-group">
<div>
<label>UDID</label>
<input type="text" name="udid" placeholder="40-char hex or 25-char UUID format" required autocomplete="off">
</div>
<div>
<label>Name</label>
<input type="text" name="name" placeholder="Trey's iPhone" autocomplete="off">
</div>
</div>
<div class="btn-row">
<button type="submit">Add Device</button>
</div>
</form>
</div>
</div>
<div class="section">
<h2>Registered devices</h2>
<div id="devices-container">
<div class="card"><p style="color:var(--text-muted)">Loading…</p></div>
</div>
</div>
<div id="toast" class="toast"></div>
</main>
<script src="/js/devices.js"></script>
</body>
</html>

27
builder/views/index.html Normal file
View File

@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Builder</title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<header>
<div class="header-left"><h1>🔨 Builder</h1></div>
<nav>
<a href="/" class="active">Builds</a>
<a href="/devices">Devices</a>
<a href="/settings">Settings</a>
<a href="/logout" class="logout">Logout</a>
</nav>
</header>
<main>
<h1 class="page-title">Builds</h1>
<div class="card">
<p style="color: var(--text-muted)">No builds yet. Builds will appear here once the build pipeline (Phase 4) is wired up.</p>
</div>
</main>
</body>
</html>

29
builder/views/login.html Normal file
View File

@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>App Store Builder - Login</title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body class="login-page">
<div class="login-card">
<div class="login-icon">🔨</div>
<h1>App Store Builder</h1>
<p class="subtitle">Mac mini build console</p>
<form method="POST" action="/login">
<input type="password" name="password" placeholder="Password" autofocus required>
<button type="submit">Sign In</button>
</form>
<script>
if (location.search.includes('error=1')) {
const form = document.querySelector('form');
const err = document.createElement('p');
err.className = 'error';
err.textContent = 'Invalid password';
form.insertBefore(err, form.firstChild);
}
</script>
</div>
</body>
</html>

View File

@@ -0,0 +1,69 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Settings - Builder</title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<header>
<div class="header-left"><h1>🔨 Builder</h1></div>
<nav>
<a href="/">Builds</a>
<a href="/devices">Devices</a>
<a href="/settings" class="active">Settings</a>
<a href="/logout" class="logout">Logout</a>
</nav>
</header>
<main>
<h1 class="page-title">Settings</h1>
<div class="section">
<h2>App Store Connect API</h2>
<div class="card">
<form id="asc-form">
<div class="field-group">
<div>
<label>Key ID</label>
<input type="text" name="asc_key_id" placeholder="ABC123DEF4" autocomplete="off">
</div>
<div>
<label>Issuer ID</label>
<input type="text" name="asc_issuer_id" placeholder="00000000-0000-0000-0000-000000000000" autocomplete="off">
</div>
</div>
<label>Private Key (.p8 file)</label>
<input type="file" id="p8-input" accept=".p8">
<p id="p8-status" style="font-size:12px;color:var(--text-muted);margin-bottom:12px"></p>
<div class="btn-row">
<button type="submit">Save</button>
<button type="button" id="test-asc" class="btn-secondary">Test Connection</button>
</div>
</form>
</div>
</div>
<div class="section">
<h2>unraid App Store</h2>
<div class="card">
<form id="unraid-form">
<label>Base URL</label>
<input type="url" name="unraid_url" placeholder="https://appstore.treytartt.com">
<label>API Token</label>
<input type="password" name="unraid_token" placeholder="API token from unraid .env">
<div class="btn-row">
<button type="submit">Save</button>
<button type="button" id="test-unraid" class="btn-secondary">Test Connection</button>
</div>
</form>
</div>
</div>
<div id="toast" class="toast"></div>
</main>
<script src="/js/settings.js"></script>
</body>
</html>