# Sarvoknit website

A custom Laravel 12 product showcase and B2B enquiry website for Sarvoknit. The frontend uses Blade, Tailwind CSS 4, Alpine.js, GSAP/ScrollTrigger and Lenis. Enquiries are validated server-side, stored in a MySQL-compatible table and sent to a configurable recipient.

## Requirements

- PHP 8.2+
- Composer 2
- Node.js 20+
- MySQL/MariaDB for production (SQLite is configured by default for local development)

## Install

```bash
composer install
cp .env.example .env
php artisan key:generate
npm install
php artisan migrate
npm run build
```

For local development, run the Laravel and Vite servers in separate terminals:

```bash
php artisan serve
npm run dev
```

Or use the Laravel 12 combined development command:

```bash
composer run dev
```

## Configuration

Set the database and mail transport in `.env`, then update the `SARVOKNIT_*` variables. The notification recipient is controlled by:

```dotenv
SARVOKNIT_ENQUIRY_EMAIL=enquiries@your-domain.com
```

Editable company information is centralized in `config/sarvoknit.php`. Product content, gallery slots and unverified technical placeholders are centralized in `config/products.php`. After changing environment configuration in production, run:

```bash
php artisan config:cache
```

## Enquiry workflow

`POST /enquiries` uses CSRF protection, Form Request validation, safe enum validation, a hidden honeypot and a five-submissions-per-minute IP limit. Valid enquiries are stored before notification mail is attempted. If mail delivery fails, the enquiry remains stored and the failure is logged.

## Verification

```bash
php artisan test
vendor/bin/pint --test
npm run build
php artisan route:list --except-vendor
```

The feature suite checks every public page, successful enquiry storage and mail dispatch, required fields, safe enum values and honeypot rejection.

## Product photography

Current product assets live in `public/images/products`. The catalogue is ready for approved replacement photography at these paths:

- `mutton-cloth-main.webp`
- `mutton-cloth-detail.webp`
- `mutton-cloth-product-roll.webp`
- `mutton-cloth-application-view.webp`
- `mutton-cloth-packaging.webp`
- `stockinette-main.webp`
- `stockinette-detail.webp`
- `stockinette-product-roll.webp`
- `stockinette-application-view.webp`
- `stockinette-packaging.webp`

Keep the filenames or update the corresponding gallery entries in `config/products.php`.
