A modern, responsive art gallery application built with Laravel and Livewire. This application provides a beautiful way to showcase and organize digital art collections with advanced image metadata extraction and intelligent layout management.
- Automatic Collection Discovery: Automatically scans and organizes images from the
storage/app/collectionsdirectory - Intelligent Layout: Responsive grid layout that adapts to image orientation (wide, tall, square)
- Multiple Format Support: Supports JPG, JPEG, PNG, GIF, BMP, WebP, and SVG formats
- Dynamic Image Serving: Secure image serving with proper MIME type detection
- EXIF Data: Extracts camera settings, location, and timestamp information
- Image Properties: Width, height, aspect ratio, and orientation analysis
- XMP Metadata: Extracts extended metadata from images
- macOS Integration: Reads "Where from" attributes for source tracking
- Imagick Integration: Advanced image processing and metadata extraction
- Responsive Design: Mobile-first design with Tailwind CSS
- Dark Mode Support: Built-in dark/light theme switching
- Livewire Components: Dynamic, reactive user interface
- Authentication: User registration, login, and profile management
- Breeze Integration: Laravel Breeze for authentication scaffolding
- Comprehensive Testing: Pest PHP testing framework with feature and unit tests
- Code Quality: Laravel Pint for code formatting
- Development Tools: Spatie Ray integration for debugging
- Image Processing: Intervention Image for advanced image manipulation
- Color Extraction: League Color Extractor for palette analysis
- PHP 8.2+ with the following extensions:
ext-imagick(for advanced image processing)ext-gd(for basic image operations)ext-exif(for EXIF data extraction)
- Composer for PHP dependency management
- Node.js and npm for frontend assets
- SQLite (default) or MySQL/PostgreSQL
-
Clone the repository
git clone https://github.com/yourusername/odinnsart.git cd odinnsart -
Install PHP dependencies
composer install
-
Install Node.js dependencies
npm install
-
Environment setup
cp .env.example .env php artisan key:generate
-
Database setup
php artisan migrate
-
Build frontend assets
npm run build
-
Start the development server
php artisan serve
-
Add your art collections
# Create collections directory mkdir -p storage/app/collections # Add your image collections # Example structure: # storage/app/collections/ # βββ portraits-1/ # β βββ image1.jpg # β βββ image2.png # β βββ ... # βββ landscapes-1/ # β βββ landscape1.jpg # β βββ ... # βββ abstract-1/ # βββ abstract1.jpg # βββ ...
odinnsart/
βββ app/
β βββ Http/Controllers/
β β βββ GalleryController.php # Main gallery logic
β βββ Services/
β β βββ CollectionService.php # Image collection management
β βββ Livewire/ # Reactive UI components
βββ resources/views/
β βββ gallery/
β βββ index.blade.php # Collections overview
β βββ collection.blade.php # Individual collection view
βββ storage/app/collections/ # Your art collections
βββ tests/
β βββ Feature/
β βββ GalleryTest.php # Gallery functionality tests
β βββ CollectionServiceTest.php # Service layer tests
βββ routes/web.php # Application routes
-
Create a collection folder in
storage/app/collections/mkdir storage/app/collections/my-collection
-
Add images to the collection folder
cp your-images/* storage/app/collections/my-collection/ -
Access your collection at
/collection/my-collection
- JPEG/JPG: Most common format with EXIF support
- PNG: Lossless format with transparency
- GIF: Animated images and simple graphics
- WebP: Modern format with excellent compression
- BMP: Basic bitmap format
- SVG: Vector graphics
The application automatically extracts and displays:
- Basic Info: Dimensions, aspect ratio, file size
- EXIF Data: Camera settings, GPS coordinates, timestamps
- XMP Metadata: Extended image properties
- Color Information: Palette analysis (when available)
- Source Tracking: "Where from" attributes (macOS)
Run the comprehensive test suite:
# Run all tests
php artisan test
# Run specific test files
php artisan test tests/Feature/GalleryTest.php
php artisan test tests/Feature/CollectionServiceTest.php
# Run tests with coverage
php artisan test --coverage- Gallery Functionality: Collection display, image serving, routing
- Service Layer: Image metadata extraction, collection management
- Authentication: User registration, login, profile management
- Error Handling: Invalid images, missing files, edge cases
Key configuration options in .env:
# Database
DB_CONNECTION=sqlite
DB_DATABASE=database/database.sqlite
# File Storage
FILESYSTEM_DISK=local
# Image Processing
IMAGICK_ENABLED=true- Modify
resources/css/app.cssfor custom styles - Update
tailwind.config.jsfor theme customization - Edit Blade templates in
resources/views/
- Configure allowed extensions in
CollectionService.php - Adjust metadata extraction in
getImageMetadata()method - Customize layout logic in collection views
-
Environment Configuration
# Set production environment APP_ENV=production APP_DEBUG=false # Configure caching php artisan config:cache php artisan route:cache php artisan view:cache
-
File Permissions
# Ensure storage is writable chmod -R 775 storage/ chmod -R 775 bootstrap/cache/ -
Web Server Configuration
- Configure your web server to point to the
public/directory - Set up proper URL rewriting for Laravel
- Configure SSL certificates for secure image serving
- Configure your web server to point to the
FROM php:8.2-fpm
# Install dependencies
RUN apt-get update && apt-get install -y \
libmagickwand-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd exif \
&& pecl install imagick \
&& docker-php-ext-enable imagick
# Copy application
COPY . /var/www/html
WORKDIR /var/www/html
# Install dependencies
RUN composer install --no-dev --optimize-autoloader
RUN npm install && npm run build
# Set permissions
RUN chown -R www-data:www-data storage bootstrap/cacheWe welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Add tests for new functionality
- Run the test suite
php artisan test - Submit a pull request
- Follow PSR-12 coding standards
- Use Laravel Pint for code formatting
- Write meaningful commit messages
- Add comments for complex logic
- Write tests for all new features
- Ensure existing tests pass
- Use descriptive test names
- Mock external dependencies
This project is licensed under the MIT License - see the LICENSE file for details.
- Laravel Team for the amazing framework
- Livewire for reactive components
- Tailwind CSS for utility-first styling
- Spatie for development tools
- Intervention Image for image processing
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
Made with β€οΈ for the art community