# Portfolio projections — apply

    cp -R portfolio-projections/app/*       ./app/
    cp -R portfolio-projections/config/*    ./config/
    cp -R portfolio-projections/resources/* ./resources/
    cp -R portfolio-projections/tests/*     ./tests/

## Routes — add inside the auth group:
    Route::get('/portfolio/projections', [\App\Http\Controllers\ProjectionsController::class, 'index'])->name('portfolio.projections');
    Route::get('/portfolio/monthly-projections', [\App\Http\Controllers\ProjectionsController::class, 'monthly'])->name('portfolio.monthly-projections');
    Route::get('/portfolio/previous-movement', [\App\Http\Controllers\ProjectionsController::class, 'previousMovement'])->name('portfolio.previous-movement');

## PortfolioController — the retention() method must now pass the projection summary:
Replace its 'summary' payload with:
    'summary' => app(\App\Analytics\Services\ProjectionService::class)->retentionSummary($location, $window),

## Build + test
    php artisan route:clear && php artisan config:clear
    php artisan test --filter='Projection|PortfolioReport'
    node node_modules/vite/bin/vite.js build

## The model (config/portfolio.php)
Non-renewal rates by renewal stage — 1st 45%, 2nd 25%, 3rd 15%, long term 8%.
These reproduce the operations team's existing projections exactly (25 first-renewal
leases → 11.3 projected move-outs, 15 second → 3.8, and so on).

    Grand total MO = non-renewal projected + broken projected + scheduled MO
    Projected net move-in = projected leases signed + scheduled move-ins − grand total MO

Broken-lease rate is derived from history (leases whose move_out preceded lease_end
over the last 12 months, per month). Projected leases signed uses the trailing
24-month average of move-ins for that calendar month, so it carries seasonality.
The current month is prorated by days remaining.

## What's new in the UI
- Overview: window selector (30/60/90/180/365) + "Prev N Day Net MI" drill-down per card
- Retention: renewal tiles with projected MO, grand-total banner, Monthly Projections link
- Monthly Projections: 12-month renewal/MO table
- Projections tab: 12-month occupancy forecast with net move-in and projected occupancy
