A modern, cross-platform photo sharing application built with Flutter and FastAPI. Share photos securely with password-protected sessions and real-time collaboration features.
- Cross-Platform: Works on iOS, Android, Web, macOS, Windows, and Linux
- Secure Photo Sharing: Password-protected photo viewing sessions
- Real-time Collaboration: Multiple users can view and select photos simultaneously
- Cloud Storage: AWS S3 integration for reliable photo storage
- Responsive Design: Beautiful UI that adapts to different screen sizes
- JWT Authentication: Secure session management
- Password Protection: Optional password protection for photo sessions
- CORS Configuration: Proper cross-origin resource sharing setup
- Environment-based Configuration: Separate configs for development and production
- FastAPI Backend: High-performance async API with automatic documentation
- Flutter Frontend: Modern, reactive UI with state management
- AWS S3 Integration: Scalable cloud storage for photos
- DynamoDB: NoSQL database for session management
- Auto-reload Development: Hot reload for both frontend and backend
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Flutter App β β FastAPI β β AWS Services β
β (Frontend) βββββΊβ (Backend) βββββΊβ (Cloud) β
β β β β β β
β β’ Cross-platformβ β β’ REST API β β β’ S3 Storage β
β β’ State Mgmt β β β’ JWT Auth β β β’ DynamoDB β
β β’ Photo Picker β β β’ File Upload β β β’ CloudFront β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Flutter SDK (>=3.2.3)
- Python (>=3.11)
- AWS Account (for S3 and DynamoDB)
- Git
git clone https://github.com/yourusername/photoshare.git
cd photosharecd backend
# Install dependencies
pip install -r requirements.txt
# Copy environment template
cp .env.example .env
# Edit .env with your AWS credentials
nano .envRequired Environment Variables:
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_DEFAULT_REGION=ap-south-1
JWT_SECRET_KEY=your_jwt_secret
ENVIRONMENT=development
ALLOWED_ORIGINS=http://localhost:3000,https://yourdomain.com# Install Flutter dependencies
flutter pub get
# Copy environment template
cp .env.example .env
# Edit .env with your API configuration
nano .envRequired Environment Variables:
API_BASE_URL=http://localhost:8000
ENVIRONMENT=developmentStart the Backend:
cd backend
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadStart the Frontend:
# For web
flutter run -d chrome
# For mobile (iOS/Android)
flutter run
# For desktop
flutter run -d macos # or windows/linux| Platform | Status | Notes |
|---|---|---|
| Web | β Supported | Full feature support |
| Android | β Supported | Native performance |
| iOS | β Supported | Native performance |
| macOS | β Supported | Desktop experience |
| Windows | β Supported | Desktop experience |
| Linux | β Supported | Desktop experience |
cd backend
# Install development dependencies
pip install -r requirements.txt
# Run with auto-reload
uvicorn app.main:app --reload
# Run tests
pytest
# Format code
black .
# Lint code
flake8# Install dependencies
flutter pub get
# Run in debug mode
flutter run --debug
# Run tests
flutter test
# Analyze code
flutter analyze
# Format code
dart format .Once the backend is running, visit:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
- OpenAPI JSON: http://localhost:8000/openapi.json
photoshare/
βββ π± lib/ # Flutter frontend
β βββ screens/ # UI screens
β βββ services/ # API services
β βββ models/ # Data models
β βββ widgets/ # Reusable widgets
β βββ utils/ # Utilities
βββ π backend/ # FastAPI backend
β βββ app/
β β βββ api/ # API endpoints
β β βββ core/ # Core functionality
β β βββ models/ # Database models
β β βββ services/ # Business logic
β β βββ utils/ # Utilities
β βββ requirements.txt # Python dependencies
β βββ .env.example # Environment template
βββ π docs/ # Documentation
βββ π§ͺ test/ # Test files
βββ π README.md # This file
-
Create S3 Bucket:
aws s3 mb s3://your-photoshare-bucket
-
Create DynamoDB Table:
aws dynamodb create-table \ --table-name photo_sessions_share \ --attribute-definitions \ AttributeName=session_id,AttributeType=S \ --key-schema \ AttributeName=session_id,KeyType=HASH \ --billing-mode PAY_PER_REQUEST -
Configure IAM Permissions:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:PutObject", "s3:DeleteObject" ], "Resource": "arn:aws:s3:::your-bucket/*" }, { "Effect": "Allow", "Action": [ "dynamodb:GetItem", "dynamodb:PutItem", "dynamodb:UpdateItem", "dynamodb:DeleteItem" ], "Resource": "arn:aws:dynamodb:*:*:table/photo_sessions_share" } ] }
- Connect your GitHub repository to Render
- Set environment variables in Render dashboard
- Deploy automatically on push to main branch
# Build for web
flutter build web
# Deploy to Firebase
firebase deploy# Build and run with Docker Compose
docker-compose up --buildcd backend
pytest tests/ -vflutter testflutter drive --target=test_driver/app.dartPOST /api/v1/session/{session_id}/auth- Authenticate sessionGET /api/v1/session/{session_id}/photos- Get session photos (protected)
POST /api/v1/upload-photo- Upload single photoPOST /api/v1/upload-multiple-photos- Upload multiple photosPOST /api/v1/generate-upload-urls- Generate presigned URLs
POST /api/v1/session/create- Create new photo sessionPOST /api/v1/session/{session_id}/select- Select photos (protected)
GET /api/v1/test-s3-connection- Test S3 connectivityGET /api/v1/direct-access- Proxy S3 images
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Backend: Follow PEP 8, use Black for formatting
- Frontend: Follow Dart style guide, use
dart format - Commits: Use conventional commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
- Flutter - Cross-platform UI framework
- FastAPI - Modern Python web framework
- AWS - Cloud services
- Material Design - Design system
- π§ Email: support@photoshare.app
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- v1.1: Real-time photo selection updates
- v1.2: Photo editing capabilities
- v1.3: Advanced sharing options
- v1.4: Mobile app store releases
- v2.0: AI-powered photo organization
Made with β€οΈ by the PhotoShare Team
β Star us on GitHub β’ π¦ Follow us on Twitter β’ π Visit our website