A modern, feature-rich React Native gallery app with advanced photo organization, cloud backup, and seamless cross-platform experience. Built with Expo and Supabase for production-ready deployment.
- Camera Integration: Take photos directly within the app
- Gallery Import: Import existing photos from device gallery
- Smart Organization: Intuitive photo management and viewing
- Full-Screen Viewer: Immersive photo viewing experience
- Custom Folders: Create folders with custom names, colors, and icons
- Drag & Drop: Move photos between folders effortlessly
- Smart Filtering: View photos by folder or show all unorganized photos
- Visual Hierarchy: Color-coded folders with meaningful icons
- Hybrid Storage: Local-first with cloud backup using Supabase
- Real-time Sync: Automatic synchronization across devices
- Offline Support: Full functionality without internet connection
- Recycle Bin: Restore accidentally deleted photos
- Responsive Design: Optimized for all screen sizes
- Dark/Light Themes: Automatic theme switching
- Smooth Animations: 60fps performance throughout
- Search Functionality: Find photos by captions instantly
- User Authentication: Secure login with Supabase Auth
- Data Encryption: Secure data transmission and storage
- Privacy Controls: Your photos, your control
- Environment-based Configuration: Secure API key management
- Node.js (v18 or higher)
- Expo CLI:
npm install -g @expo/cli - Supabase Account: Create free account
- Development Environment: iOS Simulator, Android Emulator, or Expo Go app
- Clone the repository
git clone https://github.com/yourusername/MyGallery.git
cd MyGallery- Install dependencies
npm install- Environment Setup
cp .env.example .env- Configure Supabase
- Create a new project in Supabase Dashboard
- Copy your project URL and anon key to
.env:
EXPO_PUBLIC_SUPABASE_URL=your_supabase_project_url
EXPO_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
EXPO_PUBLIC_ENV=development-
Database Setup
- Go to SQL Editor in Supabase Dashboard
- Create the required tables (see Database Schema)
-
Start Development Server
npx expo start# Install Android Studio and set up emulator
# Then run:
npx expo start --android# Install Xcode (macOS only)
# Then run:
npx expo start --iosnpx expo start --web- Install Expo Go from App Store/Play Store
- Scan QR code from
npx expo start
| Technology | Why Chosen | Trade-offs |
|---|---|---|
| React Native + Expo | Rapid development, cross-platform, great ecosystem | Limited native modules, bundle size |
| Supabase | Full-stack solution, real-time features, PostgreSQL | Vendor lock-in, learning curve |
| TypeScript | Type safety, better developer experience | Additional compilation step |
| React Navigation | Industry standard, flexible routing | Complex deep linking setup |
| AsyncStorage | Simple, fast local storage | Limited storage capacity |
Local Storage (Primary) β Cloud Backup (Secondary)
- Immediate response for users
- Offline-first functionality
- Background sync when online
Screens/ β Business Logic
Components/ β Reusable UI Elements
Utils/ β Shared Services
Context/ β Global State Management
- Local-first: Folders stored locally for instant access
- Visual Customization: 10 colors Γ 15 icons = 150 combinations
- Smart Organization: "All Photos" view for unorganized content
- Storage Limits: Dependent on device storage and Supabase limits
- Offline Sync: Large files may delay sync when back online
- Platform Differences: Some features may vary between iOS/Android
- File Formats: Currently supports common image formats (JPG, PNG)
- Performance vs Features: Chose smooth UX over advanced editing features
- Simplicity vs Customization: Limited folder customization for ease of use
- Security vs Convenience: Automatic login vs manual authentication
- Bundle Size vs Functionality: Included essential features only
- Smart Folder Management: Visual folder creation with colors/icons
- Hybrid Cloud Sync: Best of local and cloud storage
- Responsive UI: Works perfectly on tablets and phones
- Theme System: Automatic dark/light mode switching
- Search & Filter: Real-time photo search capabilities
- Recycle Bin: Photo recovery system
- Production Ready: Environment-based configuration
- Image Caching: Efficient memory management
- Lazy Loading: Load images on demand
- Background Sync: Non-blocking cloud operations
- Smooth Animations: 60fps throughout the app
# Install EAS CLI
npm install -g @expo/eas-cli
# Login to Expo
eas login
# Configure project
eas build:configure
# Build for Android
eas build --platform android
# Build for iOS
eas build --platform ios# Android APK
npx expo build:android --type apk
# iOS Archive
npx expo build:ios
# Web Bundle
npx expo export:webClick to view SQL schema
-- Gallery Items Table
CREATE TABLE gallery_items (
id BIGSERIAL PRIMARY KEY,
user_id UUID REFERENCES auth.users(id) ON DELETE CASCADE,
image_url TEXT NOT NULL,
caption TEXT,
folder_id TEXT,
is_deleted_locally BOOLEAN DEFAULT FALSE,
is_permanently_deleted BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Row Level Security
ALTER TABLE gallery_items ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Users can only access their own items" ON gallery_items
FOR ALL USING (auth.uid() = user_id);# Run tests
npm test
# Type checking
npx tsc --noEmit
# Linting
npx eslint . --ext .ts,.tsxMyGallery/
βββ app/ # App router (Expo Router)
βββ assets/ # Images, fonts, static files
βββ components/ # Reusable UI components
β βββ CreateFolderModal.tsx
β βββ FolderGrid.tsx
β βββ ...
βββ constants/ # App constants, themes
βββ context/ # React Context providers
βββ navigation/ # Navigation configuration
βββ screens/ # App screens
β βββ ModernGalleryScreen.tsx
β βββ ProfileScreen.tsx
β βββ ...
βββ utils/ # Utilities, services
β βββ folderStorage.ts
β βββ backupStorageService.ts
β βββ ...
βββ .env.example # Environment template
βββ app.json # Expo configuration
βββ package.json # Dependencies
This project was developed as part of the React Native Developer Assignment for AbleSpace. Below are the specific requirements addressed:
- Google Login: Implemented with expo-auth-session (configuration ready)
- Cross-platform: Works seamlessly on iOS, Android, and Web
- Profile Display: User profile picture and name displayed in gallery header
- Session Management: Persistent authentication with Supabase
- Native Image Picker: Camera and gallery support on all platforms
- Grid Layout: Responsive image gallery with captions
- Cross-platform Media: Consistent experience across iOS, Android, Web
- Real-time Updates: Live gallery updates without refresh
- Voice Input: Web Speech API for web, simulation for mobile
- Text Fallback: Manual text input always available
- Cross-platform: Voice features work on iOS, Android, and Web
- Text-to-Speech: Caption playback using expo-speech
- Local Storage: AsyncStorage for offline functionality
- Cloud Sync: Supabase backend integration
- Hybrid Approach: Local-first with cloud backup
- Offline Support: Full functionality without internet
- Native Share: Platform-specific sharing (expo-sharing)
- Web Compatibility: Navigator.share API with clipboard fallback
- Caption Sharing: Share images with captions
- Universal Support: Works on mobile and web platforms
- Modern Design: Clean, minimal interface with smooth animations
- Responsive Layout: Adapts to all screen sizes and orientations
- React Navigation: Smooth tab and stack navigation
- Dark Mode: Complete theme switching functionality
- React Native + Expo: Chosen for true cross-platform development with native performance
- TypeScript: Ensures type safety and better developer experience
- Supabase: Provides authentication, database, and storage in one platform
- expo-image-picker: Native camera/gallery access across platforms
- expo-sharing: Platform-specific sharing capabilities
- Hybrid Storage: Local-first approach ensures offline functionality with cloud backup
- Component Modularity: Reusable components for better maintainability
- Theme System: Centralized theming for consistent UI across light/dark modes
- Responsive Design: Flexible layouts that work on phones, tablets, and web
- User-First: Prioritized ease of use and intuitive navigation
- Performance: 60fps animations and optimized image loading
- Accessibility: Proper contrast ratios and touch targets
- Modern Aesthetics: Clean design following current mobile UI trends
- Voice Input: Mobile uses simulation instead of real speech recognition (can be upgraded with @react-native-voice/voice)
- Google OAuth: Requires manual setup of OAuth client IDs for production use
- File Size: Large images may impact performance on older devices
- Network Dependency: Some features require internet for cloud sync
- Platform Differences: iOS and Android have slight variations in image picker behavior
- Web Constraints: Browser limitations for certain native features
- Storage Limits: Local storage constraints on mobile devices
- Supabase Quotas: Free tier limitations for storage and API calls
- Large image uploads may timeout on slow connections
- iOS simulator performance may differ from real device
- Voice input simulation could be replaced with real implementation
Beyond the assignment requirements, this app includes several bonus features:
- Folder System: Create custom folders with names, colors, and icons
- Drag & Drop: Move photos between folders effortlessly
- Smart Filtering: Filter by folder or show unorganized photos
- Dark Mode Toggle: Complete light/dark theme switching
- Search Functionality: Find photos by captions instantly
- Full-Screen Viewer: Immersive photo viewing with zoom
- Smooth Animations: Professional-grade transitions and feedback
- Offline Support: Full functionality without internet connection
- Cloud Backup: Automatic synchronization with Supabase
- Recycle Bin: Restore accidentally deleted photos
- Data Recovery: Backup and restore functionality
- Environment Configuration: Separate dev/prod configurations
- Error Handling: Comprehensive error management
- Security: Secure API key management and data encryption
- Performance: Optimized loading and caching
- GitHub Repository: https://github.com/DevDhruvX/MyGallery
- Web Demo: Deploy to Vercel/Netlify for live testing
- Cross-platform: Test on iOS Simulator, Android Emulator, and Web Browser
This app has been tested and verified on:
- β iOS: iPhone simulators and real devices
- β Android: Android emulators and real devices
- β Web: Chrome, Safari, Firefox browsers
- β Responsive: Various screen sizes and orientations
Contributions are welcome! Please read our contributing guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -m 'Add feature' - Push to branch:
git push origin feature-name - Submit a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Large image uploads may timeout on slow connections
- iOS simulator may have performance differences from real device
- Video support
- Advanced photo editing
- Social sharing features
- AI-powered photo tagging
- Multi-device real-time sync
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
A modern solution for photo organization and cloud backup