# DPSVR Server Installation Guide

This package is a full Laravel source-code application. It does not include the `vendor` folder. Your server installs dependencies with Composer.

## Server requirements

- PHP 8.2 or higher
- Composer 2+
- MySQL 8+ or MariaDB 10.6+
- PHP extensions: bcmath, ctype, curl, dom, fileinfo, json, mbstring, openssl, pdo, pdo_mysql, tokenizer, xml, zip
- Web server document root pointed to `/public`
- HTTPS SSL certificate
- Cron support

## Install steps on VPS/cPanel Laravel-compatible hosting

1. Upload and extract the ZIP into your application folder.
2. Point your domain/subdomain document root to the `public` folder.
3. Create a MySQL database and database user.
4. Copy `.env.example` to `.env`.
5. Edit `.env` with your database and domain details.
6. Run these commands from the application root:

```bash
composer install --no-dev --optimize-autoloader
php artisan key:generate
php artisan storage:link
php artisan migrate --seed
php artisan config:cache
php artisan route:cache
php artisan view:cache
```

7. Add this cron job:

```bash
* * * * * cd /path/to/dpsvr && php artisan schedule:run >> /dev/null 2>&1
```

8. Visit your domain and login with:

```text
admin@dpsvr.local
password
```

9. Change the admin email and password immediately.

## Local test run

```bash
cp .env.example .env
composer install
php artisan key:generate
php artisan migrate --seed
php artisan serve
```

Open `http://127.0.0.1:8000`.

## Important production notes

- Set `APP_DEBUG=false` in production.
- Use a strong database password.
- Change the seeded demo admin password.
- Configure real email/SMS providers before enabling notifications.
- Run final acceptance testing before entering live financial records.
