# Balorp Ventures Website & Management System

## Requirements
- PHP 8+
- MySQL
- Apache
- cPanel / GoDaddy shared hosting
- phpMyAdmin

## Folder Structure
- `public/` - web root
- `app/` - MVC controllers, models, views, core classes
- `config/` - application configuration
- `storage/` - uploaded files and logs
- `database/` - SQL schema and seed scripts
- `docs/` - installation and ERD documentation

## Deployment Steps
1. Upload the project files to the GoDaddy account.
2. Set `public/` as the document root in cPanel if possible.
   - If cPanel does not allow a custom root, move the contents of `public/` into the actual web root and ensure paths remain correct.
3. Create a new MySQL database and user in cPanel.
4. Update `config/config.php` with your actual database credentials:
   - `host` => `localhost`
   - `name` => `your_database_name`
   - `user` => `your_db_user`
   - `pass` => `your_db_password`
5. Open phpMyAdmin.
   - Select the database you created.
   - Import `database/schema.sql`.
6. Ensure `storage/uploads`, `storage/documents`, `storage/photos`, and `storage/logs` are writable by PHP.
7. Check that `.htaccess` is enabled and `mod_rewrite` is available on Apache.
8. Replace placeholder images in `public/images/` with your project photography.
   - Recommended filenames: `hero-1.jpg`, `hero-2.jpg`, `before-after-1.jpg`, `before-1.jpg`, `after-1.jpg`, `portfolio-1.jpg`, etc.
9. Create the first admin user using phpMyAdmin and the `users` table.
   - Example SQL:
     ```sql
     INSERT INTO users (role_id, name, email, password_hash, phone)
     VALUES (1, 'Balorp Owner', 'admin@balorpfinishes.com', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHeFXCwqk7b7upK6WvYQ9na0mZzGdfc2mW', '+233240000000');
     ```
   - Replace the hash with your own generated hash from `password_hash('YourPassword', PASSWORD_DEFAULT)`.

## Notes
- Use the admin login page at `/login`.
- Use the customer portal login page at `/portal/login`.
- Wizard submissions are saved as leads in the `leads` table.
- Admin pages are protected via session-based authentication and role-based logic.
- Customize hero slides and gallery images by replacing files in `public/images/`.
- Upload customer documents and invoice PDFs to `storage/documents/` or another accessible path, then add `documents` records to the database.

## Recommended cPanel Settings
- PHP version 8.0 or higher
- `display_errors` off in production
- `open_basedir` set to include the project folder
- Use `force HTTPS` if SSL is available
