# Project Scope: AdminCore & Product Catalog System

This document outlines the architecture, features, paths, and technologies implemented for the **AdminCore** dashboard and **Products CRUD** system in the Laravel 12 workspace.

---

## 1. Executive Summary
The goal of this project was to transition the default Laravel Breeze authentication scaffolding into a premium, responsive **Admin Dashboard** containing a physical collapsible sidebar and a robust **Products Catalog** CRUD system.

---

## 2. Implemented Features

### 🔐 2.1 Route Adjustments & Redirection
* **Admin Pathing:** Shifted the main dashboard endpoint from `/dashboard` to `/admin/dashboard`.
* **Redirection Guards:** Configured Laravel's core auth middleware to route authenticated users directly to `/admin/dashboard` when accessing guest routes (like login or register).
* **Test Integrity:** Maintained Breeze named routes (`route('dashboard')`) ensuring all 25 default feature test assertions remain 100% stable.

### 📐 2.2 Collapsible Sidebar Shell
* **Dynamic Width:** Collapses from **256px** (`w-64`) to **80px** (`w-20`) on desktop using Alpine.js inline style binding.
* **Auto-Resizing Grid:** The main content layout utilizes a flex container (`flex-1`) that auto-adjusts to fill the remaining screen space.
* **Circular Active States:** Icons shrink and center into circular buttons (`w-10 h-10 rounded-full mx-auto`) with glowing states when collapsed.
* **Mobile Responsiveness:** Slides out off-canvas using a backdrop blur mask on mobile screens (`< 768px`).

### 📦 2.3 Products CRUD Catalog
* **Database Schema:** Created the `products` table tracking Name, unique SKU Code, Price, Stock Quantity, Status, and Descriptions.
* **Badged States:** Color-coded inventory badges tracking `'in_stock'` (green), `'low_stock'` (amber), and `'out_of_stock'` (red).
* **Search & Filters:** Integrates search queries (against Name/SKU) and dropdown status filtering inside the catalog table.
* **Quick Status Toggle:** Allows direct inline toggles. Clicking on a product's stock badge automatically toggles its state between *In Stock* and *Out of Stock* and updates inventory quantity records without leaving the page.

---

## 3. Technical Stack & Versions

* **PHP:** `v8.2.12`
* **Backend Framework:** Laravel `v12.x` (specifically `^12.0`)
* **Authentication Scaffolding:** Laravel Breeze `v2.4.2` (Blade Stack)
* **Client-Side Reactivity:** Alpine.js `^3.4.2` (manages sidebar collapse & success alert transitions)
* **Frontend Styles:** Tailwind CSS `^3.1.0` (with `@tailwindcss/vite` `^4.0.0` & `@tailwindcss/forms` `^0.5.2`)
* **Asset Bundler & Compiler:** Vite `^6.0.11` (with `laravel-vite-plugin` `^1.2.0`)
* **Database Connection:** MySQL (via XAMPP)
* **CSS UI Library:** Bootstrap `^5.3.8` (installed)

---

## 4. Architecture & Key Files

```bash
laravel12/
├── app/
│   ├── Http/Controllers/
│   │   └── ProductController.php      # Resource & toggleStatus controller
│   └── Models/
│       └── Product.php                # Eloquent model with fillable attributes & casts
├── bootstrap/
│   └── app.php                        # Redirection configuration for auth users
├── database/
│   └── migrations/
│       └── create_products_table.php  # Schema definition for Products table
├── resources/
│   ├── views/
│   │   ├── layouts/
│   │   │   ├── app.blade.php          # Responsive layout container with top header
│   │   │   └── sidebar.blade.php      # Desktop collapsible navigation panel
│   │   └── products/
│   │       ├── index.blade.php        # Products list grid, filters & toggle trigger
│   │       ├── create.blade.php       # Add product validation form
│   │       ├── edit.blade.php         # Edit details form
│   │       └── show.blade.php         # Product catalog details card
└── routes/
    └── web.php                        # Custom admin dashboard & products routes
```

---

## 5. Verification Matrix
* **Automated Tests:** `php artisan test` (25 passed / 61 assertions)
* **Asset Compiling:** `npm run build` (compiled CSS: `52.34 kB`)
* **Manual Workflows Verified:**
  * Login redirection sequence.
  * Sidebar collapse/expansion transition animations.
  * Product list catalog filters and CRUD operations.
  * Badge-triggered status toggle updates.
