# NeutroSFE final deployment package

Source: combined/hr-sales-preview, commit c6065fcd1cfdea419dcde81ea10439d227d29a7b.

## Contents

- application/ - complete combined application with production Composer dependencies (vendor included).
- neutro_sfe_final.sql - ONE complete application schema and data dump, including all 13 migrations.
- historical-file-references.json - records the historical file archives referenced in the supplied dump but unavailable locally.
- VERIFICATION.txt and SHA256SUMS.txt - validation results and file integrity hashes.

## Install

1. Back up the live application, its .env and database first. Create a NEW EMPTY application database and a database user with access to that database.
2. Upload application/ to a private directory outside the publicly accessible document root. Keep the SQL dump and these deployment documents outside the public website.
3. Configure the domain's document root to application/public. Apache must allow the included public/.htaccess rewrite rules. Never point the domain at application/ itself.
4. Select PHP 8.3 or newer compatible PHP. Enable PDO MySQL, DOM/XML/XMLReader, ZIP, fileinfo, OpenSSL, iconv, mbstring, tokenizer and session support. Production vendor dependencies are included; Node/npm is not required. Check server requirements with Composer if installed: composer check-platform-reqs --no-dev.
5. Copy application/.env.production.example to application/.env. Set APP_URL to your HTTPS domain and enter DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME and DB_PASSWORD. APP_ENV must stay production and APP_DEBUG false. Configure mail as needed; the template uses log mail.
6. Import neutro_sfe_final.sql into the NEW EMPTY database through phpMyAdmin, or:

   mysql -h YOUR_DB_HOST -u YOUR_DB_USER -p YOUR_DATABASE_NAME < neutro_sfe_final.sql

   Do not import mysql.sql. Do not import this full snapshot over an existing populated live database.
7. From application/ run with the server's PHP 8.3+ CLI:

   php artisan key:generate --force
   php artisan migrate --force
   php artisan storage:link
   php artisan config:cache
   php artisan route:cache
   php artisan view:cache

   The SQL already records all migrations as run; migrate should report nothing to migrate. Do NOT run migrate:fresh, db:wipe or db:seed.
8. Grant the web-server account write access to storage/ and bootstrap/cache/ using the hosting provider's ownership/permissions tools. The included vendor/ is ready to use. If rebuilding it, run composer install --no-dev --prefer-dist --optimize-autoloader.
9. Sign in with the existing admin credentials from the supplied database. The local preview password is deliberately not included. Review HR payroll policies and per-user module access in the existing Settings/Module Management before real processing. Check Employees, HR Overview, Attendance, Payroll, Sales Upload and the sales reports.

For an existing deployment with encrypted values, preserve its APP_KEY rather than generating a replacement. This supplied snapshot has no encrypted MFA secrets. Existing user passwords remain unchanged; active sessions, caches, password-reset tokens and remember-login tokens are omitted/reset for deployment.

## Data included and limits

This snapshot was rebuilt from the supplied neutro_sfe.sql and upgraded with the combined branch migrations, MenuSeeder and HR domain reference records. It retains the supplied settings, roles, employee and payroll data. It excludes local preview accounts, preview uploads and test data created after the supplied dump. The original admin and e1007 accounts remain.

The source dump contains 10 employees, 19 payslips and no sales transactions. All sales module tables and code are included, but transaction history cannot be manufactured from the separate mysql.sql system-database dump.

All 16 historical import-file references in the supplied database point to archives unavailable on this machine. Their metadata and any already-imported database records remain intact. Historical file download/reprocessing requires recovering those original archives from the old installation; no preview/test files are substituted. No nonempty attachment/image file references were present beyond these import archives.

General settings and role implementation comes from the complete sale branch; HR-specific default settings, role modifications and account provisioning were excluded as requested. Payroll domain setup (components, tax slabs, leave policies) is included. Existing supplied database role/settings values are preserved.

The front end loads pinned CDN libraries, so client browsers need access to the CDNs. This package has not been deployed to or verified on your live server. No browser automation surface was available for visual/JavaScript validation.

If anything fails after deployment, restore the backed-up application/.env and point the site back at the original database. Keep the new database separate until acceptance.
