This commit marks the completion of Phase 3 (Integration and Improvements) and updates the project status to reflect that Phases 0 through 3 are finished. Key changes include: - **Laravel (Backend):** - Added `calling_code` column to `countries` table via new migration. - Added scripts to update calling codes for all countries. - Updated `CustomerOrderController` to include `calling_code` in country data. - Registered `api_key` middleware alias in `bootstrap/app.php`. - Improved error handling to return JSON 401 for API authentication failures. - Updated `README.md` with detailed architecture and feature descriptions. - **WordPress (Frontend/Bridge):** - Added `ifnex_wallet_charge` shortcode and AJAX handler for wallet top-ups. - Implemented auto-fill for calling codes in the order form based on selected country. - Added real-time phone number validation (digits, +, spaces only). - Added English-only validation for name, city, and address fields with UI warnings. - Updated asset enqueuing logic and versioning for CSS/JS. - **Documentation:** - Updated `IFNEX_File_Map.md`, `IFNEX_Phase0_Checklist.md`, and `IFNEX_Roadmap.md` to reflect completed phases and new features. - Updated `DEPLOYMENT.md` with new environment variables (`IFNEX_BRIDGE_API_KEY`) and required WordPress pages. - Updated project `README.md` with comprehensive feature list and system architecture.
251 lines
9.5 KiB
Markdown
251 lines
9.5 KiB
Markdown
# نقشه فایلهای پروژه IFNEX
|
||
|
||
> **آخرین بروزرسانی:** 2026-08-29
|
||
> **وضعیت کلی:** فاز ۰، ۱، ۲، ۳ تکمیل شد ✅ (۱۹۲ کشور با پیششماره)
|
||
|
||
---
|
||
|
||
## ۱. Migrations (۲۳ migration)
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `database/migrations/0001_01_01_000000_create_users_table.php` | ۰ |
|
||
| 2 | `database/migrations/0001_01_01_000001_create_cache_table.php` | ۰ |
|
||
| 3 | `database/migrations/0001_01_01_000002_create_jobs_table.php` | ۰ |
|
||
| 4 | `database/migrations/2026_08_02_000001_create_countries_table.php` | ۰ |
|
||
| 5 | `database/migrations/2026_08_02_000002_create_shipments_table.php` | ۰ |
|
||
| 6 | `database/migrations/2026_08_02_000003_create_shipping_rates_table.php` | ۰ |
|
||
| 7 | `database/migrations/2026_08_02_000004_create_shipment_carrier_mappings_table.php` | ۰ |
|
||
| 8 | `database/migrations/2026_08_02_000005_create_shipment_tracking_events_table.php` | ۰ |
|
||
| 9 | `database/migrations/2026_08_02_000006_create_system_settings_table.php` | ۰ |
|
||
| 10 | `database/migrations/2026_08_02_000007_update_users_table.php` | ۰ |
|
||
| 11 | `database/migrations/2026_08_05_135016_create_wallets_table.php` | ۲ |
|
||
| 12 | `database/migrations/2026_08_05_135022_create_wallet_transactions_table.php` | ۲ |
|
||
| 13 | `database/migrations/2026_08_05_135026_create_discount_codes_table.php` | ۲ |
|
||
| 14 | `database/migrations/2026_08_05_140000_create_payments_table.php` | ۲ |
|
||
| 15 | `database/migrations/2026_08_07_000001_create_wallet_activity_logs_table.php` | ۲ |
|
||
| 16 | `database/migrations/2026_08_07_033748_create_personal_access_tokens_table.php` | ۰ |
|
||
| 17 | `database/migrations/2026_08_08_000001_create_shipment_items_table.php` | ۰ |
|
||
| 18 | `database/migrations/2026_08_09_012526_create_notifications_table.php` | ۲ |
|
||
| 19 | `database/migrations/2026_08_09_220409_create_permission_tables.php` | ۰ |
|
||
| 20 | `database/migrations/2026_08_09_231738_create_exchange_rate_history_table.php` | ۲ |
|
||
| 21 | `database/migrations/2026_08_10_020410_update_shipments_status_enum.php` | ۰ |
|
||
| 22 | `database/migrations/2026_08_10_080853_add_wallet_to_payment_gateway_enum.php` | ۲ |
|
||
| 23 | `database/migrations/2026_08_10_082121_add_system_to_tracking_source_enum.php` | ۲ |
|
||
| 24 | `database/migrations/2026_08_24_000001_add_missing_fields_to_shipments_table.php` | ۳ |
|
||
| 25 | `database/migrations/2026_08_24_100001_create_currencies_table.php` | ۲ |
|
||
| 26 | `database/migrations/2026_08_24_200001_create_shipment_packages_table.php` | ۲ |
|
||
| 27 | `database/migrations/2026_08_24_300001_create_shipment_status_histories_table.php` | ۲ |
|
||
| 28 | `database/migrations/2026_08_28_233839_add_calling_code_to_countries_table.php` | ۳ |
|
||
|
||
---
|
||
|
||
## ۲. Models (۱۳ مدل)
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `app/Models/Country.php` | ۰+۳ (calling_code) |
|
||
| 2 | `app/Models/Shipment.php` | ۰+۲+۳ |
|
||
| 3 | `app/Models/ShipmentCarrierMapping.php` | ۰ |
|
||
| 4 | `app/Models/ShipmentTrackingEvent.php` | ۰+۲ (source) |
|
||
| 5 | `app/Models/ShipmentItem.php` | ۰ |
|
||
| 6 | `app/Models/ShipmentPackage.php` | ۲ |
|
||
| 7 | `app/Models/ShipmentStatusHistory.php` | ۲ |
|
||
| 8 | `app/Models/ShippingRate.php` | ۰ |
|
||
| 9 | `app/Models/SystemSetting.php` | ۰ |
|
||
| 10 | `app/Models/User.php` | ۰+۲ |
|
||
| 11 | `app/Models/Currency.php` | ۲ |
|
||
| 12 | `app/Models/Wallet.php` | ۲ |
|
||
| 13 | `app/Models/WalletTransaction.php` | ۲ |
|
||
| 14 | `app/Models/WalletActivityLog.php` | ۲ |
|
||
| 15 | `app/Models/DiscountCode.php` | ۲ |
|
||
| 16 | `app/Models/Payment.php` | ۲ |
|
||
| 17 | `app/Models/ExchangeRateHistory.php` | ۲ |
|
||
|
||
---
|
||
|
||
## ۳. Filament Resources
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `app/Filament/Resources/CountryResource.php` | ۰ |
|
||
| 2 | `app/Filament/Resources/CountryResource/Pages/ListCountries.php` | ۰ |
|
||
| 3 | `app/Filament/Resources/CountryResource/Pages/CreateCountry.php` | ۰ |
|
||
| 4 | `app/Filament/Resources/CountryResource/Pages/EditCountry.php` | ۰ |
|
||
| 5 | `app/Filament/Resources/ShipmentResource.php` | ۰+۳ |
|
||
| 6 | `app/Filament/Resources/ShipmentResource/Pages/ListShipments.php` | ۰ |
|
||
| 7 | `app/Filament/Resources/ShipmentResource/Pages/CreateShipment.php` | ۰ |
|
||
| 8 | `app/Filament/Resources/ShipmentResource/Pages/ViewShipment.php` | ۰+۳ |
|
||
| 9 | `app/Filament/Resources/ShipmentResource/Pages/EditShipment.php` | ۰ |
|
||
| 10 | `app/Filament/Resources/ShipmentResource/RelationManagers/TrackingEventsRelationManager.php` | ۰+۲ |
|
||
| 11 | `app/Filament/Resources/ShipmentResource/RelationManagers/CarrierMappingsRelationManager.php` | ۰ |
|
||
| 12 | `app/Filament/Resources/ShipmentResource/RelationManagers/ItemsRelationManager.php` | ۰ |
|
||
| 13 | `app/Filament/Resources/ShippingRateResource.php` | ۰ |
|
||
| 14 | `app/Filament/Resources/ShippingRateResource/Pages/ListShippingRates.php` | ۰ |
|
||
| 15 | `app/Filament/Resources/ShippingRateResource/Pages/CreateShippingRate.php` | ۰ |
|
||
| 16 | `app/Filament/Resources/ShippingRateResource/Pages/EditShippingRate.php` | ۰ |
|
||
| 17 | `app/Filament/Resources/CurrencyResource.php` | ۲ |
|
||
| 18 | `app/Filament/Resources/CurrencyResource/Pages/ListCurrencies.php` | ۲ |
|
||
| 19 | `app/Filament/Resources/CurrencyResource/Pages/CreateCurrency.php` | ۲ |
|
||
| 20 | `app/Filament/Resources/CurrencyResource/Pages/EditCurrency.php` | ۲ |
|
||
|
||
---
|
||
|
||
## ۴. Filament Pages
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `app/Filament/Pages/SettingsPage.php` | ۰ |
|
||
| 2 | `app/Filament/Pages/PriceTestPage.php` | ۰ |
|
||
| 3 | `app/Filament/Pages/ImportRatesPage.php` | ۲ |
|
||
| 4 | `resources/views/filament/pages/settings-page.blade.php` | ۰ |
|
||
| 5 | `resources/views/filament/pages/price-test-page.blade.php` | ۰ |
|
||
| 6 | `resources/views/filament/pages/import-rates.blade.php` | ۲ |
|
||
|
||
---
|
||
|
||
## ۵. Controllers
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `app/Http/Controllers/Api/TrackController.php` | ۰ |
|
||
| 2 | `app/Http/Controllers/Api/PricingController.php` | ۰ |
|
||
| 3 | `app/Http/Controllers/Api/AuthController.php` | ۱ |
|
||
| 4 | `app/Http/Controllers/Api/BridgeAuthController.php` | ۱ |
|
||
| 5 | `app/Http/Controllers/Api/Customer/CustomerOrderController.php` | ۱+۲ |
|
||
| 6 | `app/Http/Controllers/Api/WalletController.php` | ۲ |
|
||
| 7 | `app/Http/Controllers/Api/PaymentController.php` | ۲ |
|
||
| 8 | `app/Http/Controllers/Api/DiscountCodeController.php` | ۲ |
|
||
| 9 | `app/Http/Controllers/Api/MockGatewayController.php` | ۲ |
|
||
| 10 | `app/Http/Controllers/OrderController.php` | ۱ |
|
||
| 11 | `app/Http/Controllers/PricingPageController.php` | ۱ |
|
||
| 12 | `app/Http/Controllers/ShipmentPdfController.php` | ۱ |
|
||
|
||
---
|
||
|
||
## ۶. Services
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `app/Services/PriceCalculatorService.php` | ۰ |
|
||
| 2 | `app/Services/TrackingService.php` | ۰ |
|
||
| 3 | `app/Services/PdfService.php` | ۱ |
|
||
| 4 | `app/Services/OrderPaymentService.php` | ۲ |
|
||
|
||
---
|
||
|
||
## ۷. Notifications
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `app/Notifications/ShipmentUpdatedNotification.php` | ۳ |
|
||
|
||
---
|
||
|
||
## ۸. Imports / Exports
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `app/Imports/OldShipmentsImport.php` | ۰ |
|
||
| 2 | `app/Imports/ShippingRatesImport.php` | ۰ |
|
||
| 3 | `app/Exports/ShippingRatesTemplateExport.php` | ۳ |
|
||
|
||
---
|
||
|
||
## ۹. Middleware
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `app/Http/Middleware/ApiKeyMiddleware.php` | ۰ |
|
||
|
||
---
|
||
|
||
## ۱۰. Enums
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `app/Enums/ShipmentStatus.php` | ۰ |
|
||
| 2 | `app/Enums/ShipmentDirection.php` | ۰ |
|
||
| 3 | `app/Enums/ShipmentType.php` | ۰ |
|
||
|
||
---
|
||
|
||
## ۱۱. PDF Views
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `resources/views/pdfs/awb.blade.php` | ۱ |
|
||
| 2 | `resources/views/pdfs/label.blade.php` | ۱ |
|
||
| 3 | `resources/views/pdfs/invoice.blade.php` | ۱ |
|
||
|
||
---
|
||
|
||
## ۱۲. Routes
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `routes/api.php` | ۰+۱+۲ |
|
||
| 2 | `routes/web.php` | ۱ |
|
||
|
||
---
|
||
|
||
## ۱۳. Config
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `config/ifnex.php` | ۰ |
|
||
| 2 | `config/cors.php` | ۰ |
|
||
|
||
---
|
||
|
||
## ۱۴. وردپرس — پلاگین IFNEX Bridge
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `ifnex-bridge/ifnex-bridge.php` | ۱ |
|
||
| 2 | `ifnex-bridge/includes/api-client.php` | ۰ |
|
||
| 3 | `ifnex-bridge/includes/user-bridge.php` | ۱+۲+۳ |
|
||
| 4 | `ifnex-bridge/includes/shortcodes.php` | ۱+۲+۳ |
|
||
| 5 | `ifnex-bridge/includes/tracking-form.php` | ۰ |
|
||
| 6 | `ifnex-bridge/assets/css/ifnex-orders.css` | ۱+۲+۳ |
|
||
| 7 | `ifnex-bridge/assets/css/ifnex-bridge.css` | ۰ |
|
||
| 8 | `ifnex-bridge/assets/js/ifnex-order-form.js` | ۱+۳ |
|
||
|
||
---
|
||
|
||
## ۱۵. وردپرس — قالب IFNEX
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `ifnex/style.css` | ۱ |
|
||
| 2 | `ifnex/functions.php` | ۱ |
|
||
| 3 | `ifnex/header.php` | ۱ |
|
||
| 4 | `ifnex/footer.php` | ۱ |
|
||
| 5 | `ifnex/front-page.php` | ۱ |
|
||
| 6 | `ifnex/page.php` | ۱ |
|
||
| 7 | `ifnex/template-login.php` | ۱ |
|
||
| 8 | `ifnex/template-parts/hero.php` | ۱ |
|
||
| 9 | `ifnex/template-parts/services.php` | ۱ |
|
||
| 10 | `ifnex/template-parts/how-it-works.php` | ۱ |
|
||
| 11 | `ifnex/template-parts/stats.php` | ۱ |
|
||
| 12 | `ifnex/template-parts/testimonials.php` | ۱ |
|
||
| 13 | `ifnex/template-parts/cta.php` | ۱ |
|
||
| 14 | `ifnex/inc/customizer.php` | ۱ |
|
||
| 15 | `ifnex/inc/enqueue.php` | ۱ |
|
||
| 16 | `ifnex/assets/css/main.css` | ۱ |
|
||
| 17 | `ifnex/assets/js/main.js` | ۱ |
|
||
|
||
---
|
||
|
||
## ۱۶. Seeders
|
||
|
||
| # | فایل | فاز |
|
||
|---|------|-----|
|
||
| 1 | `database/seeders/DatabaseSeeder.php` | ۰ |
|
||
| 2 | `database/seeders/CountriesTableSeeder.php` | ۰ |
|
||
| 3 | `database/seeders/SystemSettingSeeder.php` | ۰ |
|
||
|
||
---
|
||
|
||
> مجموع تقریبی: **۱۰۰+ فایل** بین لاراول و وردپرس
|