Skip to content

rocicorp/zslack

Repository files navigation

zslack

An Expo app (iOS/Android/Web) using Zero for realtime sync, with a Hono API, Better Auth, and Drizzle ORM (PostgreSQL). Shared types, schema, queries, and mutators live in the shared workspace.

demo of expo with android, ios, and web

Running

Prerequisites

  • Node and bun
  • Docker (for PostgreSQL)

1) Install dependencies

bun i

2) Create an .env

cp .env.sample .env

3) Start PostgreSQL (Docker)

This brings up Postgres with WAL enabled and runs migrations from migrations/.

bun run dev:db-up

4) Start the Zero cache server (separate terminal)

This uses the Zero schema generated from Drizzle via shared/src/zero-schema.gen.ts.

bun run dev:zero-cache

5) Start the API server (separate terminal)

Hono server on port 3000. Requires DATABASE_URL in .env.

bun run dev:api

6) Start the Expo app (separate terminal)

Choose one of the following:

bun run dev:expo      # Expo dev menu
bun run ios           # iOS simulator
bun run android       # Android emulator
bun run web           # Expo for Web

Note: URLs are centralized in lib/config.ts with defaults for local development:

  • Zero cache: http://localhost:4848
  • API: http://localhost:3000

For production builds (TestFlight/App Store), configure URLs in eas.json under each build profile.

If testing on a physical device in development, update the hardcoded defaults in lib/config.ts to your machine's LAN IP.

Common utilities:

bun run dev:db-down   # Stop Postgres
bun run dev:clean     # Remove local replica/db volume (destructive)

Deploying to TestFlight

This project is configured with EAS Build for iOS deployments.

1) Configure production URLs

Update eas.json with your production server URLs:

"production": {
  "autoIncrement": true,
  "env": {
    "EXPO_PUBLIC_ZERO_CACHE_URL": "https://your-production-zero-cache.com",
    "EXPO_PUBLIC_API_URL": "https://your-production-api.com"
  }
}

2) Build for iOS

bunx eas-cli build --platform ios --profile production

3) Submit to TestFlight

bunx eas-cli submit --platform ios --latest

The build number will auto-increment on each production build. Once submitted, the build will appear in App Store Connect under TestFlight within 5-15 minutes.

About

Slack-like app built with Zero/Expo/React Native.

Topics

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •