A React Native mobile application that allows users to take photos with their device camera and modify them using Google's Gemini image model.
- Seamless camera experience that automatically launches the device's native camera
- Modern, intuitive UI for image editing
- AI-powered image modifications using Google Gemini
- Custom text prompts for personalized image transformations
- Comprehensive error handling with user-friendly error messages
- Full-screen image viewer with save to camera roll functionality
app/(tabs)/index.tsx- Camera screen with auto-launching cameraapp/(tabs)/editor.tsx- Image editor screen with Gemini integrationapp/(tabs)/_layout.tsx- Tab navigation layoutcomponents/CameraView.tsx- Custom camera component with auto-launch functionalityservices/geminiService.js- Service for interacting with the Gemini APIconfig.js- Configuration file for API keys (not included in repository)
- Clone the repository
- Install dependencies:
npm install - Create a
config.jsfile in the root directory with your Gemini API key:export const GEMINI_API_KEY = "YOUR_API_KEY_HERE";
- Start the development server:
npm start
- Go to Google AI Studio
- Sign in with your Google account
- Click on "Get API key" to create a new API key
- Copy your API key and add it to the
config.jsfile
- ✅ Camera functionality with auto-launching native camera
- ✅ Photo capture and preview
- ✅ Image selection from gallery in the editor screen
- ✅ Image sharing between camera and editor screens
- ✅ Google Gemini AI integration for image processing
- ✅ Custom text prompts for AI image modifications
- ✅ Modern, intuitive UI
- ✅ Comprehensive error handling with user-friendly messages
- ✅ Full-screen image viewer with save functionality
-
Camera Screen:
- The native camera automatically launches when you open the app
- Switch between front and back cameras with the flip button
- Take a photo using the device's native camera UI
- Preview captured photos
- Choose to use the photo or retake it
- Photos are automatically saved to your gallery when used
-
Editor Screen:
- View photos from camera or gallery
- Enter custom text prompts to describe how you want to modify your image
- Apply AI modifications using Google Gemini
- Reset to original image or clear image as needed
- Replace image with a new one using the replace button
- Receive clear error messages if something goes wrong
- Tap on the image to view it in full screen
- Save processed images directly to your camera roll
The app includes a full-screen image viewer that allows you to:
- View both original and AI-modified images in full screen
- Save any image directly to your camera roll with one tap
- Easily return to the editor with the close button
- AI-processed images are saved to a dedicated "Gemini AI" album
The app includes comprehensive error handling for the Gemini API integration:
- Network connectivity issues
- API key configuration problems
- Rate limiting and quota errors
- Image processing failures
- Timeout handling
- User-friendly error messages with suggestions for resolution
Try these example prompts with the custom prompt feature:
- "Make this image look like a watercolor painting"
- "Convert this photo to a comic book style"
- "Add a sunset glow to this image"
- "Make this look like it was taken in the 1970s"
- "Add a bokeh effect to the background"
- "Turn this into a black and white noir style photo"
- "Transform this into a cyberpunk style image"
- "Make this look like it's from a Wes Anderson movie"
- "Add a dreamy, ethereal quality to this photo"
- "Convert this to look like an oil painting"
-
Enhance Camera Features:
- Add more camera controls (zoom, exposure, flash, etc.)
- Implement filters and effects for the camera
- Add support for video recording
-
Enhance Gemini API Integration:
- Add more advanced image processing options
- Implement prompt history for reusing successful prompts
- Add offline mode for when API is unavailable
-
Enhance UI/UX:
- Implement image sharing to social media
- Add a gallery of previously edited images
- Implement user preferences for default settings
- expo
- expo-image-picker (for native camera functionality)
- expo-image-manipulator
- expo-media-library
- react-native
- @google/generative-ai
- The app uses the device's native camera UI through ImagePicker for a seamless camera experience
- You need to provide your own Gemini API key in the
config.jsfile - The Gemini API has usage limits, check Google AI pricing for details
- The app includes robust error handling to provide a better user experience
- Processed images are saved to a dedicated "Gemini AI" album in your gallery
MIT