Your Private, Secure Photo Server
A modern, self-hosted photo server with Google Photos-like experience
Current Version: v1.0.0
Release Date: January 2025
Latest Features:
- Complete photo server with modern UI
- JWT authentication and secure file handling
- Timeline view with floating navigation
- Album management and analytics
- EXIF data extraction and search
- Responsive design with glass morphism
- Database backup included for easy setup
- π Secure Authentication - JWT-based authentication with password hashing
- π€ Smart Media Upload - Support for 50+ image/video formats including RAW files
- π Timeline View - Browse photos by date with floating year navigation
- π Album Management - Create, organize, and manage photo albums
- π Analytics Dashboard - Storage usage, upload trends, and media statistics
- π± Responsive Design - Modern UI that works perfectly on all devices
- π Advanced Search - Find photos by date, type, camera, or EXIF data
- πΎ EXIF Data Extraction - Camera info, GPS coordinates, shooting parameters
- π Duplicate Detection - Prevents uploading duplicate photos
- β‘ WebP Optimization - Automatic WebP conversion for better performance
- π₯ Secure Downloads - Protected file downloads with authentication
- πΏ Storage Management - Per-user storage limits and usage tracking
- π Activity Logging - Track user actions and system events
- π¨ Modern UI - Glass morphism design with smooth animations
- βοΈ Auto-Organization - Automatic date-based folder structure
- Backend: PHP 7.4+, MySQL 5.7+
- Frontend: Vanilla JavaScript, Tailwind CSS, Alpine.js
- Authentication: JWT (JSON Web Tokens)
- Image Processing: GD Library, EXIF extraction
- UI/UX: Modern responsive design with glass morphism
- PHP 7.4+ with extensions:
mysqli,gd,exif,zip - MySQL 5.7+ or MariaDB 10.2+
- Web server (Apache/Nginx)
- At least 1GB RAM and 10GB storage
-
Clone the repository
git clone https://github.com/yourusername/privashots.git cd privashots -
Set up the database
CREATE DATABASE cloudphoto_db; CREATE USER 'cloudphoto_user'@'localhost' IDENTIFIED BY 'your_secure_password'; GRANT ALL PRIVILEGES ON cloudphoto_db.* TO 'cloudphoto_user'@'localhost'; FLUSH PRIVILEGES;
-
Configure the application
cp config/database.php config/database.php.backup nano config/database.php
Update the configuration:
define('DB_HOST', 'localhost'); define('DB_NAME', 'cloudphoto_db'); define('DB_USER', 'cloudphoto_user'); define('DB_PASS', 'your_secure_password'); define('JWT_SECRET', 'your_very_long_random_secret_key'); define('BASE_URL', 'https://your-domain.com/Cloudphoto');
-
Run the setup script
php setup.php
Alternative: Use the provided database backup
# Import the pre-configured database mysql -u cloudphoto_user -p cloudphoto_db < setup/cloudphoto_db.sql
-
Set proper permissions
chmod 755 media/ chmod 644 config/database.php mkdir -p logs && chmod 755 logs/ -
Access the application
- Navigate to
http://your-domain.com/Cloudphoto - Default login:
admin@cloudphoto.local/admin123 β οΈ Important: Change the default password immediately!
- Navigate to
Cloudphoto/
βββ π api/ # API endpoints
β βββ index.php # API entry point
β βββ router.php # Request routing
βββ π assets/ # Static assets
β βββ css/ # Stylesheets
β βββ js/ # JavaScript files
β βββ images/ # Images and icons
βββ π classes/ # PHP classes
β βββ Auth.php # Authentication
β βββ MediaManager.php # Media handling
β βββ AlbumManager.php # Album management
β βββ ExifManager.php # EXIF data extraction
β βββ ImageProcessor.php # Image processing
β βββ TimelineManager.php # Timeline management
βββ π config/ # Configuration files
β βββ database.php # Database and app config
β βββ production.php # Production settings
βββ π media/ # Uploaded media files
βββ π setup/ # Setup scripts
β βββ cloudphoto_db.sql # Database backup with sample data
βββ dashboard.php # Main dashboard
βββ timeline.php # Timeline view
βββ albums.php # Albums management
βββ analytics.php # Analytics dashboard
βββ login.php # Login page
βββ README.md # This file
POST /api/router.php?action=login- User loginPOST /api/router.php?action=register- User registration
POST /api/router.php?action=upload-media- Upload mediaPOST /api/router.php?action=getMedia- Get media listPOST /api/router.php?action=getRecentPhotos- Get recent photosPOST /api/router.php?action=delete-media- Delete media
POST /api/router.php?action=create-album- Create albumPOST /api/router.php?action=list-albums- List albumsPOST /api/router.php?action=add-to-album- Add media to albumPOST /api/router.php?action=remove-from-album- Remove media from album
POST /api/router.php?action=getDashboardStats- Get dashboard statsPOST /api/router.php?action=exif-data- Get EXIF data
- π Sharing & Collaboration - Share albums with other users
- π± Mobile App - Native iOS/Android applications
- βοΈ Cloud Sync - Sync with Google Drive, Dropbox, etc.
- π€ AI Features - Face recognition, object detection
- π¨ Photo Editing - Basic editing tools (crop, filter, adjust)
- πΉ Video Processing - Video thumbnails and metadata
- π Multi-language - Internationalization support
- π Advanced Analytics - Usage patterns and insights
- π End-to-End Encryption - Client-side encryption
- π± Progressive Web App - Offline functionality
We welcome feature requests! Please:
- Check existing Issues first
- Create a new issue with the
enhancementlabel - Describe the feature and its use case
- Add screenshots/mockups if applicable
We love contributions! Here's how you can help:
- Check existing Issues first
- Create a new issue with the
buglabel - Include steps to reproduce, expected vs actual behavior
- Add screenshots if applicable
- 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
- Follow PSR-12 coding standards for PHP
- Use meaningful commit messages
- Add comments for complex logic
- Test your changes thoroughly
- Update documentation if needed
- Follow the existing design system
- Ensure responsive design
- Test on different devices
- Maintain accessibility standards
For production deployment, use the production configuration:
cp config/production.php config/database.phpKey production settings:
- Strong JWT secret (minimum 32 characters)
- Secure database credentials
- Your domain URL
- Error logging enabled
- Security headers configured
- π Change default credentials immediately after installation
- π Use HTTPS with valid SSL certificates
- π Set proper file permissions (755 for directories, 644 for files)
- π‘οΈ Configure firewall to allow only necessary ports
- πΎ Regular backups of database and media files
- π Monitor logs for suspicious activity
- β‘ Enable OPcache for PHP
- ποΈ Optimize MySQL configuration
- π Use CDN for static assets
- ποΈ Enable gzip compression
- πΎ Set up caching headers for images
- πΎ Database backups (daily)
- π Media file backups (weekly)
- π Log rotation (weekly)
- π Security updates (monthly)
- π Performance monitoring (ongoing)
Common Issues:
- π€ Upload fails: Check file permissions and PHP upload limits
- πΌοΈ Images not displaying: Verify file paths and database entries
- π Authentication errors: Check JWT secret and token expiration
- β‘ Performance issues: Enable caching and optimize database queries
Logs to check:
/logs/error.log- PHP errors/logs/access.log- API access logs/logs/upload.log- Upload activity
This project is licensed under the MIT License - see the LICENSE file for details.
- π Documentation: Check this README and inline code comments
- π Issues: Report bugs via GitHub Issues
- π¬ Discussions: Use GitHub Discussions for questions and ideas
- π§ Email: For private support, contact [your-email@domain.com]
- Icons: Font Awesome
- CSS Framework: Tailwind CSS
- JavaScript Framework: Alpine.js
- Design Inspiration: Google Photos, Apple Photos
β Star this repo | π Report a bug | π‘ Request a feature