# Skulitech ERP — Laravel 13 Migration Package

This package wraps the existing Skulitech ERP in a Laravel 13 application **without changing the current MySQL schema, user-facing design, or legacy URLs**.

## What is preserved

- 169 PHP module pages plus the root login/portal pages.
- Existing Admissions, Academics, Exams, Finance, Procurement, HR/Payroll, ILO, Library, Transport, Welfare, Portal, Reports, Communications, Users and Settings workflows.
- Existing Bootstrap-based visual design and local Bootstrap Icons/JQuery assets.
- `database/schema/college_erp_current.sql` and all existing SQL migration/upgrade files.
- Existing uploads/imports/exports behavior through the Laravel compatibility router.
- Existing role privileges, session controls, activity logging and CSRF logic while pages remain in the compatibility layer.

## Laravel 13 requirements

- PHP 8.3 or newer
- Composer 2
- MySQL 8+ recommended
- Apache/LiteSpeed with mod_rewrite or Nginx

## Install

```bash
cp .env.example .env
composer install --no-dev --optimize-autoloader
php artisan key:generate
```

Configure MySQL in `.env`. For an existing Skulitech database, **do not import again**. Point `DB_DATABASE`, `DB_USERNAME`, and `DB_PASSWORD` to that database.

For a blank database:

```bash
php artisan skulitech:install-schema --force
```

Then optimize:

```bash
php artisan optimize
```

The web server document root must point to the `public/` directory.

## Migration architecture

- `public/index.php` — Laravel 13 front controller.
- `routes/web.php` — Laravel routing with compatibility catch-all.
- `app/Http/Controllers/LegacyBridgeController.php` — safely dispatches existing `.php` workflows through Laravel.
- `legacy/` — preserved ERP implementation used during the compatibility phase.
- `app/Models/` — native Eloquent models for core Skulitech entities.
- `database/schema/` — unchanged production schema.

This approach prevents a big-bang rewrite from changing billing, marks, procurement, payroll, admissions, or other business rules. Individual modules can now be moved from `legacy/` into native Laravel controllers/services/Blade views one at a time while keeping their URLs and database tables stable.

See `LARAVEL_MIGRATION_STATUS.md` and `CPANEL_LARAVEL13_DEPLOYMENT.md`.
