# Installation Guide

## Recommended cPanel layout
```
/home/ACCOUNT/bcos/             application root
/home/ACCOUNT/bcos/public/      portal.baffoes.com document root
/home/ACCOUNT/bcos/storage/     private writable storage
```
Do not place the whole application directly inside public_html.

## PHP extensions
Verify: `pdo_mysql`, `openssl`, `json`, `mbstring`, `session`, `fileinfo`.

## File permissions
Directories: 750 or host-equivalent. Files: 640. `storage/` writable by the PHP account. Never use 777.

## Database
Import migrations 001, 002 and 003 in order, followed by seeds. Use a database user limited to the BCOS database and necessary DML privileges.

## Cloudflare baseline
Use Full (Strict) TLS, proxy the portal DNS record, enable managed WAF rules and rate-limit login/reset endpoints. Do not cache `/api/*` or authenticated pages.
