# FF (Furniture Wholesale) — Project Context

## Overview
Laravel backend + REST API serving Android/iOS apps for a furniture wholesale client.
Originally built by another developer (abanoubtalaatr) — repo migrated to Hala021/ff.

## Environments
- **Live (production):** /home/ff08/public_html on dd.wazzy.net (cPanel, no auto-deploy)
- **Dev (staging):** dev.ff2.ddilb.com — all fixes/testing happen here first
- Live is NOT auto-synced with git. No webhook, no cron pull. Deploys are manual
  `git pull` on the server, done only after testing on dev.

## Stack
- Laravel 10.0
- PHP 8.1
- MySQL 8.0.46
- Key packages: Intervention Image (image processing — relevant to image bugs),
  Laravel Sanctum (API auth), FCM + Pusher (push notifications),
  Yajra DataTables

## Known issues (active)
- CSF firewall (CT_LIMIT/CT_INTERVAL) blocks mobile users on carrier IPs (CGNAT)
  when scrolling the product catalog. Fix path: move image serving off-origin
  (Cloudflare proxy or R2), or exclude image paths from CSF + use Nginx-level
  rate limiting instead.
- Intermittent image loading failures (check Intervention Image config/memory
  limits as a starting point given the package in use).
- No staging workflow existed until dev.ff2.ddilb.com was set up (July 2026).

## Critical rules
- Never touch the live git remote/deploy directly — all fixes go through dev first.
- Confirm fixes on dev.ff2.ddilb.com before pushing to live.
- [Add: any client-specific do-not-touch files, credentials handling, etc.]

## Future consideration (not now)
- PHP 8.1 and Laravel 10 are still supported but dated. Once the active pain
  points above are resolved and stable, revisit upgrading PHP + Laravel as a
  deliberate, separate project — not bundled with current fixes.

## Deployment workflow
1. Work happens on dev.ff2.ddilb.com clone of Hala021/ff
2. Test thoroughly
3. Only then: push to Hala021/ff master, then manually `git pull` on live server