Introduce a comprehensive address management system allowing users to
save, manage, and reuse sender and receiver addresses during the
ordering process. This feature bridges the WordPress frontend with the
Laravel backend API.
Key changes:
- Backend (Laravel):
- Added `AddressBookEntry` model and migration for storing addresses
with role (sender/receiver), usage tracking, and default status.
- Implemented `AddressBookController` with full CRUD functionality
secured via Sanctum and ownership validation.
- Integrated address usage tracking and upsert logic into the
`CustomerOrderController` to prevent duplicate entries.
- Added 18 new feature tests covering ownership, limits, and
validation.
- Frontend (WordPress):
- Added a new "Address Book" tab in the user dashboard with card-based
UI, filtering, and SweetAlert2 integration.
- Enhanced the order form with dropdown selectors for saved addresses
and "save this address" checkboxes for both sender and receiver.
- Implemented secure AJAX proxies in `user-bridge.php` with nonce
and sanitization.
- Documentation:
- Updated `AGENT.md` and `CLIENT_DELIVERY.md` to reflect phase 3.9
completion and updated the project roadmap.
- Removed obsolete `README-INSTALL.md`.
Implement critical security hardening and resolve a P0 bug in the
discount code consumption flow. This update transitions the system
from a development-heavy configuration to a production-ready state.
Key changes:
- Fix P0 bug where `consumeDiscountCode()` was missing, breaking order
registration; replaced with a robust `DiscountCodeService` using
`discount_code_usages` for audit trails and idempotency.
- Implement strict production guards for the Zarinpal payment gateway
to prevent accidental mock processing in live environments.
- Refactor WordPress bridge asset management to use `filemtime` based
versioning instead of `time()` to prevent unnecessary cache busting.
- Remove debug-only hacks (`opcache_reset`, `header` cache control)
from the WordPress plugin.
- Enhance file upload security by enforcing strict `mimetypes` validation.
- Update `.gitignore` to exclude sensitive WordPress configuration
files and local PHPUnit caches.
- Add comprehensive documentation for production deployment, including
security checklists and key rotation procedures.
- Update test suite to reflect new architecture and ensure 100%
coverage of the discount service.
Refactor core documentation files to Persian and introduce a deployment handoff guide.
- Translate `AGENT.md`, `CLIENT_DELIVERY.md`, and `README.md` to Persian for better local stakeholder alignment
- Restructure `AGENT.md` with improved technical specifications and versioning
- Update `CLIENT_DELIVERY.md` with localized status legends and requirement tables
- Enhance `README.md` with detailed feature lists and improved formatting
- Add `DEPLOYMENT_HANDOFF.md` to facilitate production deployment processes
Update AGENT.md, CLIENT_DELIVERY.md, and README.md to reflect the
completion of Phase 3.6 milestones.
- Update project status from 80% to 95% completion
- Document E2E verification of the commitment form and order approval flows
- Detail the implementation of the multi-currency credit system and
customer financial overview
- Update the employee checklist automation details
- Document the redesigned PDF templates (AWB, Invoice, Label) using
dompdf
- Include newly implemented security features like 6-layer API rate
limiting
- Reflect code cleanup activities including removal of debug tools and
test files
Migrate exchange rate handling from static system settings to a
centralized `ExchangeRateService`. This change ensures that currency
rates are managed through a single source of truth that supports
history tracking, approval workflows, and API updates.
Laravel:
- Remove manual exchange rate fields (`aed_to_irr`, `usd_to_irr`, etc.)
from `IfnexSettingsPage` and the `SystemSetting` persistence logic.
- Update `PricingPageController` and `PriceCalculatorService` to
retrieve live rates from `ExchangeRateService` instead of `SystemSetting`.
- Refactor `IfnexSettingsPage` UI to display current rates as
read-only information with a link to the dedicated exchange rate
management resource.
Documentation:
- Update `CLIENT_DELIVERY.md` to reflect the change in exchange rate
management workflow.
Update core project documentation to reflect recent architectural changes,
security implementations, and deployment requirements. This includes
refining the status tracking system and cleaning up the repository.
- Update `AGENT.md` and `STATUS.md` to establish `AGENT.md` as the primary
source of truth for project state and contracts.
- Add `CLIENT_DELIVERY.md` as the definitive checklist for customer
delivery status.
- Update `DEPLOYMENT.md` with new production domain information,
storage linking instructions, and secure disk configuration for
commitment forms.
- Update `README.md` with current migration/model counts and link to
the new delivery checklist.
- Update `.gitignore` to exclude local AI tools and Postman workspaces.
- Remove obsolete `IFNEX-Logistics.zip` and `IFNEX_DEPRECATED_FILES_NOTICE.md`.
- Fix typos in `DEPLOYMENT.md` deployment scripts.