Setup and builds
This page collects the full setup, run, build, mobile, and release commands. To see how the pieces fit together first, read Architecture; for a picture of what every command produces, jump to What each command builds.
Prerequisites
Section titled “Prerequisites”| Requirement | Version | Install |
|---|---|---|
| Node.js | 24+ | Download Node.js or use nvm install 24. |
| pnpm | 8+ | npm install -g pnpm |
| Git | Any recent version | Download Git |
Building the phone apps needs more (Capacitor 9):
| Platform | Needs | App minimum |
|---|---|---|
| iOS | Xcode 27 or newer | iOS 16 |
| Android | Android Studio 2026.1.4 or newer, a JDK 21 (Android Studio’s own works), Gradle 9.8.2 (the wrapper fetches it) | Android 8.0 (API 26), target 37 |
The project uses pnpm-lock.yaml, so pnpm is the expected package manager.
Install
Section titled “Install”git clone https://github.com/nrajesh/vaulted.money.gitcd vaulted.moneypnpm installOptional verification:
pnpm lintpnpm buildWeb App
Section titled “Web App”pnpm devOpen http://localhost:8081, or the port printed by Vite.
Electron Desktop App
Section titled “Electron Desktop App”pnpm run electron:devThis command:
- Starts the Vite dev server on port
8081. - Waits for the server to be ready.
- Compiles the Electron main and preload files.
- Launches the Electron window.
To use the optional Local API, turn it on in Settings inside the desktop app. After pulling changes that touch electron/, fully quit the app (closing the window only hides it) and run electron:dev again so the main process is recompiled. See API.md.
Do not run pnpm dev separately before electron:dev; that can create a port conflict.
The first Electron run may take longer because the Electron binary is downloaded.
What Each Command Builds
Section titled “What Each Command Builds”Everything starts from one web bundle. Desktop and phone builds wrap that same bundle, which is why they all begin with pnpm build.
flowchart LR
SRC["Source<br/>src/ · electron/ · mcp/"]:::ui
subgraph Check["✅ Checks: produce reports, not apps"]
direction TB
LINT["pnpm lint<br/>pnpm format:check<br/>tsc --noEmit"]:::cmd
TEST["pnpm test:coverage"]:::cmd
COV["coverage/"]:::out
TEST --> COV
end
subgraph Web["🌐 Web"]
direction TB
BUILD["pnpm build"]:::cmd
DIST["dist/<br/>the web bundle"]:::hub
PREVIEW["pnpm preview<br/>or any static host"]:::ui
BUILD --> DIST --> PREVIEW
end
subgraph Desktop["🖥️ Desktop"]
direction TB
ECOMP["pnpm electron:compile"]:::cmd
DELEC["dist-electron/<br/>main + preload"]:::out
EBUILD["pnpm electron:build"]:::cmd
REL["release/<br/>DMG · EXE · AppImage"]:::final
ECOMP --> DELEC --> EBUILD --> REL
end
subgraph Phone["📱 Phone"]
direction TB
SYNC["pnpm mobile:sync<br/>pnpm mobile:refresh"]:::cmd
NATIVE["ios/ and android/<br/>bundle copied in"]:::out
APK["pnpm android:build:apk<br/>(:release for a release build)"]:::cmd
APKOUT["android/app/build/outputs/apk/<br/>APK"]:::final
IOSB["pnpm ios:build:simulator"]:::cmd
IOSOUT["ios/build/DerivedData/…<br/>simulator app"]:::final
SYNC --> NATIVE
NATIVE --> APK --> APKOUT
NATIVE --> IOSB --> IOSOUT
end
subgraph Agent["🤖 AI agent bundle"]
direction TB
PACK["pnpm mcpb:pack"]:::cmd
MCPB["release/extension/<br/>vaulted-money.mcpb"]:::final
PACK --> MCPB
end
SRC --> LINT
SRC --> TEST
SRC --> BUILD
SRC --> ECOMP
SRC --> PACK
DIST --> EBUILD
DIST --> SYNC
style Check fill:none,stroke:#475569,stroke-width:2px
style Web fill:none,stroke:#2563eb,stroke-width:2px
style Desktop fill:none,stroke:#b45309,stroke-width:2px
style Phone fill:none,stroke:#15803d,stroke-width:2px
style Agent fill:none,stroke:#be123c,stroke-width:2px
classDef ui fill:#2563eb,stroke:#93c5fd,stroke-width:2px,color:#ffffff
classDef cmd fill:#7c3aed,stroke:#c4b5fd,stroke-width:2px,color:#ffffff
classDef final fill:#15803d,stroke:#86efac,stroke-width:3px,color:#ffffff
classDef out fill:#334155,stroke:#94a3b8,stroke-width:2px,color:#ffffff
classDef hub fill:#0d1520,stroke:#2dd4bf,stroke-width:3px,color:#ffffff
linkStyle default stroke:#64748b,stroke-width:2px
Purple boxes are commands, grey boxes are folders they create along the way, and green boxes are the finished things you can install. None of these folders are committed to git; each can be recreated by running its command.
Two shortcuts chain several of these together:
pnpm validateruns the type check, lint and format check.pnpm release:localruns the desktop package, the Android debug APK and the iOS simulator build in one go.
Build Commands
Section titled “Build Commands”| Goal | Command | Output |
|---|---|---|
| Web production build | pnpm build |
dist/ |
| Web local preview | pnpm build then pnpm preview |
Local preview server |
| Electron packages | pnpm run electron:build |
release/ |
| Electron dev | pnpm run electron:dev |
Local desktop window |
| Windows installers | pnpm run electron:build:win |
release/*.exe (build on Windows) |
| Linux packages | pnpm run electron:build:linux |
release/*.AppImage, release/*.deb (build on Linux) |
| Sync mobile shells | pnpm run mobile:sync |
Copies web build to native shells |
| Refresh both mobile apps | pnpm run mobile:refresh |
Builds web and syncs iOS/Android |
| Android debug APK | pnpm run android:build:apk |
android/app/build/outputs/apk/debug/ |
| Android release APK | pnpm run android:build:apk:release |
android/app/build/outputs/apk/release/ |
| iOS simulator app | pnpm run ios:build:simulator |
ios/build/DerivedData/Build/Products/Release-iphonesimulator/ |
| Full local release sweep | pnpm run release:local |
Electron package, Android debug APK, iOS simulator build |
Electron packaging depends on a fresh web build because the renderer ships from dist/.
Capacitor mobile builds also depend on a fresh web build because cap sync copies dist/ into the native iOS and Android projects.
Windows and Linux Builds
Section titled “Windows and Linux Builds”The release workflow builds these on GitHub’s Windows and Linux machines, for x64 and Arm:
- Windows: one NSIS installer per chip (
-win-x64.exe,-win-arm64.exe). It is not code-signed, so SmartScreen warns on first launch (“More info” > “Run anyway”). - Linux: an AppImage and a
.debper chip. Mark the AppImage executable (chmod +x) before opening it.
Build them on the matching system. On a Mac the last packaging step needs Rosetta, because electron-builder’s NSIS and AppImage tools are Intel-only.
Closing the window only hides it, so scheduled backups and the Local API keep running. On a Mac the Dock icon brings it back; on Windows and Linux the tray icon does (electron/tray.ts), and its menu quits the app. Opening the app again also brings back the running window, as only one copy runs at a time. Some Linux desktops (GNOME without the AppIndicator extension) hide tray icons; there, open the app again from the launcher.
Mobile Refresh
Section titled “Mobile Refresh”Use this whenever web assets, native icons, or Capacitor configuration change:
pnpm run mobile:refreshThat runs:
pnpm run buildpnpm exec cap sync iospnpm exec cap sync androidClean Reinstall On Simulators
Section titled “Clean Reinstall On Simulators”iOS:
xcrun simctl uninstall booted com.vaultedmoney.app || truepnpm exec cap open iosThen in Xcode:
- Product > Clean Build Folder
- Product > Run
Android:
adb uninstall com.vaultedmoney.app || truecd android./gradlew cleanpnpm exec cap open androidThen in Android Studio:
- Let Gradle sync.
- Run the
apptarget again.
Use the clean reinstall flow after icon updates. iOS and Android can cache launcher assets aggressively.
GitHub Release Assets
Section titled “GitHub Release Assets”Publishing a GitHub release keeps GitHub’s default source ZIP/TAR assets and also uploads:
- macOS Electron DMGs (Apple silicon and Intel), signed with the Developer ID and notarized by Apple
- Windows installers (x64 and Arm; unsigned)
- Linux AppImage and .deb packages (x64 and arm64)
- Android APK, signed with the GitHub release key (installs next to the Google Play copy)
- unsigned iOS simulator app ZIP
- the Claude Desktop extension and the store screenshots ZIP
SHA256SUMS.txt, a checksum for every file above
The iOS artifact is a simulator build. A device-installable IPA requires Apple signing certificates and provisioning profiles.
Every built file also gets a GitHub build attestation, a signed record that this repository’s release workflow built it. Anyone can check a download with:
gh attestation verify <downloaded-file> -R nrajesh/vaulted.moneyThe user-facing steps for every system are in Check your download.
Signing the macOS DMGs in CI
Section titled “Signing the macOS DMGs in CI”The DMG job runs in the protected release environment and stops if a signing secret is missing, so an unsigned DMG is never published. electron-builder signs and notarizes each app and signs each DMG ("dmg": { "sign": true }); scripts/notarize-dmg.cjs then notarizes the DMGs and staples Apple’s ticket to them, so a downloaded DMG passes Gatekeeper even offline. After the build the job checks that both apps and both DMGs are signed, notarized and stapled.
One-time setup:
-
In Keychain Access → My Certificates, right-click Developer ID Application: … → Export, and save it as
certificate.p12with a password. -
Copy the certificate as text. A
.p12is a binary file, and GitHub secrets only take text, so convert it with base64 (this puts the text on the clipboard):[!TIP] In Terminal, in the folder where you saved the certificate:
Terminal window base64 -i certificate.p12 | pbcopyPaste the result as the
CSC_LINKsecret. The.p8key file is already text: open it in a text editor and paste all of it asAPPLE_API_KEY. -
In App Store Connect → Users and Access → Integrations → App Store Connect API, generate a team key with the Developer role. Download the
.p8straight away (Apple offers it only once), and note its Key ID and the Issuer ID. -
In GitHub → Settings → Environments →
release:-
Required reviewers: the owner, so the job waits for approval and nothing else can use the secrets.
-
Deployment branches and tags: a branch rule for
main(manual runs) and a tag rule forv*(releases run on their tag). Av*rule added as a branch does not match tags, and the release job is then refused. -
Secrets:
Secret Value CSC_LINKThe certificate as text, from step 2 CSC_KEY_PASSWORDThe password chosen when exporting the .p12APPLE_API_KEYThe whole text of the API key file ( AuthKey_….p8)APPLE_API_KEY_IDThat key’s Key ID APPLE_API_ISSUERThe Issuer ID shown above the keys list
-
-
Delete
certificate.p12from your Mac. Keep the.p8somewhere safe if you want a copy.
[!NOTE] What expires, and what happens if it is not renewed
Item Renew What to do If it is not renewed Developer ID certificate Every 5 years Create a new one in your Apple Developer account, then replace CSC_LINKandCSC_KEY_PASSWORDSigning fails, so the release’s macOS job errors and no DMG is published. Apps people already installed keep working. Apple Developer Program membership Every year Keep the membership paid Apple rejects notarization, so the macOS job errors and no DMG is published. The iPhone app is also removed from sale on the App Store until it is renewed. App Store Connect API key Never expires Replace only if it leaks: revoke it in App Store Connect and update the three APPLE_API_*secretsNothing while it stays valid. A revoked key makes notarization fail, as above. When the macOS job fails, the other platforms are still published, but the release has no macOS download and no
SHA256SUMS.txt(that job waits for every platform). Nothing unsigned is ever uploaded. After fixing the secret, run Release Assets again with the release’s tag to add the missing files.
Checking the setup without a release: Actions → Release Assets → Run workflow, choose main, tick Dry run and leave the tag empty. Only the macOS, Android and Microsoft Store jobs run: macOS and Android build and sign (macOS also notarizes and checks the apps and DMGs), the Store job builds and checks its packages (see MICROSOFT_STORE.md), nothing is uploaded to a release, and the macOS and Android jobs write “Dry run passed” in the run summary. Run it after setting up the secrets, after replacing any of them, and whenever a release fails at signing.
Signing the Android APK in CI
Section titled “Signing the Android APK in CI”Google Play signs the copies it delivers (Play App Signing), so the APK attached to GitHub releases needs a key of its own. The Android job signs it with a GitHub release key kept in the protected release environment, and stops if a secret is missing, so an unsigned APK is never published. It checks the signature and shows the key’s fingerprint in the run summary.
The GitHub copy installs as its own app (com.vaultedmoney.android.github), next to a copy from Google Play. The two keep separate data; to move, make a backup in one and restore it in the other. Local builds and the Play bundle are unchanged.
One-time setup (about 10 minutes):
-
Create the key. In Terminal, in a folder outside the repository:
Terminal window "/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/keytool" -genkeypair -v -keystore vaulted-money-github-release.jks -alias github-release -keyalg RSA -keysize 4096 -validity 10000It asks for a password (use a long one) and for your name and organisation, which anyone can read in the APK.
-
Copy the key as text:
[!TIP]
Terminal window base64 -i vaulted-money-github-release.jks | pbcopyPaste the result as the
ANDROID_KEYSTORE_BASE64secret. -
In GitHub → Settings → Environments →
release→ Secrets, add:Secret Value ANDROID_KEYSTORE_BASE64The key as text, from step 2 ANDROID_KEYSTORE_PASSWORDThe password from step 1 ANDROID_KEY_ALIASgithub-releaseANDROID_KEY_PASSWORDThe same password as in step 1 -
Back up
vaulted-money-github-release.jksand its password offline (for example in your password manager), then delete the file from the folder. If the key is lost, people who installed the GitHub APK can’t update it: they would have to back up, uninstall and reinstall. -
Run the dry run above. The Android job’s summary shows the key’s SHA-256 fingerprint; add it to the release notes so people can check their APK.
[!NOTE] Google is introducing developer verification for apps installed outside Google Play on certified Android devices (from 2026 in some countries, then worldwide). If it applies, register
com.vaultedmoney.android.githuband this key’s fingerprint under your verified developer account in the Android Developer Console. (To check when it reaches the Netherlands and your buyers’ countries.)
| Item | Renew | If it is lost or expires |
|---|---|---|
| GitHub release key | Never (valid ~27 years) | The Android job fails and no APK is published. With a new key, existing GitHub installs can’t update: they must reinstall. |
Time limits on release jobs
Section titled “Time limits on release jobs”Each job in the release workflow stops itself if it runs far longer than usual, so a stalled download fails in minutes instead of hanging for GitHub’s default of 6 hours. A job that hits its limit fails with “The job has exceeded the maximum execution time”; run it again (Re-run failed jobs).
| Job | Usual time | Limit |
|---|---|---|
| Electron DMG (macOS) | 9 min | 90 min |
| Electron Windows | 5 min | 30 min |
| Electron Linux | 3 min | 20 min |
| Android APK | 3 min | 20 min |
| iOS Simulator App | 4–5 min | 30 min |
| Claude Desktop extension | under 1 | 10 min |
| Store screenshots | 10–11 min | 45 min |
| Checksums | under 1 | 10 min |
The macOS limit is the most generous because the job builds, signs and notarizes two apps (Apple silicon and Intel) and then their two DMGs, one after the other, and each waits for Apple’s notarization, which is usually quick but can take much longer when Apple is busy. If it keeps timing out at notarization, check Apple’s system status before raising the limit.
Every “Install dependencies” step also has its own 10-minute limit; installs normally take under a minute. When you change a limit, change it in .github/workflows/release.yml and in this table.
Troubleshooting
Section titled “Troubleshooting”If pnpm install fails:
rm -rf node_modulespnpm installIf Electron fails because port 8081 is busy, stop the other process and rerun:
pnpm run electron:dev