TANZANIA FREE MARKET V2 - INSTALLATION
1. Backup database and files.
2. Import database_upgrade.sql into existing tanzania_free_market database:
   mysql -u root -p tanzania_free_market < database_upgrade.sql
3. Configure includes/db.php or environment variables TFM_DB_HOST, TFM_DB_NAME, TFM_DB_USER, TFM_DB_PASS.
4. Permissions:
   chown -R www-data:www-data /var/www/sokoni
   find /var/www/sokoni -type d -exec chmod 755 {} \;
   find /var/www/sokoni -type f -exec chmod 644 {} \;
   chmod -R 775 /var/www/sokoni/assets/uploads
5. Use HTTPS. Disable display_errors in production. Keep PHP/MySQL updated.
6. Change the starter admin password immediately.
7. API endpoints: api/v1/login.php, api/v1/products.php, api/v1/me.php.
NOTE: No web application can honestly be guaranteed impossible to hack. This build reduces common risks using prepared statements, password_hash, CSRF, output escaping, upload validation, rate limits, secure cookies and security headers. A real launch also needs server hardening, backups, logs, malware scanning, WAF/CDN, penetration testing, email/phone verification and monitoring.
