This is a React Native Expo application for plant identification, care, and hydroponic gardening support with Supabase integration for backend services.
# Install dependencies
npm install
# Start the development server with a clean cache
npm run clean
# If you encounter persistent issues, use the reset command
npm run reset
If you encounter errors related to Expo or dependencies:
-
Clear cache and restart:
npm run clean
-
Reset the entire project:
npm run reset
-
Manual cache clearing:
- Remove the
.expo
folder - Remove
node_modules/.cache
- Run
npm install
again
- Remove the
-
Supabase connection issues:
- Verify your environment variables in
.env
- Check Supabase project status in the dashboard
- Try the connection test in the Profile tab
- Verify your environment variables in
To connect your Supabase account to this application:
-
Create a Supabase Account:
- Go to Supabase and sign up for an account
- Create a new project
-
Get Your API Keys:
- In your Supabase project dashboard, go to Project Settings > API
- Copy the "Project URL" and "anon public" key
-
Configure Environment Variables:
- Create or edit the
.env
file in the root of your project - Add the following variables:
EXPO_PUBLIC_SUPABASE_URL=your_project_url EXPO_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
- Create or edit the
-
Restart Your Development Server:
- Stop your current development server
- Run
npm run clean
to restart with a clean cache
-
Run Migrations:
- In the Supabase dashboard, go to the SQL Editor
- Copy and paste the contents of each migration file from the
supabase/migrations
folder - Run each migration to set up your database schema
-
Verify Connection:
- Check the Supabase connection status in the Profile tab of the app
- If connected, you'll see a green indicator
The application uses the following tables:
- plants: Stores information about user's plants
- care_tasks: Tracks care tasks for plants
- plant_identifications: Records plant identification history
- Plant identification using AI
- Plant care tracking and reminders
- Hydroponic gardening support
- Multilingual support (English and Arabic)
- Dark mode support
# Supabase Configuration
EXPO_PUBLIC_SUPABASE_URL=your_supabase_url
EXPO_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Storage Configuration
EXPO_PUBLIC_STORAGE_URL=your_storage_url
EXPO_PUBLIC_STORAGE_BUCKET=your_storage_bucket
# API Keys
EXPO_PUBLIC_PLANT_ID_API_KEY=your_plant_id_key
EXPO_PUBLIC_GOOGLE_CLOUD_VISION_KEY=your_vision_key
EXPO_PUBLIC_SENSORPUSH_API_KEY=your_sensorpush_key
EXPO_PUBLIC_NETATMO_CLIENT_ID=your_netatmo_id
EXPO_PUBLIC_NETATMO_CLIENT_SECRET=your_netatmo_secret
EXPO_PUBLIC_ONESIGNAL_APP_ID=your_onesignal_id
# Feature Flags
EXPO_PUBLIC_ENABLE_VOICE_COMMANDS=true
EXPO_PUBLIC_ENABLE_DARK_MODE=true
EXPO_PUBLIC_ENABLE_OFFLINE_MODE=true
- All API keys are stored in secure environment variables
- Keys are rotated every 90 days
- Access is restricted to production environment
- Never commit
.env
files to version control - Use
.env.example
as a template
- Copy
.env.example
to.env
- Fill in the required variables
- Install dependencies:
npm install
- Start the development server:
npm start
- Set up environment variables in your hosting platform
- Configure CI/CD pipeline with secure variable injection
- Enable automatic key rotation
- Set up monitoring and alerts for key usage
- All data is encrypted at rest and in transit
- User data is protected by Row Level Security (RLS)
- Regular security audits and penetration testing
- GDPR and CCPA compliant
- Regular backups and disaster recovery
- Voice command support
- Dark mode support
- Screen reader compatibility
- High contrast mode
- Adjustable text sizes
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
Create a .env
file in the root directory with the following variables:
EXPO_PUBLIC_SUPABASE_URL=your_supabase_project_url
EXPO_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
EXPO_PUBLIC_APP_URL=plantai://
EXPO_PUBLIC_GOOGLE_CLIENT_ID=your_google_client_id
EXPO_PUBLIC_APPLE_CLIENT_ID=your_apple_client_id
- Create a new project in Supabase
- Enable Email/Password authentication in Authentication → Providers
- Configure OAuth providers:
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google+ API
- Create OAuth 2.0 credentials (Web application type)
- Add authorized redirect URIs:
https://[YOUR_PROJECT_REF].supabase.co/auth/v1/callback
plantai://auth/callback
- Copy the Client ID and Client Secret
- Add them to your Supabase project in Authentication → Providers → Google
- Go to Apple Developer Console
- Register your app and create a Service ID
- Configure Sign In with Apple:
- Add
plantai://auth/callback
as a return URL - Add
https://[YOUR_PROJECT_REF].supabase.co/auth/v1/callback
as a return URL
- Add
- Generate a key and download it
- Add the key and Service ID to your Supabase project in Authentication → Providers → Apple
-
Email/Password Authentication:
# Start the development server npx expo start
- Test sign up with a new email
- Verify email confirmation (if enabled)
- Test login with credentials
- Verify session persistence
-
Password Reset:
- Request password reset
- Check email for reset link
- Set new password
- Verify login with new password
-
Social Login:
- Test Google Sign In
- Test Apple Sign In
- Verify redirect to dashboard
- Check session persistence
- If social login fails, verify your OAuth configuration in both Supabase and the provider's console
- For deep linking issues, ensure your app's scheme is properly configured in
app.config.js
- If session persistence isn't working, check AsyncStorage implementation
- For TypeScript errors, ensure all type definitions are properly imported
# Install dependencies
npm install
# Start development server
npx expo start
# Run on iOS
npx expo run:ios
# Run on Android
npx expo run:android
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request