Add APK Builder deploy provider

Adds support for building Android APKs from web projects via a self-hosted
Capacitor-based build service.

- Add APKBuilderAdapter for communicating with build server
- Add APKBuilderDeployForm component for app name/package ID config
- Add zip command for creating archives in terminal
- Integrate APK Builder into deploy settings and deploy flow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
Derek RossandClaude Opus 4.5 committed 2026-01-03 15:35:12 -05:00
1 parent cb3fb88a75
commit 72c9fc6989
14 files changed
+833 -13

No files matched your search

+33 -4
View File
@@ -32,7 +32,7 @@ import { CSS } from '@dnd-kit/utilities';
interface PresetProvider {
id: string;
type: 'shakespeare' | 'netlify' | 'vercel' | 'nsite' | 'cloudflare' | 'deno';
type: 'shakespeare' | 'netlify' | 'vercel' | 'nsite' | 'cloudflare' | 'deno' | 'apkbuilder';
name: string;
description: string;
requiresNostr?: boolean;
@@ -42,6 +42,7 @@ interface PresetProvider {
accountIdURL?: string;
organizationIdLabel?: string;
organizationIdURL?: string;
buildServerUrlLabel?: string;
proxy?: boolean;
}
@@ -201,6 +202,15 @@ const PRESET_PROVIDERS: PresetProvider[] = [
organizationIdURL: 'https://dash.deno.com/orgs',
proxy: true,
},
{
id: 'apkbuilder',
type: 'apkbuilder',
name: 'APK Builder',
description: 'Build Android APKs from your web app',
buildServerUrlLabel: 'Build Server URL',
apiKeyLabel: 'API Key',
proxy: true,
},
];
// Helper function to generate custom provider ID
@@ -267,6 +277,13 @@ function getProviderUrl(provider: DeployProvider | PresetProvider): string | nul
// nsite uses Rocket icon fallback
return null;
case 'apkbuilder':
// For APK Builder, check for custom buildServerUrl
if ('buildServerUrl' in provider && provider.buildServerUrl) {
return provider.buildServerUrl;
}
return null;
default:
return null;
}
@@ -320,7 +337,7 @@ export function DeploySettings() {
setAddDialogOpen(true);
};
const handleAddPresetProvider = (preset: PresetProvider, apiKey: string, accountId?: string, organizationId?: string) => {
const handleAddPresetProvider = (preset: PresetProvider, apiKey: string, accountId?: string, organizationId?: string, buildServerUrl?: string) => {
// For Shakespeare, just check if user is logged in
if (preset.requiresNostr && !user) {
return;
@@ -399,6 +416,18 @@ export function DeploySettings() {
organizationId: organizationId.trim(),
...(preset.proxy && { proxy: true }),
};
} else if (preset.type === 'apkbuilder') {
if (!buildServerUrl?.trim() || !apiKey?.trim()) {
return;
}
newProvider = {
id: preset.id,
name: preset.name,
type: 'apkbuilder',
buildServerUrl: buildServerUrl.trim(),
apiKey: apiKey.trim(),
...(preset.proxy && { proxy: true }),
};
} else {
return; // Unknown type
}
@@ -536,8 +565,8 @@ export function DeploySettings() {
onSetForceManualEntry={(force) =>
setForceManualEntry(prev => ({ ...prev, [selectedPreset.id]: force }))
}
onAdd={(apiKey, accountId, organizationId) =>
handleAddPresetProvider(selectedPreset, apiKey, accountId, organizationId)
onAdd={(apiKey, accountId, organizationId, buildServerUrl) =>
handleAddPresetProvider(selectedPreset, apiKey, accountId, organizationId, buildServerUrl)
}
/>
)}