-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
JumpStart Wiki Bot edited this page Aug 8, 2026
·
1 revision
JumpStart is a Wails v2 desktop app:
-
main.goembedsfrontend/dist, constructsApp, and callswails.Run. - Only
appis inBind— every frontend call hits exported(*App)methods. - macOS uses a hidden-inset title bar, transparent webview, and translucent window so AppKit vibrancy shows through the sidebar. Windows uses Mica similarly.
- A top-level
recoverinmainreports panics to analytics (trackPanic) then re-panics.
Cold-start timing starts at package init (processStart) so app_launched.cold_start_ms measures the whole launch, not only post-Wails work.
Defined in app.go:
| Field | Role |
|---|---|
ctx |
Wails context for dialogs and EventsEmit
|
store |
*store.Store → ~/.jumpstart/config.json
|
manager |
*procman.Manager — all long-lived subprocesses |
scriptRuns |
In-memory script/test run bookkeeping (scripts_api.go) |
analytics |
*analytics.Client (nil-safe no-op when unconfigured) |
procStarts / stopping
|
Maps for uptime and intentional-stop vs crash |
shuttingDown |
Suppresses crash events during quit |
lastDetect |
Attributes a subsequent save to auto-detect |
Startup
- Create
procman.Managerwith an emitter that (a) tracks process exit/crash analytics and (b) forwards toruntime.EventsEmit. - Open
store.New()(migrates~/.devdeck/config.json→~/.jumpstart/config.jsononce). -
initAnalytics()thentrackLaunch().
Shutdown
- Set
shuttingDown. -
manager.StopAll(). -
trackClose()thenanalytics.Close(2s)— undelivered events stay on the offline queue.
-
Bindings are thin. Prefer calling
internal/*fromAppmethods; keep HTTP/CLI/OS details out ofapp.gowhen a package already owns them. -
Instrument at the binding. Analytics wrappers (
gitOp,dockerOp,trackProcessStarted, …) sit next to the call so every path is covered and raw errors never leak. -
Events for push, methods for pull. Live logs/ports/exits use
EventsEmit; status snapshots useGetStatus/GetUsage. -
Platform files use build tags. Examples:
theme_darwin.go/theme_other.go,procman/proc_unix.go/proc_windows.go,analytics/osinfo_*.go,opener/platform_*.go.
| Event | Producer | Consumer |
|---|---|---|
log:<id> |
procman |
LogPanel, script/test logs |
ports:<id> |
procman | ProcessCard |
exit:<id> |
procman | cards, deps install, tests, scripts |
update:progress / update:ready
|
InstallUpdate |
UpdateBanner |
codectx:progress / codectx:done
|
BuildCodeContext |
codeContext.js |
IDs are process IDs, or synthetic IDs like <procID>:deps and script/test run IDs.
ProcessCard → StartProcess(projectID, procID)
→ findProcess → manager.Start
→ trackProcessStarted
→ touchUsage (LastUsedAt / UseCount)
→ frontend listens log:/ports:/exit:
TaskDetailModal → OllamaEnrichTask(host, model, …, projectID)
→ optional codectx retrieval
→ internal/ai Ollama /api/chat
→ EnrichResult JSON for the modal
→ acceptance tracked from UI via analytics bridge
App.jsx useTheme → localStorage + dataset.theme
→ SetNativeTheme(mode)
→ setNativeAppearance (ObjC on Darwin) + WindowSet*Theme
Wails’ WindowSetLightTheme / DarkTheme are Windows-oriented; on macOS, theme_darwin.go pins NSApp.appearance so sidebar vibrancy matches the in-app theme (not only the OS appearance).
go.mod says module devdeck. Imports are devdeck/internal/.... The binary/product is JumpStart; legacy ~/.devdeck is only used for one-time config migration.
- All bound methods are re-exported from
frontend/src/api.js(single import surface). - Bindings are generated under
frontend/wailsjs/bywails dev/wails build— do not hand-edit. - Prefer
api.jsover importingwailsjsdirectly in components.