pwa and mobile client

This commit is contained in:
azykov@mail.ru
2026-09-29 15:55:25 +03:00
parent 657009bd6c
commit 1935acf2ff
96 changed files with 8370 additions and 58 deletions
+16
View File
@@ -26,9 +26,25 @@ pnpm --filter @cardy/server-be dev # API on 127.0.0.1:10002 (tsx watch)
pnpm --filter @cardy/server-fe dev # admin UI on :10001
```
```bash
pnpm --filter @cardy/mobile-client start # PWA: build + vite preview on :10003 (service worker needs a build)
```
Production-like: `pnpm --filter @cardy/server-be build && pnpm --filter @cardy/server-be start`,
`pnpm --filter @cardy/server-fe start` (build + `vite preview` on :10001).
The mobile client dev server (`pnpm --filter @cardy/mobile-client dev`) works locally at
`http://localhost:10003/m/`; behind the proxy use `start`.
## Android app
```bash
pnpm --filter @cardy/mobile-client build:android # web build for Capacitor + cap sync
```
Then open `mobile-client/android` in Android Studio (or `gradlew assembleDebug` there) to build the APK.
The app registers `cardy://login?...` links (key QR codes) and asks for camera access when scanning.
`server-be` listens on `127.0.0.1` by default because `/admin/*` trusts `Remote-Email`.
If the proxy runs on another machine, set `HOST` and `ADMIN_PROXY_SECRET`, and make the proxy add
`X-Cardy-Proxy-Secret` on the `/api/admin` route.