원클릭으로
building-guest-integrations
Documents how to build guest app integrations for devices that sync with a main Kyaraben installation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Documents how to build guest app integrations for devices that sync with a main Kyaraben installation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | building-guest-integrations |
| description | Documents how to build guest app integrations for devices that sync with a main Kyaraben installation. |
Guest integrations are lightweight apps that run on gaming devices (handhelds, retro consoles) to sync saves, states, ROMs, and BIOS files with the main Kyaraben installation.
If the target has a full Linux desktop environment (Batocera, RetroDECK, EmuDeck on SteamOS):
If the target is constrained (tiny handheld, no desktop, limited storage):
| Package | Purpose |
|---|---|
internal/guestapp | Interfaces (ServiceManager, SyncManager, UI), config types, utilities |
internal/syncguest | Syncthing management: start/stop, pairing, folder config, status |
integrations/{name}/
├── cmd/kyaraben-{name}/main.go
├── internal/
│ ├── app/app.go
│ ├── config/config.go
│ ├── mapping/mapping.go
│ ├── service/
│ └── ui/{type}/
├── build/
├── justfile
└── test/e2e/
Guest integrations bundle their own syncthing binary and run it with a dedicated port (e.g., 8484) and config directory. This avoids interfering with any system-installed syncthing, matching the main Kyaraben app's approach.
Choose based on target platform:
guestapp.PIDProcessController. Autostart writes scripts to CFW-specific locations.systemctl commands and ship a unit file.Guest apps use TOML config following the main app's conventions, with a subset of fields. Types are in internal/guestapp/config.go.
Distinguish between persisted preferences (autostart, path mappings) and runtime state (whether sync is currently running). What belongs in config depends on the platform's UX - NextUI has autostart in config but tracks "enabled" in memory since users explicitly launch the app each session.
config.DefaultConfig() for the CFW's directory structureServiceManager (see service management section above)UI using platform tools (MinUI binaries, terminal, etc.)main.goFor sync operations, use syncguest.Manager which fully implements SyncManager.
Use go-vfs for filesystem isolation and fake implementations (guestapp.NewFakeServiceManager(), NewFakeSyncManager(), NewFakeUI()) to test without real syncthing.
See integrations/nextui/test/e2e/app_test.go for the pattern.
NextUI (integrations/nextui/) is the canonical example:
| Concern | Path |
|---|---|
| Entry point | cmd/kyaraben-nextui/main.go |
| App logic | internal/app/app.go |
| Path defaults | internal/config/config.go |
| Folder mapping | internal/mapping/mapping.go |
| Service manager | internal/service/service.go |
| MinUI UI | internal/ui/minui/ |
| Build system | justfile |
| E2E tests | test/e2e/app_test.go |
When building a second integration, consider extracting shared logic from NextUI. See internal/guestapp/doc.go for notes on extraction boundaries.