feat: Add comprehensive documentation suite and reorganize project structure

- Created complete documentation in docs/ directory
- Added PROJECT_OVERVIEW.md with feature highlights and getting started guide
- Added ARCHITECTURE.md with system design and technical details
- Added SECURITY.md with comprehensive security implementation guide
- Added DEVELOPMENT.md with development workflows and best practices
- Added DEPLOYMENT.md with production deployment instructions
- Added API.md with complete REST API documentation
- Added CONTRIBUTING.md with contribution guidelines
- Added CHANGELOG.md with version history and migration notes
- Reorganized all documentation files into docs/ directory for better organization
- Updated README.md with proper documentation links and quick navigation
- Enhanced project structure with professional documentation standards
This commit is contained in:
SamiAhmed7777
2025-10-21 00:39:45 -07:00
commit 0b7e2d0a5b
6080 changed files with 1332936 additions and 0 deletions

94
.htaccess Normal file
View File

@@ -0,0 +1,94 @@
# EasyStream Docker Container URL Routing Configuration
# Optimized for Caddy + PHP-FPM container setup
RewriteEngine On
# Security Rules - Block access to sensitive directories
RewriteRule ^f_core/ - [F,L]
RewriteRule ^f_data/(?!media|uploads) - [F,L]
RewriteRule ^deploy/ - [F,L]
RewriteRule ^\.git/ - [F,L]
RewriteRule ^docker-compose\.yml$ - [F,L]
RewriteRule ^Dockerfile - [F,L]
# Container Health Check
RewriteRule ^health/?$ health_check.php [L]
# Token System Routes (Container-specific)
RewriteRule ^token[_-]purchase/?$ f_modules/m_frontend/m_donations/token_purchase.php [L,QSA]
RewriteRule ^token[_-]redemption/?$ f_modules/m_frontend/m_donations/token_redemption.php [L,QSA]
RewriteRule ^tokens/?$ f_modules/m_frontend/m_donations/token_purchase.php [L,QSA]
# Donation System Routes
RewriteRule ^donate/?$ f_modules/m_frontend/m_donations/rainforest_donation_form.php [L,QSA]
RewriteRule ^donation/?$ f_modules/m_frontend/m_donations/rainforest_donation_form.php [L,QSA]
# Main Application Routes - Direct routing to index.php
RewriteRule ^browse/?$ index.php [L,QSA]
RewriteRule ^videos/?$ index.php [L,QSA]
RewriteRule ^broadcasts/?$ index.php [L,QSA]
RewriteRule ^pictures/?$ index.php [L,QSA]
RewriteRule ^images/?$ index.php [L,QSA]
RewriteRule ^music/?$ index.php [L,QSA]
RewriteRule ^audios/?$ index.php [L,QSA]
RewriteRule ^documents/?$ index.php [L,QSA]
RewriteRule ^blogs/?$ index.php [L,QSA]
RewriteRule ^shorts/?$ index.php [L,QSA]
RewriteRule ^search/?$ index.php [L,QSA]
RewriteRule ^upload/?$ index.php [L,QSA]
RewriteRule ^view/([^/]+)/?$ index.php [L,QSA]
# User Account Routes - Direct routing to index.php
RewriteRule ^signin/?$ index.php [L,QSA]
RewriteRule ^signup/?$ index.php [L,QSA]
RewriteRule ^register/?$ index.php [L,QSA]
RewriteRule ^account/?$ index.php [L,QSA]
RewriteRule ^@([^/]+)/?$ index.php [L,QSA]
RewriteRule ^channel/([^/]+)/?$ index.php [L,QSA]
# Admin Panel Routes - Route to admin dashboard
RewriteRule ^admin/?$ admin_dashboard.php [L,QSA]
RewriteRule ^admin/([^/]+)/?$ admin_dashboard.php [L,QSA]
RewriteRule ^admin/([^/]+)/([^/]+)/?$ admin_dashboard.php [L,QSA]
# API Routes
RewriteRule ^api/(.*)$ f_modules/api/index.php?endpoint=$1 [L,QSA]
# Webhook Routes (Container-specific)
RewriteRule ^webhook/rainforest/?$ f_modules/m_frontend/m_donations/rainforest_webhook.php [L]
RewriteRule ^webhooks/(.*)$ f_modules/webhooks/$1.php [L]
# Container Media Routes (Volume mounts)
RewriteRule ^hls/(.*)$ /var/www/hls/$1 [L]
RewriteRule ^rec/(.*)$ /mnt/rec/$1 [L]
RewriteRule ^media/(.*)$ f_data/media/$1 [L]
RewriteRule ^uploads/(.*)$ f_data/uploads/$1 [L]
RewriteRule ^thumbs/(.*)$ f_data/thumbs/$1 [L]
# Static Asset Routes
RewriteRule ^css/(.*)$ f_templates/tpl_frontend/css/$1 [L]
RewriteRule ^js/(.*)$ f_scripts/fe/js/$1 [L]
RewriteRule ^img/(.*)$ f_scripts/fe/img/$1 [L]
# Legacy Support Routes
RewriteRule ^view/([^/]+)/?$ index.php?page=watch&v=$1 [L,QSA]
RewriteRule ^user/([^/]+)/?$ index.php?page=channel&user=$1 [L,QSA]
# Container-specific fallback - Route everything to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/f_modules/
RewriteCond %{REQUEST_URI} !^/admin_dashboard\.php
RewriteCond %{REQUEST_URI} !^/health_check\.php
RewriteCond %{REQUEST_URI} !^/f_data/
RewriteCond %{REQUEST_URI} !^/f_templates/
RewriteCond %{REQUEST_URI} !^/f_scripts/
RewriteRule ^(.*)$ index.php [L,QSA]
# Container PHP Configuration
php_flag display_errors Off
php_flag log_errors On
php_value max_execution_time 300
php_value memory_limit 512M
php_value upload_max_filesize 500M
php_value post_max_size 500M