# Venue Events Manager

Conference, banquet, and events management software for hotels, conference centres, banquet halls, gardens and event venues. Manage customers, space availability, bookings, quotations, invoices, payments, reports and staff access from a single server-rendered web application.

## Features / Modules

- Authentication and user profiles
- Dashboard with reservation, financial and space summaries
- Customer management with archive and histories
- Space and venue management (layouts, images, blocks)
- Availability calendar (FullCalendar, local assets)
- Products, services and packages with charge bases
- Event bookings and multi-space reservations
- Provisional holds with lazy expiry (no cron required)
- Quotations (snapshots, revisions, PDF) and conversion to invoices without duplicating bookings
- Invoices, payments, receipts and automatic balances
- Attachments (private storage, authorised download)
- Reports with CSV / PDF / print export
- Users, roles and granular permissions
- Settings and audit logs
- In-system notifications
- cPanel web installation wizard

## Requirements

- PHP 8.2+
- MySQL 8.0 / MariaDB (InnoDB, utf8mb4) — SQLite supported for local development / tests
- Composer (local/build only; production package includes `vendor/`)
- Apache with `mod_rewrite` (typical on cPanel)

**Not required on production:** Node.js, Redis, Supervisor, Docker, queue workers, SSH during install, paid services.

## Quick Start (Development)

```bash
# From the project root (PHP 8.2 on PATH)
php composer.phar install   # or: composer install
copy .env.example .env      # Windows; use cp on Linux/macOS
php artisan key:generate
php artisan migrate --seed
php artisan serve
```

Default seeded administrator: `admin@venue.local` / `password` — change immediately after first login.

Optional rich fictional demo data (customers, spaces, packages, bookings, quotes, invoices, payments, notifications):

```bash
php artisan venue:seed-demo
# or
php artisan db:seed --class=DemoSeeder
```

Or import the SQL file into MySQL/MariaDB (phpMyAdmin or CLI):

```bash
mysql -u USER -p DATABASE < database/demo_data.sql
```

File: [`database/demo_data.sql`](database/demo_data.sql). Safe to re-import (clears previous `DEMO-*` rows first).  
Regenerate after changing the seeder: `php scripts/export_demo_sql.php`

Demo logins (password `password`): `admin@venue.local`, `sales@venue.local`, `finance@venue.local`, `reservations@venue.local`.

## Testing

```bash
php artisan test
```

See [TESTING.md](TESTING.md).

## Release Build (cPanel ZIP)

```bash
php scripts/export_install_sql.php --force
php scripts/build_cpanel_release.php
```

Output:

`dist/venue-events-manager-cpanel.zip`

The archive contains `application/` (Laravel + vendor) and `public_html/` (web root + installer + bundled assets). It does **not** include `.env`, `node_modules`, `.git`, or `radminly/`.

## cPanel Overview

1. Select PHP 8.2 in cPanel.
2. Create a MySQL database and user.
3. Upload `venue-events-manager-cpanel.zip` into **`public_html`** and extract (all files go there).
4. Visit `/install/` and complete the wizard.
5. Delete the `install` folder; enable HTTPS.

Full steps: [CPANEL_INSTALLATION.md](CPANEL_INSTALLATION.md).

## Security Notes

- CSRF, validation, policies and permission middleware on protected routes
- Soft-delete archives for referenced master data
- Issued invoices are voided, never deleted; balances derive from payments
- Private attachments are not publicly downloadable
- Production: `APP_DEBUG=false`, no credentials in the repository

See [SECURITY.md](SECURITY.md).

## Backup Recommendations

- Daily MySQL dumps of the application database
- Copy `storage/app` (attachments + installed lock) and the `.env` file to secure off-site storage
- Retain ZIP releases for rollback

## Documentation Index

| Document | Purpose |
|----------|---------|
| [PROJECT_PLAN.md](PROJECT_PLAN.md) | Architecture overview and phases |
| [TASKS.md](TASKS.md) | Implementation checklist |
| [INSTALLATION.md](INSTALLATION.md) | Technical install |
| [CPANEL_INSTALLATION.md](CPANEL_INSTALLATION.md) | Non-technical cPanel steps |
| [DEVELOPMENT.md](DEVELOPMENT.md) | Developer workflow |
| [TESTING.md](TESTING.md) | Test suite guide |
| [CHANGELOG.md](CHANGELOG.md) | Release history |
| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | System design |
| [docs/BUSINESS_RULES.md](docs/BUSINESS_RULES.md) | Domain rules |
| [docs/DATABASE_SCHEMA.md](docs/DATABASE_SCHEMA.md) | Schema summary |
| [docs/ROLES_AND_PERMISSIONS.md](docs/ROLES_AND_PERMISSIONS.md) | RBAC matrix |
| [docs/USER_GUIDE.md](docs/USER_GUIDE.md) | Operator guide |

## UI Reference

Layout and interaction patterns are inspired by the local `radminly/` admin template (Tailwind demo kit). The shipped UI uses Bootstrap 5 and Alpine.js from `public/assets/` so production does not need Node/Vite.

## License

Proprietary — Venue Events Manager.
