# QVX Cleanup Analysis Report

## Result
A clean QVX Laravel foundation was produced from the uploaded Apogee Music project. The original upload was left unchanged.

## Measured reduction
- Original archive files: **10,524**
- Original uncompressed size: **276.92 MB**
- Clean QVX source files: **151**
- Clean QVX source size before ZIP compression: **0.89 MB**

The largest removed content was stored music/media (about 197 MB in `storage/`) and packaged Composer dependencies (about 67 MB in `vendor/`).

## Kept
- Laravel 12 foundation
- React 19 + Inertia + TypeScript
- Tailwind/reusable UI primitives
- Authentication and email verification
- Password reset
- Profile/password/appearance settings
- Base users, cache and jobs migrations
- Database session/cache/queue foundations
- Generic starter tests
- S3-compatible filesystem configuration

## Adapted for QVX
- Branding changed to **QVX / Qualification Verification Exchange**
- `.env.example` changed to PostgreSQL defaults and Africa/Lusaka timezone
- Cloudflare R2-compatible S3 placeholders retained
- `User` model returned to a neutral account model for future QVX RBAC/tenancy
- Inertia middleware stripped of artist/label/subscription queries
- Sidebar and dashboard replaced with a clean QVX foundation
- Scheduler stripped of streaming jobs
- `config/services.php` stripped of SchoolPay settings
- Hard self-service account deletion removed; QVX should use governed deactivation/suspension so audit history can be preserved

## Removed as unrelated to QVX
- Artist and label applications/profiles
- Releases, tracks, contributors and rights splits
- Streaming and audio processing
- Royalties and payouts
- Music subscriptions and payment gateways
- ISRC allocation/verification
- Music analytics and scheduled commands
- Apogee mail templates and jobs
- Music-domain migrations and seeders
- Stored audio, previews, streams and cover artwork
- Generated frontend build assets
- Runtime logs and Bootstrap cache artifacts
- Uploaded `.env` and environment-specific secrets
- Packaged `vendor/` directory

## Validation performed
- All retained PHP files passed syntax validation.
- Laravel successfully booted and generated its route list after cleanup.
- All retained `@/` frontend alias imports resolve to local source files.
- No `.env`, logs, music files or removed Apogee domain directories remain.
- PHPUnit could not run in the analysis container because its PHP build lacks the DOM extension (`DOMDocument`).
- `npm ci` could not complete in the analysis environment due to package-download connectivity/time limits. Run `npm install && npm run build` in your development/server environment.

## Next development step
Start QVX Phase 1 from this foundation: identity/RBAC, institution tenancy/onboarding, qualification registry, then learner achievements.
