Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
pull_request:
push:
branches:
- main

jobs:
validate:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Typecheck
run: bun run typecheck

- name: Backend tests
run: bun run backend:test
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ In `frontend/.env.local` if needed:
- `VITE_API_BASE_URL`
- `VITE_SOLANA_RPC_URL`

In `mobile/.env` if needed:

- `EXPO_PUBLIC_API_BASE_URL`
- `EXPO_PUBLIC_SOLANA_RPC_URL`
- `EXPO_PUBLIC_MWA_CHAIN`
- `EXPO_PUBLIC_APP_NAME`
- `EXPO_PUBLIC_APP_URI`
- `EXPO_PUBLIC_APP_ICON_URI`
- `EXPO_PUBLIC_EXPO_PROJECT_ID`

## Notes On State

- Message payloads are still ephemeral and Redis-backed
Expand All @@ -146,11 +156,14 @@ In `frontend/.env.local` if needed:
## Validation

```bash
bun run backend:typecheck
bun run typecheck
bun run backend:test
cd frontend && bun run lint && bun run build
```

Mobile-specific build and device instructions live in
[`mobile/README.md`](/Users/shubbu/DEV/osc/enmarch/mobile/README.md).

## Resources

- [Pitch Deck](https://canva.link/1exbqmsqvqn4g8w)
Expand Down
101 changes: 101 additions & 0 deletions mobile/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Mobile

Android-only Expo client for Enmarch. The mobile app uses Mobile Wallet Adapter
(MWA) for wallet auth, derives the messaging identity on-device, and talks to
the same backend relay as the web client.

## Prerequisites

- Bun
- Android Studio / Android SDK for local builds
- A compatible Solana wallet on the device
- A reachable backend URL

## Environment

Create `mobile/.env` with the values the device should use at build time:

```env
EXPO_PUBLIC_API_BASE_URL=http://192.168.1.23:3001
EXPO_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com
EXPO_PUBLIC_MWA_CHAIN=solana:devnet
EXPO_PUBLIC_APP_NAME=Enmarch
EXPO_PUBLIC_APP_URI=https://enmarch.app
EXPO_PUBLIC_APP_ICON_URI=/icon.png
EXPO_PUBLIC_EXPO_PROJECT_ID=
```

Notes:

- `EXPO_PUBLIC_API_BASE_URL` is baked into native builds. Rebuild the APK after
changing it.
- `10.0.2.2` only works on the Android emulator. For a physical device, use
your machine's LAN IP or an HTTPS tunnel.
- The backend must expose both HTTP and WebSocket traffic on the same host.

## Run In Expo

From the repo root:

```bash
bun run mobile:start
```

For a dev-client session:

```bash
bun run mobile:start:dev-client
```

## Build For Android

Debug APK:

```bash
cd enmarch
rm -rf mobile/android/app/build mobile/android/app/.cxx mobile/android/.cxx
cd mobile/android
./gradlew assembleDebug
```

APK path:

- `enmarch/mobile/android/app/build/outputs/apk/debug/app-debug.apk`

Release APK:

```bash
cd enmarch
rm -rf mobile/android/app/build mobile/android/app/.cxx mobile/android/.cxx
cd mobile/android
./gradlew assembleRelease
```

APK path:

- `enmarch/mobile/android/app/build/outputs/apk/release/app-release.apk`

## Emulator

- Set `EXPO_PUBLIC_API_BASE_URL=http://10.0.2.2:3001` if the backend is running
on the same machine.
- Install an MWA-compatible wallet on the emulator before testing auth flows.

## Physical Device / Seeker

- Put the phone and dev machine on the same network, or expose the backend
through HTTPS.
- Set `EXPO_PUBLIC_API_BASE_URL` to the machine's LAN IP or tunnel URL.
- Ensure the wallet supports MWA.
- If using a Seeker or Android 11+ device, wallet discovery depends on the
`solana-wallet` package visibility query in the Android manifest.

## Invite Links

The app accepts invite deep links in both forms:

- `enmarch://invite/<url-encoded invite code>`
- `https://enmarch.app/invite/<url-encoded invite code>`

Shared invites include the deep link and the raw invite code so a recipient can
still paste the code manually if Android does not hand off the link.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"backend:test": "bun test ./backend/tests",
"backend:typecheck": "bunx tsc --project backend/tsconfig.json --noEmit",
"dev": "bun run backend:dev",
"frontend:typecheck": "bunx tsc --project frontend/tsconfig.app.json --noEmit",
"mobile:start": "cd mobile && bunx expo start",
"mobile:start:tunnel": "cd mobile && bunx expo start --tunnel",
"mobile:start:dev-client": "cd mobile && bunx expo start --dev-client",
Expand All @@ -20,7 +21,7 @@
"mobile:typecheck": "bunx tsc --project mobile/tsconfig.json --noEmit",
"start": "bun run backend:start",
"test": "bun run backend:test",
"typecheck": "bun run backend:typecheck"
"typecheck": "bun run backend:typecheck && bun run frontend:typecheck && bun run mobile:typecheck"
},
"devDependencies": {
"@types/bun": "latest",
Expand Down
Loading