Documind is a pnpm monorepo with two active apps:
apps/mobile: Expo / React Native / TypeScript clientapps/api: Bun / Hono / TypeScript API
.
βββ apps/
β βββ api/ # Bun + Hono backend
β βββ mobile/ # Expo / React Native app
βββ packages/ # shared packages (reserved)
βββ package.json # root scripts for the monorepo
βββ pnpm-workspace.yaml
- pnpm manages the monorepo, installs dependencies, and runs workspace scripts.
- Bun is the runtime used by
apps/api. - In practice: you install everything from the repo root with
pnpm install, and pnpm delegates API scripts to Bun where needed.
- Node.js 18+
- pnpm 10+
- Bun 1.x
- iOS Simulator / Android Studio if you want native Expo targets
From the repository root:
pnpm installTo verify the workspace layout detected by pnpm:
pnpm --recursive list --depth -1pnpm mobile:start
pnpm mobile:android
pnpm mobile:ios
pnpm mobile:web
pnpm mobile:typecheck
pnpm mobile:configConvenience aliases kept at root:
pnpm start
pnpm android
pnpm ios
pnpm webThese aliases map to the mobile app.
pnpm api:dev
pnpm api:start
pnpm api:typecheckThe mobile app stays outside Docker. Docker support is only for the API and PostgreSQL.
cp apps/api/.env.example apps/api/.env
pnpm docker:upHelpful commands:
pnpm docker:logs
pnpm docker:downThis starts:
postgresonlocalhost:5432with a persistent Docker volumeapionlocalhost:3000, connected to thepostgresservice by Compose hostname
On a brand new Postgres Docker volume, Compose now runs docker/postgres/init/001-documind-schema.sql automatically to create the local users and documents tables the API queries expect.
When running the API inside Docker, keep DATABASE_URL pointed at postgres in apps/api/.env. If you run the API directly on your host with pnpm api:dev, switch to the commented localhost example instead.
If you already have an existing postgres-data volume, the init script will not rerun automatically. Recreate the volume (for example with docker compose down -v) if you need the bootstrap SQL applied to a fresh local database.
pnpm typecheck
pnpm validatepnpm typecheckruns the mobile and API typechecks.pnpm validateruns both typechecks plus a lightweight Expo config validation.
From the repo root:
pnpm mobile:startpnpm mobile:start (and the mobile:ios, mobile:android, mobile:web variants)
automatically detects your current LAN IPv4 and writes
apps/mobile/.env.development.local with EXPO_PUBLIC_API_URL=http://<lan-ip>:<port>
for local development. This keeps physical devices like iPhones pointed at the
current machine without manually editing env files after network changes.
Or use a platform-specific target:
pnpm mobile:android
pnpm mobile:ios
pnpm mobile:webYou can also run the workspace directly:
pnpm --filter @documind/mobile startThe mobile app environment files live under apps/mobile/.
- Example template:
apps/mobile/.env.example - Local real env file:
apps/mobile/.env(local only, not committed)
Typical setup:
cp apps/mobile/.env.example apps/mobile/.envThen fill in the Expo public variables locally:
EXPO_PUBLIC_API_URL(optional; if unset, the start scripts auto-generate a development value)EXPO_PUBLIC_GOOGLE_ANDROID_IDEXPO_PUBLIC_GOOGLE_IOS_IDEXPO_PUBLIC_GOOGLE_WEB_IDEXPO_PUBLIC_GITHUB_CLIENT_IDEXPO_PUBLIC_GOOGLE_REDIRECT_URI
Notes:
- The generated development file is
apps/mobile/.env.development.localand is ignored by git. - Any explicit
EXPO_PUBLIC_API_URLyou set in your shell or local env files still wins; the auto-generated file is removed in that case. EXPO_PUBLIC_API_PORTcan still be set locally if your API does not run on port3000.
From the repo root:
pnpm api:devOr run the Bun entrypoint without hot reload:
pnpm api:startDirect workspace form:
pnpm --filter @documind/api devThe API environment files live under apps/api/.
- Example template:
apps/api/.env.example - Local real env file:
apps/api/.env(local only, not committed)
Typical setup:
cp apps/api/.env.example apps/api/.envThen fill in the required values locally. Do not commit secrets.
From the repo root:
pnpm typecheck
pnpm mobile:configFor the API, a lightweight runtime validation can be done by starting it briefly with Bun from apps/api using the local .env.
- Expo SDK 54
- React Native 0.81
- TypeScript 5.9
- Hono
- Bun
- pnpm workspaces
This project is open source and available under the MIT License.