Local development and production run independently:
| Environment | Web app | Relayer | Deploy source |
|---|---|---|---|
| Local | http://localhost:5173 |
http://localhost:8787 |
Current working tree |
| Production | https://66.42.115.38.nip.io |
Same HTTPS origin | GitHub main |
In two terminals, start the local stack:
npm run dev:relayer
npm run dev:webThe local web app automatically calls the local relayer. Production builds
automatically call their own HTTPS origin. Set VITE_RELAYER_URL in
app/.env.local only when intentionally overriding that behavior.
The local relayer reads the repo-root .env. To keep development data separate
from production while using the same Atlas cluster, use a different local
database name:
MONGODB_DB=accountabilibuddy-devDo development on a feature branch:
git switch -c feature/my-change
npm run checkPush feature branches freely; they do not deploy. Production deploys only when
changes reach main:
git switch main
git merge --ff-only feature/my-change
git push origin mainThe server checks GitHub main every minute, installs locked dependencies,
typechecks the relayer, builds the web app, and restarts the relayer. Production
secrets and the oracle key remain server-local under /etc/accountabilibuddy.
The betting flow now has an iMessage-oriented client scaffold under:
ios/AccountabiliBuddyMessages/BetModels.swiftios/AccountabiliBuddyMessages/RelayerClient.swiftios/AccountabiliBuddyMessages/BetMessageViewModel.swiftios/AccountabiliBuddyMessages/BetMessageRootView.swiftios/AccountabiliBuddyMessages/MessagesViewController.swift
The relayer now exposes iMessage helper routes:
GET /imessage/bets/:id— compact bet-card payload for message renderingGET /imessage/deeplink?betId=...— canonical deep-link for a betGET /imessage/deeplink?url=...— parse a deep-link back tobetId
The repo now includes a ready-to-open project:
ios/AccountabiliBuddy.xcodeproj- App target:
AccountabiliBuddy - iMessage extension target:
AccountabiliBuddyMessages
Open it directly in Xcode and run the app/extension pair:
open ios/AccountabiliBuddy.xcodeprojCLI validation commands:
xcodebuild -list -project ios/AccountabiliBuddy.xcodeproj
xcodebuild -project ios/AccountabiliBuddy.xcodeproj -target AccountabiliBuddy -configuration Debug -sdk iphonesimulator CODE_SIGNING_ALLOWED=NO buildInside the iMessage UI, set:
- Relayer URL (for local:
http://127.0.0.1:8787) - Bearer token (same auth token used by the web app)
- Default group id (target chat group in relayer Mongo data)
Optional relayer deep-link base can be customized with:
IMESSAGE_DEEP_LINK_BASE=accountabilibuddy://bet- Start relayer + web app:
npm run dev:relayernpm run dev:web
- In web, create/login and create a group so you have a valid group id.
- In iMessage extension, create a bet and insert the card into a conversation.
- Tap the sent message; the extension should resolve
betIdand load card state from/imessage/bets/:id. - Use Accept or Vote actions; card refresh should reflect updated relayer state.