# Thryve Enterprise Platform - Installation Guide ๐Ÿš€ **Complete project management and collaboration platform with end-to-end encryption** ## ๐Ÿ“ฆ Package Overview This package contains a fully-functional enterprise platform with: - **Project Management** - Tasks, Gantt charts, Kanban boards - **Team Collaboration** - Encrypted chat, file sharing, real-time sync - **Document Management** - Wiki, collaborative editing, templates - **Visual Collaboration** - Whiteboards, mind mapping, flowcharts - **AI Assistant** - Smart scheduling, document generation, automation - **Time Tracking** - Detailed reporting, workload management - **Goal Management** - OKRs, progress tracking, alignment tools - **Multi-Currency Billing** - Stripe integration, subscriptions - **Comprehensive Admin Panel** - Complete system management - **Dark Modern UI** - Responsive, accessible, mobile-friendly ## ๐Ÿ”ง System Requirements ### Server Requirements - **PHP 8.0+** with extensions: - PDO MySQL - OpenSSL - cURL - JSON - mbstring - GD Library - **MySQL 8.0+** or MariaDB 10.5+ - **Apache 2.4+** or Nginx 1.18+ - **SSL Certificate** (required for Stripe webhooks) ### Recommended Specifications - 2+ CPU cores - 4GB+ RAM - 20GB+ disk space - SSD storage recommended ## ๐Ÿ“ฅ Installation Steps ### 1. Download & Extract ```bash # Extract the package unzip thryve-enterprise.zip cd thryve-enterprise # Set proper permissions chmod 755 -R . chmod 644 -R . chmod 755 public/ admin/ api/ projects/ chat/ documents/ chmod 777 uploads/ ``` ### 2. Database Setup ```sql -- Create database CREATE DATABASE thryve_enterprise CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -- Create user (optional) CREATE USER 'thryve_user'@'localhost' IDENTIFIED BY 'secure_password'; GRANT ALL PRIVILEGES ON thryve_enterprise.* TO 'thryve_user'@'localhost'; FLUSH PRIVILEGES; ``` ```bash # Import database schema mysql -u root -p thryve_enterprise < database/schema.sql # Import demo data (optional) mysql -u root -p thryve_enterprise < database/demo_data.sql # Add performance indexes mysql -u root -p thryve_enterprise < database/indexes.sql ``` ### 3. Configuration Setup **Copy environment template:** ```bash cp .env.example .env ``` **Edit `includes/config.php`:** ```php // Database configuration const DB_HOST = 'localhost'; const DB_NAME = 'thryve_enterprise'; const DB_USER = 'thryve_user'; const DB_PASS = 'secure_password'; // Application settings const SITE_URL = 'https://yourdomain.com'; const SECRET_KEY = 'your-unique-secret-key-here'; // Stripe keys (get from https://dashboard.stripe.com) const STRIPE_PUBLIC_KEY = 'pk_live_...'; const STRIPE_SECRET_KEY = 'sk_live_...'; const STRIPE_WEBHOOK_SECRET = 'whsec_...'; // Email configuration const SMTP_HOST = 'smtp.yourprovider.com'; const SMTP_USER = 'your@email.com'; const SMTP_PASS = 'email_password'; ``` ### 4. Web Server Configuration **Apache (.htaccess already included):** ```apache # Enable mod_rewrite a2enmod rewrite # Virtual host configuration ServerName yourdomain.com DocumentRoot /path/to/thryve-enterprise/public SSLEngine on SSLCertificateFile /path/to/certificate.crt SSLCertificateKeyFile /path/to/private.key AllowOverride All Require all granted ``` **Nginx configuration:** ```nginx server { listen 443 ssl; server_name yourdomain.com; root /path/to/thryve-enterprise/public; index index.php; ssl_certificate /path/to/certificate.crt; ssl_certificate_key /path/to/private.key; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { fastcgi_pass unix:/var/run/php/php8.0-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; } location /uploads { # Secure file access internal; } } ``` ### 5. Install Dependencies ```bash # Install Stripe PHP SDK composer install # Optional: Install additional JS tools npm install ``` ### 6. Stripe Webhook Setup 1. **Login to Stripe Dashboard** 2. **Go to Webhooks section** 3. **Add endpoint:** `https://yourdomain.com/stripe_webhook.php` 4. **Select events:** - `invoice.payment_succeeded` - `invoice.payment_failed` - `customer.subscription.updated` - `customer.subscription.deleted` 5. **Copy webhook secret** to config ### 7. Security Setup **Update default passwords:** ```sql -- Change demo admin password UPDATE users SET password_hash = '$2y$10$new_hash_here' WHERE email = 'admin@techcorp.com'; ``` **Secure file uploads:** ```bash # Create secure upload directories mkdir -p uploads/{companies,projects,tasks,messages,documents,avatars} echo "deny from all" > uploads/.htaccess ``` **Environment variables (.env):** ```env APP_ENV=production APP_DEBUG=false DB_HOST=localhost DB_NAME=thryve_enterprise DB_USER=thryve_user DB_PASS=secure_password STRIPE_PUBLIC_KEY=pk_live_... STRIPE_SECRET_KEY=sk_live_... MAIL_HOST=smtp.provider.com MAIL_USER=your@email.com MAIL_PASS=password ``` ## ๐Ÿงช Testing the Installation ### 1. Basic Functionality Test ```bash # Access the application curl -I https://yourdomain.com # Should return: HTTP/1.1 200 OK # Test admin panel curl -I https://yourdomain.com/admin/ # Should return: HTTP/1.1 200 OK (or 302 redirect to login) ``` ### 2. Database Connection Test ```php // Test script (test_db.php) fetchOne("SELECT COUNT(*) as count FROM companies"); echo "โœ… Database connection successful. Companies: " . $result['count']; } catch (Exception $e) { echo "โŒ Database error: " . $e->getMessage(); } ?> ``` ### 3. Stripe Integration Test ```php // Test script (test_stripe.php) getMessage(); } ?> ``` ## ๐ŸŽฏ Default Login Credentials **Demo Company:** TechCorp Solutions - **Admin:** admin@techcorp.com / password - **Manager:** john.doe@techcorp.com / password - **User:** alice.smith@techcorp.com / password **โš ๏ธ Change these passwords immediately in production!** ## ๐Ÿ“Š Admin Panel Access After installation, access the admin panel at: - **URL:** `https://yourdomain.com/admin/` - **Login:** Use admin account credentials - **Features:** Complete system management ### Admin Panel Capabilities: - ๐Ÿข **Company Management** - View, edit, suspend companies - ๐Ÿ‘ฅ **User Administration** - Manage users across all companies - ๐Ÿ’ณ **Subscription Control** - Stripe billing management - ๐Ÿ’ฐ **Revenue Analytics** - MRR, churn, conversions - โš™๏ธ **System Settings** - Configure features, limits - ๐Ÿ“Š **Analytics Dashboard** - Platform usage metrics - ๐Ÿ“œ **Audit Logs** - Track all admin activities ## ๐Ÿ”ง Configuration Options ### Feature Flags (admin/features.php) ```php // Toggle features for testing 'ai_assistant' => true, 'whiteboards' => true, 'time_tracking' => true, 'goal_management' => true, 'advanced_analytics' => false ``` ### System Settings (admin/settings.php) ```php // Configurable limits 'default_trial_days' => 14, 'max_file_size_mb' => 50, 'session_timeout_minutes' => 120, 'backup_retention_days' => 30 ``` ### Currency Settings ```php // Supported currencies with live rates 'CAD' => 1.00, // Base currency 'USD' => 0.74, // Auto-updated 'EUR' => 0.68, // Auto-updated 'GBP' => 0.58 // Auto-updated ``` ## ๐Ÿš€ Production Deployment Checklist ### Security - [ ] SSL certificate installed and working - [ ] Default passwords changed - [ ] File permissions set correctly (755/644) - [ ] Database user has minimal required permissions - [ ] .env file secured (not web accessible) - [ ] Debug mode disabled in production - [ ] Error logging configured - [ ] Firewall rules configured ### Performance - [ ] PHP opcache enabled - [ ] Database indexes applied - [ ] CDN configured for static assets - [ ] Gzip compression enabled - [ ] Browser caching headers set - [ ] Image optimization enabled ### Monitoring - [ ] Error logging enabled - [ ] Performance monitoring setup - [ ] Uptime monitoring configured - [ ] Backup procedures tested - [ ] Recovery procedures documented ### Stripe Configuration - [ ] Live API keys configured - [ ] Webhook endpoints verified - [ ] Test transactions completed - [ ] Tax settings configured - [ ] Payout settings verified ## ๐Ÿ”„ Backup & Maintenance ### Database Backup ```bash # Daily backup script #!/bin/bash DATE=$(date +%Y%m%d_%H%M%S) mysqldump -u thryve_user -p thryve_enterprise > backup_$DATE.sql gzip backup_$DATE.sql ``` ### File Backup ```bash # Backup uploads and configuration tar -czf thryve_backup_$DATE.tar.gz uploads/ includes/config.php .env ``` ### Update Procedure ```bash # 1. Backup current installation # 2. Download new version # 3. Replace files (keep config.php and .env) # 4. Run database migrations # 5. Clear cache and test ``` ## ๐Ÿ“ž Support & Documentation ### Troubleshooting - Check error logs: `/var/log/apache2/error.log` - Verify permissions: `ls -la uploads/` - Test database: Use provided test scripts - Check Stripe logs: Dashboard webhook logs ### Common Issues 1. **500 Error:** Check file permissions and PHP error logs 2. **Database Connection:** Verify credentials and server status 3. **Stripe Errors:** Check API keys and webhook configuration 4. **File Upload Issues:** Verify upload directory permissions ### Getting Help - ๐Ÿ“ง **Email:** support@thryve.at - ๐Ÿ“š **Documentation:** Full API and user documentation included - ๐Ÿ› ๏ธ **Debug Mode:** Enable in config for detailed error information ## ๐Ÿ“ˆ Scaling & Performance ### High Traffic Optimization - Use Redis for session storage - Implement database read replicas - Configure load balancing - Enable CDN for static assets - Optimize database queries ### Monitoring Metrics - Response times - Database query performance - Memory usage - Disk space utilization - Error rates --- ๐ŸŽ‰ **Congratulations!** You now have a fully functional enterprise project management platform. For additional support, documentation, and updates, visit: **www.thryve.at**