14c880123c
Expo app with dashboard, time clock, invoices, and settings — native tabs, glass UI, theme-aware components, and iOS Live Activities. Co-authored-by: Cursor <cursoragent@cursor.com>
84 lines
2.2 KiB
Markdown
84 lines
2.2 KiB
Markdown
# beenvoice Mobile
|
|
|
|
Expo companion app for [beenvoice](../beenvoice) — dashboard, time clock, invoices, and account settings.
|
|
|
|
## Prerequisites
|
|
|
|
- [Bun](https://bun.sh) 1.3+
|
|
- beenvoice server running (see `../beenvoice/README.md`)
|
|
- iOS development build for Live Activities (`expo-widgets`)
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
cd beenvoice-app
|
|
bun install
|
|
cp .env.example .env
|
|
```
|
|
|
|
Edit `.env` and set your API URL:
|
|
|
|
```env
|
|
# Simulator
|
|
EXPO_PUBLIC_API_URL=http://localhost:3000
|
|
|
|
# Physical iPhone (use your Mac's LAN IP)
|
|
EXPO_PUBLIC_API_URL=http://192.168.1.42:3000
|
|
```
|
|
|
|
The beenvoice server must have the Expo auth plugin enabled (`@better-auth/expo` in `beenvoice/src/lib/auth.ts`).
|
|
|
|
## Run
|
|
|
|
```bash
|
|
# Terminal 1 — API server
|
|
cd ../beenvoice && bun run dev
|
|
|
|
# Terminal 2 — mobile app (development build)
|
|
cd beenvoice-app
|
|
bun run ios
|
|
```
|
|
|
|
This uses port **8082** for Metro so it does not collide with other Expo projects on 8081.
|
|
|
|
If you already built the app and only need Metro:
|
|
|
|
```bash
|
|
bun run start -- --clear
|
|
```
|
|
|
|
Then open the **beenvoice** app on the simulator (not Expo Go).
|
|
|
|
Live Activities require a native build (`bun run ios`). They do not work in Expo Go.
|
|
|
|
After changing `assets/beenvoice.icon`, rebuild iOS:
|
|
|
|
```bash
|
|
bunx expo prebuild --platform ios --clean
|
|
bun run ios
|
|
```
|
|
|
|
### Troubleshooting `PlatformConstants` / `[runtime not ready]`
|
|
|
|
Usually one of:
|
|
|
|
1. **Wrong Metro bundler** — another project's dev server is on the same port. Stop it or use `--port 8082`.
|
|
2. **Stale native build** — after adding native modules, rebuild:
|
|
```bash
|
|
bunx expo prebuild --platform ios --clean
|
|
bun run ios
|
|
```
|
|
3. **Expo Go** — native modules like widgets need the custom dev build from `bun run ios`, not Expo Go.
|
|
|
|
## Features
|
|
|
|
- **Auth** — sign in, register, forgot password, reset password; multiple saved accounts
|
|
- **Dashboard** — revenue, pending, overdue, recent invoices
|
|
- **Timer** — clock in/out with client, invoice, and hourly rate; iOS Live Activity (dev build)
|
|
- **Invoices** — list, filter by status, tap to update status
|
|
- **Settings** — profile, accounts, theme (system/light/dark), server URL, sign out
|
|
|
|
## Deep links
|
|
|
|
- `beenvoice://reset-password?token=...` — open reset password screen with token prefilled
|