A modern, feature-rich photo and video gallery web application with advanced AI-powered face detection, multi-user support, and mobile-responsive interface.
Galerie Photos is designed to help individuals and organizations organize, manage, and share their photo and video collections. The application automatically scans file system directories to create organized galleries, extracts metadata from media files, and provides features like face detection and recognition to help with finding and organizing photos.
- Photo & Video Gallery: Automatically organizes photos and videos from file system directories
- Thumbnail Generation: Automatic thumbnail creation for fast browsing
- EXIF Data Extraction: Reads camera information, date/time, GPS coordinates from image metadata
- Image Processing: Built-in photo rotation, resizing, and format conversion
- Video Support: Video thumbnail generation and playback using FFmpeg
- Face Detection: Automatic face detection in photos using AI models
- Face Recognition: Identify and group photos by detected faces
- Face Naming: Assign names to detected faces for easy photo searching
- Smart Organization: Browse photos by recognized people
- User Authentication: Secure login system with ASP.NET Core Identity
- Gallery Sharing: Control photo visibility and sharing permissions
- Member Management: Invite users to specific galleries with role-based access
- Privacy Controls: Mark photos as private or public
- Mobile-Responsive: Built with React Native and Expo for cross-platform support
- Progressive Web App: Works seamlessly on desktop and mobile devices
- Touch-Friendly: Intuitive touch gestures for mobile browsing
- Real-time Updates: Live updates using modern web technologies
- File System Provider: Direct access to local file system directories
- Seafile Integration: Support for Seafile cloud storage as data provider
- Multiple Galleries: Manage multiple separate photo collections
- Configurable Paths: Customize root directories and thumbnail storage locations
- GPS Mapping: Display photo locations on interactive maps
- Location-based Browsing: Find photos by geographic location
- EXIF GPS Extraction: Automatic location detection from photo metadata
- Place Detection: Automatic place/city detection using OpenStreetMap Nominatim API
- Place Grouping: Organize photos by country and city
- Duplicate Management: Built-in tool to merge duplicate places (via API endpoint)
- REST API: Comprehensive RESTful API for all operations
- Real-time Processing: Background services for face detection and media processing
- Database Storage: PostgreSQL for metadata and user management
- Vector Search: Advanced face similarity search using pgvector
- Caching: Optimized thumbnail and metadata caching
- Backend: .NET 9 ASP.NET Core Web API
- Frontend: React Native with Expo framework
- Database: PostgreSQL with Entity Framework Core
- AI/ML: FaceAiSharp for face detection and recognition
- Image Processing: SixLabors.ImageSharp for image manipulation
- Video Processing: Xabe.FFmpeg for video thumbnails and processing
- State Management: MobX for reactive state management
- Authentication: ASP.NET Core Identity with JWT tokens
Before installing Galerie Photos, ensure you have the following installed:
- .NET 9 SDK - Download from Microsoft
- Node.js 20.x or later - Download from nodejs.org
- Yarn 4.5.3 - Installed via Corepack (comes with Node.js)
- PostgreSQL - Download from postgresql.org
- FFmpeg - Download from ffmpeg.org (for video processing)
-
Clone the repository
git clone https://github.com/Sidoine/galerie.git cd galerie -
Setup the database
# Create a PostgreSQL database named 'galerie' createdb galerie -
Configure the application
cd GaleriePhotos # Copy and edit the configuration file cp appsettings.json appsettings.Development.json
Edit
appsettings.Development.jsonand update the connection string:{ "ConnectionStrings": { "DefaultConnection": "Host=localhost;Database=galerie;Username=your_user;Password=your_password" } } -
Install backend dependencies
dotnet restore
-
Setup the database schema
dotnet ef database update
-
Install frontend dependencies
cd ClientApp corepack enable yarn install
-
Run the application
# From the GaleriePhotos directory dotnet runThe application will be available at
https://localhost:5001orhttp://localhost:5000
For production deployment using Docker:
-
Build the Docker image
docker build -t galerie . -
Run with Docker
docker run --rm -p 5000:5000 \ --env DATABASE_URL=postgres://username:password@host:port/database \ galerie
The application can be configured through appsettings.json:
{
"ConnectionStrings": {
"DefaultConnection": "Your PostgreSQL connection string"
},
"Galerie": {
"Galleries": [
{
"Name": "My Photos",
"RootDirectory": "/path/to/photos",
"ThumbnailsDirectory": "/path/to/thumbnails",
"DataProvider": "FileSystem"
}
]
},
"SendGrid": {
"ApiKey": "your-sendgrid-api-key"
}
}DATABASE_URL: PostgreSQL connection stringASPNETCORE_ENVIRONMENT: Set toDevelopmentorProductionASPNETCORE_URLS: Specify listening URLs (default:http://+:5000)
- Access the application through your web browser
- Register or login with your user account
- Create galleries by configuring directory paths in settings
- Upload or sync photos - the application will automatically scan configured directories
- Browse photos with the responsive interface
- Use face detection to automatically identify people in photos
- Share galleries with other users by managing member permissions
- Enjoy advanced features like GPS mapping, photo rotation, and smart organization
The application provides a comprehensive REST API. Key endpoints include:
GET /api/galleries- List available galleriesGET /api/photos/{id}- Get photo details and metadataGET /api/photos/{id}/image- Download full-size imageGET /api/photos/{id}/thumbnail- Get photo thumbnailGET /api/gallery/{id}/face-names- List detected faces in galleryPOST /api/galleries/{id}/members- Manage gallery accessGET /api/places/gallery/{galleryId}/countries- List countries with photos in a galleryGET /api/places/gallery/{galleryId}/countries/{countryId}/cities- List cities within a countryPOST /api/places/gallery/{galleryId}/merge-duplicates- Merge duplicate places (requires admin)
The face recognition system provides advanced AI-powered features:
- Automatic Detection: Photos are automatically scanned for faces
- Face Grouping: Similar faces are grouped together using AI
- Name Assignment: Assign names to faces for easy searching
- Face Browsing: Browse photos by specific people
- Smart Search: Find all photos containing specific individuals
Access face features through:
- Face names list:
/g/:galleryId/face-names - Photos by face:
/g/:galleryId/face-names/:faceNameId - API endpoint:
GET /api/gallery/{galleryId}/face-names/{id}/photos
- Fork the repository
- Create a 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
This project is licensed under the MIT License - see the LICENSE file for details.