Cross-platform self-service frontend monorepo for Lightbridge/GIS use cases.
It provides a single codebase for web and mobile experiences, with shared UI primitives, API hooks, i18n, and runtime configuration.
This repository exists to:
- ship a self-service portal quickly across web, Android, and iOS
- keep UI, API access, auth, and translations consistent in one monorepo
- separate concerns clearly:
- app/view routing in
apps/self-service - reusable UI in
packages/ui - data access and sync hooks in
packages/hooks - generated REST client in
packages/api-rest - native helpers in
packages/api-native - translations in
packages/i18n
- app/view routing in
- support runtime configuration on web (no rebuild needed per environment)
- Expo + Expo Router
- React / React Native / React Native Web
- Tailwind (NativeWind) + CVA-based UI variants
- TanStack Query
- Keycloak-based auth flow
- PNPM workspaces monorepo
apps/
self-service/ # Expo app (routes, screens, views)
packages/
ui/ # UI primitives
hooks/ # Query/service hooks
api-rest/ # Generated REST client (Hey API)
api-native/ # Native wrappers
i18n/ # i18n provider + resources
openapi/
backend.yaml # OpenAPI source for api-rest codegen
.github/workflows/
docker-image.yml # Build + push container to GHCR
Dockerfile # Production web image build
compose.yml # Local Keycloak helper
- Node.js 22+
- PNPM (via Corepack recommended)
- Docker (for container build/run)
corepack enable
pnpm installThe app expects these variables:
EXPO_PUBLIC_BACKEND_URLEXPO_PUBLIC_KEYCLOAK_ISSUEREXPO_PUBLIC_KEYCLOAK_CLIENT_IDEXPO_PUBLIC_KEYCLOAK_SCHEME
Create apps/self-service/.env (or export in shell) with your values.
Example:
EXPO_PUBLIC_BACKEND_URL=http://localhost:8080
EXPO_PUBLIC_KEYCLOAK_ISSUER=http://localhost:13444/realms/vymalo-wh-01
EXPO_PUBLIC_KEYCLOAK_CLIENT_ID=self-service
EXPO_PUBLIC_KEYCLOAK_SCHEME=self-servicedocker compose up keycloak-26Keycloak will run on http://localhost:13444.
From repo root:
pnpm dev # Expo dev server
pnpm web # open web target
pnpm android # Android
pnpm ios # iOSThere is no dedicated unit/integration test suite configured yet. Current quality checks are:
pnpm lintRecommended local validation before merge:
- run
pnpm lint - run
pnpm weband verify login/navigation flows - verify backend connectivity and token-protected requests
This repo includes a production-ready web image:
- multi-stage build (
node:22-alpine->nginx:alpine) - generates REST client during image build
- exports static web assets via Expo
- serves with Nginx SPA fallback
- generates
/config.jsonat container startup from env vars
Build locally:
docker build -t converse-frontends:local -f Dockerfile .Run locally:
docker run --rm -p 8080:80 \
-e EXPO_PUBLIC_BACKEND_URL=http://localhost:8080 \
-e EXPO_PUBLIC_KEYCLOAK_ISSUER=http://localhost:13444/realms/vymalo-wh-01 \
-e EXPO_PUBLIC_KEYCLOAK_CLIENT_ID=self-service \
-e EXPO_PUBLIC_KEYCLOAK_SCHEME=self-service \
converse-frontends:localThen open http://localhost:8080.
GitHub Actions workflow: .github/workflows/docker-image.yml
It will:
- trigger on pushes to
main/master, tagsv*, and manual dispatch - build the Docker image with Buildx
- push to GitHub Container Registry:
ghcr.io/<owner>/<repo>- tags: branch, tag, sha, and
lateston default branch
This frontend integrates cleanly with standard enterprise platform components:
- Keycloak: OIDC issuer/client configuration already modeled in runtime config
- OpenAPI-first backends:
packages/api-restis generated fromopenapi/backend.yaml - Kubernetes/OpenShift: image is stateless and configurable via environment variables
- GitHub ecosystem: native GHCR publish pipeline included
- API gateway setups (Kong, NGINX Ingress, Traefik): served as static SPA behind reverse proxy
- Dev/native: uses
EXPO_PUBLIC_*environment variables - Web production: app fetches
/config.jsonat runtime - Container startup script renders
config.jsonfrom template, so the same image can run in different environments
- Monorepo uses PNPM workspaces and hoisted node linker (
.npmrc) - API client code is generated via:
pnpm --dir packages/api-rest codegen- Follow project conventions in
AGENTS.mdfor architecture and coding rules.