# BLUBLAC SIGNAGE — cPanel installation

This is the first installable PHP/MySQL application foundation. It includes the public website, service and inspiration pages, customer registration/login, quote requests, a basic customer portal, and a staff/owner quote dashboard. PayFast is not included.

## Before you install
- Your Afrihost Platinum Linux cPanel hosting and `blublac.co.za`.
- SSL/HTTPS enabled for the domain.
- Access to cPanel File Manager and MySQL Database Wizard.
- Do not send anyone your cPanel password or database password.

## 1. Create the database
In cPanel, open **MySQL Database Wizard**:
1. Create a database, e.g. `blublac_app`.
2. Create a database user with a strong unique password.
3. Add the user to the database and grant **ALL PRIVILEGES**.
4. Note the full cPanel-prefixed database name and username.

## 2. Import the database tables
Open **phpMyAdmin**, select the new database, choose **Import**, and upload `database/schema.sql`.

## 3. Set the database configuration
Copy `config.example.php` to `config.php` in the project root. Edit `config.php` with the database name, username and password. Do not put `config.php` inside `public`.

## 4. Upload files
Recommended layout:
- Put the contents of the `public` folder into `public_html`.
- Put `app`, `database`, `storage`, `config.php` and `INSTALLATION.md` one level above `public_html` where your account allows it.
- If your hosting account does not allow that layout, stop and ask before placing private files inside the public web directory.

The public folder contains `index.php` and `assets/style.css`. The `index.php` expects `app` and `config.php` one directory above `public_html`.

## 5. Create the owner account
For the first version, register your own account through the website. Then use phpMyAdmin to promote that account to owner:
`UPDATE users SET role='owner' WHERE email='YOUR_EMAIL_ADDRESS';`
Replace the email with your own account email. Do not share your password.

## 6. Test
- Open `https://blublac.co.za`.
- Create a test customer account using a separate email.
- Submit a test quote.
- Sign in as the owner and confirm the quote appears in the admin dashboard.
- Confirm the customer account only sees its own portal data.

## Important limitations in this first build
- No PayFast integration.
- Invoice and project tables are ready, and customers can view records once staff add them, but full invoice/project management screens are not yet implemented.
- Artwork upload workflow is not yet implemented. Do not accept sensitive customer files through an unprotected workaround.
- Email notifications, password reset, detailed staff permissions, audit logging, and automated backups still need to be added before a full public launch.
- This starter is not yet a completed production system. Test it on a staging location before replacing any existing website.

## Security
Use HTTPS. Keep `config.php`, SQL exports and `storage` outside `public_html`. Use a strong database password. Keep cPanel and email credentials private. Back up the database and files before changes.
