A React Native Expo app with Google authentication and Supabase integration for tourist safety features.
- 🔐 Google OAuth authentication
- 📱 Modern, responsive UI design with Expo Router
- 🗄️ Supabase database integration
- 🛡️ User session management
- 📊 User profile display
- ⚡ TypeScript support
- 🚀 Bun package manager
Before running this app, you'll need:
- Bun (latest version) -
curl -fsSL https://bun.sh/install | bash - Expo CLI (
bun install -g @expo/cli) - Supabase account and project
- Google Cloud Console project with OAuth credentials
bun install- Create a new project at supabase.com
- Go to Settings > API to get your project URL and anon key
- Enable Google authentication in Authentication > Providers
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Google+ API
- Create OAuth 2.0 credentials:
- For Web: Add your domain
- For iOS: Add your bundle identifier
- For Android: Add your package name and SHA-1 fingerprint
Update the app.json file with your actual credentials in the extra section:
{
"expo": {
"extra": {
"supabaseUrl": "your_actual_supabase_url",
"supabaseAnonKey": "your_actual_supabase_anon_key",
"googleWebClientId": "your_actual_google_web_client_id",
"googleIosClientId": "your_actual_google_ios_client_id",
"googleAndroidClientId": "your_actual_google_android_client_id"
}
}
}bun startThis will start the Expo development server. You can then:
- Press
ito run on iOS simulator - Press
ato run on Android emulator - Scan the QR code with Expo Go app on your device
# Start with tunnel (for testing on physical device)
bunx expo start --tunnel
# Start with clear cache
bunx expo start --clear├── app/
│ ├── _layout.tsx # Root layout with Expo Router
│ ├── index.tsx # Entry point (redirects to register)
│ ├── login.tsx # Login screen
│ ├── register.tsx # Registration screen
│ └── success.tsx # Success screen after auth
├── lib/
│ ├── supabase.ts # Supabase client configuration
│ └── authService.ts # Authentication service
├── app.json # Expo configuration
├── package.json # Dependencies
├── tsconfig.json # TypeScript configuration
└── babel.config.js # Babel configuration
- Index Screen: Redirects to registration
- Registration Screen: Users can sign up with Google
- Login Screen: Existing users can sign in with Google
- Success Screen: Shows user information and app features after successful authentication
- React Native - Mobile app framework
- Expo Router - File-based routing
- TypeScript - Type safety
- Bun - Fast package manager and runtime
- Supabase - Backend as a Service
- Google OAuth - Authentication provider
- Google Sign-In not working: Ensure all client IDs are correctly configured in app.json
- Supabase connection issues: Verify your URL and anon key in app.json
- Build errors: Make sure all dependencies are installed with
bun install - TypeScript errors: Check tsconfig.json configuration
- Check the Expo documentation
- Review Supabase documentation
- Check Google Sign-In documentation
- Bun documentation
This project is licensed under the MIT License.