# Enterprise Cash Management Software — Laravel Build
This is a fully dynamic, production-ready Multi-Tenant & Multi-Branch Cash Management System crafted in **Laravel 10/11** with a fully responsive Tailwind CSS administrative dashboard. It mirrors all layouts, forms, workflows, dynamic settings, and business calculations of the original design.

---

## 📂 Repository & Project Structure
All standard Laravel enterprise configuration directories are fully mapped. You can download this directory directly via the ZIP export or Git integration.

```text
/laravel_project
├── app/
│   ├── Http/
│   │   ├── Controllers/
│   │   │   ├── DashboardController.php      # Main analytics, summaries and charts
│   │   │   ├── CashTransactionController.php# Cash In, Cash Out, Approvals, Ledgers
│   │   │   ├── CashAdvanceController.php    # Employee advance requisitions & adjustment logs
│   │   │   ├── SuperAdminController.php     # Global tenants, DB configurations & status toggle
│   │   │   └── ProfileController.php         # Personal photo and designation updates
│   │   └── Middleware/
│   │       └── CheckUserPermission.php      # Real-time dynamic security role checking
│   └── Models/
│       ├── User.php                         # Roles, designation & association with branch/company
│       ├── Company.php                      # Subscription statuses, tax and currency records
│       ├── Branch.php                       # Operating balance registers and location context
│       ├── BankAccount.php                  # Dedicated accounts monitoring
│       ├── CashTransaction.php              # Multi-currency dynamic cash vouchers
│       ├── ShiftClosing.php                 # Safe physical audit shift closings
│       └── CashAdvance.php                  # Employee cash requisitions & adjustments tracker
├── database/
│   ├── migrations/
│   │   └── 2206_01_01_000000_create_cash_management_tables.php # Full SQL Migrations
│   ├── seeders/
│   │   └── DatabaseSeeder.php               # Complete system registers & multi-tenant seeders
│   └── sql/
│       └── project_database.sql             # Live SQL Script for immediate DB import
├── resources/
│   ├── views/
│   │   ├── layouts/
│   │   │   └── app.blade.php                # Master HTML skeleton with Hind Siliguri and font imports
│   │   ├── partials/
│   │   │   ├── sidebar.blade.php            # Active menus and user profile preview
│   │   │   └── topbar.blade.php             # Branch select menu, notification lists
│   │   ├── dashboard.blade.php              # Real-time stats widgets
│   │   ├── cashbook.blade.php               # Voucher registration with active file uploads
│   │   ├── advances.blade.php               # Employee ledger tracker and requisitions
│   │   └── settings.blade.php               # Super Admin control systems and profile editor
└── routes/
    ├── web.php                              # Dynamic stateful controllers routing
    └── api.php                              # JSON REST services with Sanctum security
```

---

## ⚡ Direct Localhost Setup (XAMPP / Laragon / Local)

### 1. Extract and Install Dependencies
1. Copy the contents of the `/laravel_project` directory to your web server root (e.g. `C:\xampp\htdocs\cashbook` or `C:\laragon\www\cashbook`).
2. Open your terminal in the project folder and install the PHP dependencies:
   ```bash
   composer install
   ```
3. Install the JavaScript asset bundlers:
   ```bash
   npm install
   ```

### 2. Configure Environment File (`.env`)
Copy the template `.env.example` to `.env` and configure your database setup:
```env
APP_NAME="Enterprise Cash Management Software"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://127.0.0.1:8000

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=cash_management_db
DB_USERNAME=root
DB_PASSWORD=
```
Generate an application key:
```bash
php artisan key:generate
```

### 3. Database Migration & Seed
Create the database `cash_management_db` inside phpMyAdmin or your MySQL client, then run the database script directly using database migrations:
```bash
php artisan migrate --seed
```

*Alternatively, you can import the **fully compiled** seed data directly from our SQL script:*
1. Import the `/database/sql/project_database.sql` file directly into your phpMyAdmin dashboard.

### 4. Create Directory Symbolic Link
Verify files uploaded to the cash management dashboards are stored securely:
```bash
php artisan storage:link
```

### 5. Launch Localhost Services
Boot up the PHP development server and dynamic Tailwind compilers alongside each other:
```bash
# Terminal 1
php artisan serve

# Terminal 2
npm run dev
```
Open **`http://127.0.0.1:8000`** in your browser to experience the 100% database-driven cash application!

---

## 🔑 Preset Credentials (সেভ করা ডেমো অ্যাকাউন্ট সমূহ)
You can login immediately using any of our registered seeds:
- **Platform Super-Admin:** `mdashikurcse@gmail.com` | Password: `password` (Controls multi-tenancy, profile access lock/unlock)
- **Primary Cashier:** `cashier@teletalkcorp.com` | Password: `password` (Creates cash-in and cash-out requests)
- **Account Auditor:** `auditor@teletalkcorp.com` | Password: `password` (Authorizes and signs vouchers)
