HomeCare
Complete Bun-native monorepo foundation for a home-care platform.
Runtime apps
apps/api— Bun + Elysia REST/WebSocket APIapps/patient— Expo/React Native patient appapps/caregiver— Expo/React Native caregiver app
Shared packages
packages/api-client— Elysia Eden clientpackages/contracts— Zod contractspackages/db— Drizzle/PostgreSQLpackages/auth— Better Auth boundarypackages/permissions— Cerbos boundarypackages/realtime— WebSocket event contractspackages/storage— S3/MinIOpackages/domain— domain types
Development infrastructure
The main Compose stack includes:
- PostgreSQL + PostGIS
- Redis
- NATS JetStream
- Meilisearch
- MinIO + automatic bucket initialization
- ClickHouse
- Cerbos
- Valhalla
- LiveKit
- Coturn
- OpenTelemetry Collector
- Prometheus
- Grafana
- Jaeger
- Loki
Temporal is included separately under infra/temporal/ because it is a substantial workflow subsystem with its own persistence. Start it only when you actually need durable workflows.
Start
cp .env.example .env
pnpm install
./scripts/dev-infra.sh
pnpm devOptional Temporal:
./scripts/dev-temporal.shStop infrastructure:
./scripts/stop-infra.sh
./scripts/stop-temporal.shMobile
The caregiver app already includes the Expo modules needed as a starting point for:
- background location
- camera
- notifications
- secure storage
- SQLite
Production iOS/Android configuration still needs real bundle IDs, signing, APNs/FCM credentials, background-location configuration, CallKit/Android Telecom integration, and your privacy/consent policies.
WebRTC
LiveKit is configured for local development and Coturn is included as a separate TURN service. The LiveKit and Coturn networking configuration is intentionally development-oriented.
For production, put LiveKit/TURN on appropriate publicly reachable infrastructure and configure TLS, public IPs, firewall rules, DNS, and a proper relay port range.
Recording
LiveKit recording/Egress should write to MinIO/S3. Add the Egress service/config when implementing recording. Keep recording metadata and consent state in PostgreSQL; authorize access through Cerbos and issue short-lived signed storage URLs.
Security
All credentials in .env.example are development credentials. Replace them before any shared or production deployment.