GeoKenya - A React Native app showcasing Kenya's administrative divisions (wards, counties, constituencies) with offline geospatial data, Material You theming, and Android-only support. Built with Expo, React Native Paper, and SQLite with Spatialite.
# GeoKenya
GeoKenya is a pnpm + Turborepo monorepo with an offline-first Expo mobile app, a TanStack Start landing site, and a Cloudflare Workers sync API.
| Package | Path | Purpose |
|---------|------|---------|
| `mobile` | `apps/mobile` | Expo React Native app |
| `web` | `apps/web` | Landing page, privacy policy, sync server |
**All mobile operations run 100% locally** — no internet required after install. The app uses SQLite with SpatiaLite for offline geospatial data.
**Note:** Android-only for now. iOS is not yet implemented.
## Prerequisites
- Node.js >= 18
- pnpm 9
- Android Studio (for native mobile builds)
## Getting Started
```bash
git clone
github.com
cd geo-kenya
pnpm install
```
### Mobile app
```bash
pnpm --filter mobile dev
pnpm --filter mobile run:android
```
### Web (landing + sync API)
```bash
pnpm --filter web dev
```
Runs at `
localhost`. Privacy policy: `/privacy`. Sync API: `/api/sync/events`.
Set `EXPO_PUBLIC_WEB_URL` and `EXPO_PUBLIC_SYNC_API_URL` in `apps/mobile/.env` to point the mobile app at your deployed web worker.
### Deploy web to Cloudflare
```bash
# once — create D1 and put the database_id into apps/web/wrangler.jsonc
wrangler d1 create geo-kenya-db
pnpm --filter web db:migrate:remote
pnpm --filter web secrets:auth
pnpm --filter web secrets:sync
# deploy (builds then wrangler deploy with dist/server/wrangler.json)
pnpm deploy:web
```
For Cloudflare Workers Builds (dashboard), do **not** run `npx wrangler deploy` from the monorepo root. Use:
- **Build command:** `pnpm --filter web build`
- **Deploy command:** `pnpm --filter web exec wrangler deploy --config dist/server/wrangler.json`
Set production secrets and update `BETTER_AUTH_URL` / `CORS_ORIGINS` (and build-time `VITE_API_URL`) to your worker URL.
## Building the Application
**Important**: This application requires a native build due to its custom Expo modules and SQLite with Spatialite extensions. The development s …