# Astrabank (PHP + MySQL) — Banking System (MVP+)

A modern, realistic banking portal with:
- Customer & Admin dashboards
- Email OTP for high-risk actions
- Bank-grade ledger (ledger_txn + ledger_entries)
- Admin credit/debit (adjust balance) with audit log
- Wire transfers: create → OTP verify → admin approve
- Crypto wallets (BTC/ETH/USDT) ledger-based + admin approval for sends
- Clean “big-bank” UI vibe using Bootstrap 5 + Tailwind CDN

## Tech
- PHP 8+
- MySQL 5.7+ / 8+
- Bootstrap 5.3 + Tailwind CDN

## Installation (Local)
1) Copy project to your server web root:
   - XAMPP: `htdocs/astrabank`
   - MAMP: `htdocs/astrabank`

2) Create database:
   - DB name: `astrabank`

3) Import:
   - `sql/schema.sql`
   - `sql/seed_admin.sql` (optional: creates default super admin)

4) Update DB creds:
   - Edit: `app/config/config.php`

5) Open in browser:
   - `http://localhost/astrabank/public`

## Default Admin (if you import seed_admin.sql)
- Email: `admin@astrabank.local`
- Password: `Admin@123`

## Notes
- Email OTP uses PHP `mail()` for the demo. In production, connect SMTP (PHPMailer, Mailgun, etc.).
- Crypto module is ledger-based for safety (no private keys). You can later connect real blockchain APIs.
- All admin actions write to `audit_logs`.

## Folder map
- `public/` → website + portals
- `public/customer` → customer dashboard pages
- `public/admin` → admin dashboard pages
- `app/helpers` → OTP, CSRF, banking helpers
- `sql/` → database schema and seeds
