# Studio Kunj Photo Critique Platform [![Version](https://img.shields.io/badge/version-2.0.0-blue.svg)](https://github.com/studiokunj/photo-critique) [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE) [![PHP](https://img.shields.io/badge/PHP-8.0+-purple.svg)](https://php.net) [![Python](https://img.shields.io/badge/Python-3.9+-blue.svg)](https://python.org) A comprehensive, AI-powered photography analysis and critique platform designed to help photographers of all skill levels improve their craft through data-driven insights and professional feedback tools. ## ๐ŸŒŸ Features ### ๐Ÿค– AI Composition Analysis - **Automated Analysis**: Advanced computer vision algorithms analyze composition elements - **Rule of Thirds Detection**: Identify and score adherence to fundamental composition rules - **Leading Lines Analysis**: Detect and evaluate visual flow elements - **Balance Assessment**: Analyze visual weight distribution and symmetry - **Real-time Feedback**: Instant analysis with visual overlays and improvement suggestions ### ๐Ÿ’ก Lighting Study Tool - **Direction Analysis**: Comprehensive evaluation of light direction and quality - **Shadow Assessment**: Analyze shadow presence, strength, and impact - **Mood Impact**: Evaluate how lighting affects emotional storytelling - **Educational Content**: Learn lighting fundamentals through interactive tools ### ๐ŸŽจ Mood & Color Analysis - **Emotional Impact**: Assess the mood and feeling conveyed by images - **Color Harmony**: Analyze color relationships and temperature - **Mood Classification**: Automatic categorization of emotional content - **Professional Insights**: Color theory education and grading suggestions ### ๐Ÿ“Š Before/After Comparison - **Interactive Comparison**: Side-by-side analysis with slider controls - **Progress Tracking**: Monitor improvement over time - **Detailed Metrics**: Comprehensive change analysis - **Portfolio Development**: Tools for showcasing growth ### โœ๏ธ Professional Critique System - **Structured Evaluation**: Multi-criteria assessment frameworks - **Expert Standards**: Professional photography evaluation methods - **Collaborative Features**: Community feedback and peer review - **Learning Pathways**: Guided improvement suggestions ### ๐Ÿ“ˆ Analytics Dashboard - **Progress Visualization**: Track skill development over time - **Performance Metrics**: Detailed analytics and insights - **Goal Setting**: Personalized improvement objectives - **Achievement System**: Gamified learning experience ## ๐Ÿ—๏ธ Architecture ### Technology Stack - **Frontend**: Vanilla JavaScript (ES6+), Custom CSS Framework - **Backend**: PHP 8+, MySQL 8+ - **AI/ML**: Python 3.9+, OpenCV, PIL - **Infrastructure**: Apache/Nginx, Docker support ### Project Structure ``` PhotoCritique/ โ”œโ”€โ”€ ๐Ÿ“ api/ # Backend API endpoints โ”‚ โ”œโ”€โ”€ auth/ # Authentication โ”‚ โ”œโ”€โ”€ admin/ # Admin functionality โ”‚ โ”œโ”€โ”€ user/ # User management โ”‚ โ”œโ”€โ”€ tools/ # Analysis tools โ”‚ โ””โ”€โ”€ system/ # System utilities โ”œโ”€โ”€ ๐Ÿ“ src/ # Source code โ”‚ โ”œโ”€โ”€ config/ # Configuration โ”‚ โ”œโ”€โ”€ components/ # UI components โ”‚ โ”œโ”€โ”€ services/ # Service layer โ”‚ โ”œโ”€โ”€ utils/ # Utilities โ”‚ โ””โ”€โ”€ pages/ # Page components โ”œโ”€โ”€ ๐Ÿ“ public/ # Public assets โ”‚ โ”œโ”€โ”€ assets/css/ # Stylesheets โ”‚ โ”œโ”€โ”€ assets/js/ # JavaScript โ”‚ โ””โ”€โ”€ uploads/ # User uploads โ”œโ”€โ”€ ๐Ÿ“ database/ # Database schema โ”œโ”€โ”€ ๐Ÿ“ ai/ # AI/ML components โ””โ”€โ”€ ๐Ÿ“ docs/ # Documentation ``` ## ๐Ÿš€ Quick Start ### Prerequisites - PHP 8.0+ - MySQL 8.0+ - Python 3.9+ - Composer - Git ### Installation 1. **Clone the repository** ```bash git clone https://github.com/studiokunj/photo-critique.git cd photo-critique ``` 2. **Install dependencies** ```bash # PHP dependencies composer install # Python dependencies cd ai/ pip install -r requirements.txt cd .. ``` 3. **Configure environment** ```bash cp .env.example .env # Edit .env with your database and configuration settings ``` 4. **Set up database** ```bash mysql -u root -p -e "CREATE DATABASE u987364504_photocretique;" mysql -u root -p u987364504_photocretique < database/schema.sql ``` 5. **Configure web server** ```bash # For development php -S localhost:8000 # For production, configure Apache/Nginx virtual host ``` 6. **Set permissions** ```bash chmod 755 public/uploads/ chown -R www-data:www-data public/uploads/ # Linux/Apache ``` ### Environment Configuration Create a `.env` file with your configuration: ```env # Application APP_ENV=development APP_DEBUG=true APP_URL=http://localhost:8000 # Database DB_HOST=localhost DB_NAME=u987364504_photocretique DB_USER=root DB_PASSWORD=your_password # AI Configuration AI_PYTHON_PATH=/usr/bin/python3 AI_SCRIPT_PATH=ai/analyze_composition.py # Security JWT_SECRET=your_jwt_secret_key ENCRYPTION_KEY=your_encryption_key # File Uploads UPLOAD_MAX_SIZE=10485760 UPLOAD_PATH=public/uploads/ ``` ## ๐ŸŽฏ Usage ### For Photographers 1. **Upload Photos**: Drag and drop or browse to upload images 2. **Choose Analysis Tool**: Select from AI analysis, lighting study, mood analysis, etc. 3. **Review Results**: Get detailed feedback with visual overlays 4. **Track Progress**: Monitor improvement over time 5. **Learn & Improve**: Follow suggestions and educational content ### For Developers 1. **API Integration**: Use RESTful APIs for custom integrations 2. **Custom Tools**: Extend the platform with new analysis tools 3. **Theming**: Customize the UI with the CSS framework 4. **Plugins**: Develop additional features using the modular architecture ## ๐Ÿ“š Documentation - **[Product Documentation](docs/PRODUCT_DOCUMENTATION.md)** - Comprehensive product overview - **[Developer Guide](docs/DEVELOPER_GUIDE.md)** - Technical documentation for developers - **[API Reference](docs/API_REFERENCE.md)** - Complete API documentation - **[User Guide](docs/USER_GUIDE.md)** - End-user documentation ## ๐Ÿงช Testing ### Running Tests ```bash # PHP Unit Tests composer test # JavaScript Tests npm test # Python Tests cd ai/ python -m pytest ``` ### Test Coverage ```bash # Generate coverage reports composer test-coverage npm run test:coverage ``` ## ๐Ÿš€ Deployment ### Production Deployment 1. **Server Setup** ```bash # Install required packages sudo apt update sudo apt install php8.0 php8.0-mysql php8.0-gd python3 python3-pip # Install Python dependencies pip3 install -r ai/requirements.txt ``` 2. **Database Configuration** ```bash mysql -u root -p -e "CREATE DATABASE u987364504_photocretique;" mysql -u root -p u987364504_photocretique < database/schema.sql ``` 3. **Web Server Configuration** ```apache ServerName yourdomain.com DocumentRoot /var/www/photo-critique SSLEngine on SSLCertificateFile /path/to/certificate.crt SSLCertificateKeyFile /path/to/private.key AllowOverride All Require all granted ``` ### Docker Deployment ```bash # Build and run with Docker docker build -t photo-critique . docker run -p 80:80 photo-critique # Or use Docker Compose docker-compose up -d ``` ## ๐Ÿ”ง Configuration ### Core Configuration The platform uses a centralized configuration system located in `src/config/app.config.js`: ```javascript const AppConfig = { app: { name: 'Studio Kunj Photo Critique', version: '2.0.0', environment: 'production' }, api: { baseUrl: '/api', timeout: 30000 }, upload: { maxFileSize: 5 * 1024 * 1024, // 5MB allowedTypes: ['image/jpeg', 'image/png', 'image/gif', 'image/webp'] } }; ``` ### Database Configuration Database settings are managed in `src/config/database.config.php` with environment-specific configurations. ## ๐Ÿ” Security ### Security Features - **Input Validation**: Comprehensive sanitization and validation - **File Security**: Malware scanning and type validation - **Authentication**: Secure JWT-based authentication - **Authorization**: Role-based access control - **HTTPS**: SSL/TLS encryption for all communications - **GDPR Compliance**: Data protection and privacy controls ### Security Best Practices 1. **Keep Dependencies Updated**: Regularly update all dependencies 2. **Environment Variables**: Store sensitive data in environment variables 3. **File Permissions**: Set appropriate file and directory permissions 4. **Regular Backups**: Implement automated backup strategies 5. **Monitoring**: Set up security monitoring and logging ## ๐Ÿค Contributing We welcome contributions from the community! Please read our [Contributing Guidelines](CONTRIBUTING.md) before submitting pull requests. ### Development Workflow 1. **Fork the repository** 2. **Create a feature branch** ```bash git checkout -b feature/amazing-feature ``` 3. **Make your changes** 4. **Run tests** ```bash composer test npm test ``` 5. **Commit your changes** ```bash git commit -m "Add amazing feature" ``` 6. **Push to the branch** ```bash git push origin feature/amazing-feature ``` 7. **Open a Pull Request** ### Code Standards - **PHP**: Follow PSR-12 coding standards - **JavaScript**: Use ES6+ features and JSDoc comments - **CSS**: Follow BEM methodology - **Git**: Use conventional commit messages ## ๐Ÿ“Š Performance ### Optimization Features - **Lazy Loading**: Images and components load on demand - **Caching**: Multi-level caching for improved performance - **CDN Support**: Content delivery network integration - **Image Optimization**: Automatic image compression and resizing - **Database Optimization**: Efficient queries and indexing ### Performance Metrics - **Page Load Time**: < 2 seconds - **API Response Time**: < 500ms - **Image Analysis**: < 30 seconds - **Uptime**: 99.9% availability ## ๐Ÿ› Troubleshooting ### Common Issues #### Database Connection Error ```bash # Check database credentials in .env # Ensure MySQL service is running sudo systemctl status mysql ``` #### Python Script Not Found ```bash # Verify Python path in .env which python3 # Check script permissions chmod +x ai/analyze_composition.py ``` #### Upload Permission Denied ```bash # Set correct permissions chmod 755 public/uploads/ chown -R www-data:www-data public/uploads/ ``` ### Getting Help - **Documentation**: Check the [docs](docs/) directory - **Issues**: Report bugs on [GitHub Issues](https://github.com/studiokunj/photo-critique/issues) - **Discussions**: Join [GitHub Discussions](https://github.com/studiokunj/photo-critique/discussions) - **Email**: Contact support@studiokunj.com ## ๐Ÿ“ˆ Roadmap ### Version 2.1 (Q1 2024) - [ ] Advanced AI models - [ ] Mobile app (React Native) - [ ] Social features - [ ] API v2 with GraphQL ### Version 2.2 (Q2 2024) - [ ] Real-time collaboration - [ ] Advanced analytics - [ ] White-label solutions - [ ] Enterprise features ### Version 3.0 (Q3 2024) - [ ] Machine learning improvements - [ ] Real-time camera integration - [ ] Advanced educational content - [ ] Multi-language support ## ๐Ÿ“„ License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## ๐Ÿ™ Acknowledgments - **OpenCV Community** - For computer vision capabilities - **PHP Community** - For robust backend framework - **Photography Community** - For feedback and feature requests - **Contributors** - For making this project better ## ๐Ÿ“ž Support - **Website**: [https://studiokunj.com](https://studiokunj.com) - **Email**: support@studiokunj.com - **Documentation**: [https://docs.studiokunj.com](https://docs.studiokunj.com) - **Community**: [https://community.studiokunj.com](https://community.studiokunj.com) --- **Made with โค๏ธ by Studio Kunj** *Empowering photographers through intelligent analysis and education*