Setup
Prerequisites
- Ruby 3.4+ (via rbenv)
- Node.js 20+
- PostgreSQL 16
- Xcode (for iOS simulator)
- Expo CLI
Backend
bash
cd backend
bundle install
bin/rails db:create db:migrate db:seed
bin/rails server -b 0.0.0.0 -p 3000Environment Variables
Create backend/.env:
DATABASE_URL=postgres://localhost/softly_development
SECRET_KEY_BASE=your_secret_key
ANTHROPIC_API_KEY=sk-ant-...
DEEPGRAM_API_KEY=...
NEW_RELIC_LICENSE_KEY=... # Optional, for APM
REVENUECAT_API_KEY=sk_... # Secret key for subscription syncMobile
bash
cd mobile
npm install
npx expo startEnvironment Variables
Create mobile/.env:
EXPO_PUBLIC_API_URL=http://localhost:3000
EXPO_PUBLIC_REVENUECAT_API_KEY=appl_...Dev Build (for native modules)
RevenueCat and push notifications require a dev build:
bash
npx expo run:ios
npx expo run:androidRunning Tests
bash
# Backend
cd backend && bundle exec rspec
# Mobile
cd mobile && npm testCI/CD
Both repos have GitHub Actions CI:
- Backend: Security scan + RuboCop + RSpec + coverage check (80% min)
- Mobile: TypeScript check + Jest + coverage (30% min)