From 53ab7244e49d79623d320d92b84c153dcfd9057b Mon Sep 17 00:00:00 2001 From: Toornaa Date: Sat, 11 Jul 2026 12:34:20 +0330 Subject: [PATCH] add all project files --- backend/.editorconfig | 18 + backend/.env.example | 65 + backend/.gitattributes | 11 + backend/.gitignore | 24 + backend/README.md | 59 + .../Controllers/Api/ActivityLogController.php | 78 + .../Http/Controllers/Api/AuthController.php | 240 + .../Controllers/Api/BacklogController.php | 182 + .../Controllers/Api/ChecklistController.php | 115 + .../Controllers/Api/CommentController.php | 173 + .../Controllers/Api/DashboardController.php | 49 + .../Controllers/Api/DepartmentController.php | 370 + .../Http/Controllers/Api/FileController.php | 155 + .../Controllers/Api/MeetingController.php | 306 + .../Api/NotificationController.php | 110 + .../Controllers/Api/PermissionController.php | 51 + .../Controllers/Api/ProjectController.php | 301 + .../Http/Controllers/Api/PwaController.php | 988 ++ .../Http/Controllers/Api/ReportController.php | 169 + .../Http/Controllers/Api/RoleController.php | 179 + .../Http/Controllers/Api/SearchController.php | 52 + .../Controllers/Api/SettingController.php | 106 + .../Http/Controllers/Api/SprintController.php | 425 + .../Controllers/Api/SubtaskController.php | 125 + .../Http/Controllers/Api/TaskController.php | 368 + .../Http/Controllers/Api/UserController.php | 237 + backend/app/Http/Controllers/Controller.php | 8 + .../Middleware/EnsureUserHasPermission.php | 35 + .../app/Http/Middleware/SecurityHeaders.php | 30 + .../Http/Requests/ChangePasswordRequest.php | 21 + backend/app/Http/Requests/LoginRequest.php | 33 + .../Http/Requests/StoreBacklogItemRequest.php | 25 + .../app/Http/Requests/StoreCommentRequest.php | 23 + .../app/Http/Requests/StoreMeetingRequest.php | 25 + .../app/Http/Requests/StoreProjectRequest.php | 32 + .../app/Http/Requests/StoreRoleRequest.php | 25 + .../app/Http/Requests/StoreSprintRequest.php | 24 + .../app/Http/Requests/StoreTaskRequest.php | 85 + .../app/Http/Requests/StoreUserRequest.php | 43 + .../Http/Requests/UpdateProfileRequest.php | 33 + .../Http/Requests/UpdateProjectRequest.php | 32 + .../app/Http/Requests/UpdateRoleRequest.php | 26 + .../app/Http/Requests/UpdateTaskRequest.php | 31 + .../app/Http/Requests/UpdateUserRequest.php | 45 + .../Http/Resources/ActivityLogResource.php | 27 + .../Http/Resources/BacklogItemResource.php | 30 + .../app/Http/Resources/ChecklistResource.php | 22 + .../app/Http/Resources/CommentResource.php | 24 + backend/app/Http/Resources/FileResource.php | 27 + .../Resources/MeetingActionItemResource.php | 25 + .../app/Http/Resources/MeetingResource.php | 34 + .../Http/Resources/NotificationResource.php | 27 + .../app/Http/Resources/PermissionResource.php | 21 + .../app/Http/Resources/ProjectResource.php | 46 + backend/app/Http/Resources/RoleResource.php | 24 + backend/app/Http/Resources/SprintResource.php | 44 + .../app/Http/Resources/SubtaskResource.php | 26 + backend/app/Http/Resources/TaskResource.php | 41 + backend/app/Http/Resources/UserResource.php | 41 + backend/app/Models/ActivityLog.php | 23 + backend/app/Models/BacklogItem.php | 29 + backend/app/Models/Checklist.php | 20 + backend/app/Models/Comment.php | 28 + backend/app/Models/Department.php | 45 + backend/app/Models/File.php | 22 + backend/app/Models/Meeting.php | 51 + backend/app/Models/MeetingActionItem.php | 33 + backend/app/Models/Notification.php | 21 + backend/app/Models/Permission.php | 16 + backend/app/Models/Project.php | 67 + backend/app/Models/Role.php | 21 + backend/app/Models/Setting.php | 29 + backend/app/Models/Sprint.php | 55 + backend/app/Models/SprintRetrospective.php | 23 + backend/app/Models/Subtask.php | 25 + backend/app/Models/Task.php | 70 + backend/app/Models/User.php | 113 + backend/app/Policies/MeetingPolicy.php | 28 + backend/app/Policies/ProjectPolicy.php | 28 + backend/app/Policies/SprintPolicy.php | 28 + backend/app/Policies/TaskPolicy.php | 28 + backend/app/Policies/UserPolicy.php | 28 + backend/app/Providers/AppServiceProvider.php | 44 + backend/app/Services/ActivityLogService.php | 22 + backend/app/Services/DashboardService.php | 162 + backend/app/Services/NotificationService.php | 25 + .../app/Services/ProjectProgressService.php | 27 + backend/app/Services/ReportService.php | 247 + backend/app/Services/WorkloadService.php | 35 + backend/artisan | 18 + backend/bootstrap/app.php | 35 + backend/bootstrap/cache/.gitignore | 2 + backend/bootstrap/providers.php | 7 + backend/composer.json | 87 + backend/composer.lock | 8475 +++++++++++++++++ backend/config/app.php | 126 + backend/config/auth.php | 117 + backend/config/cache.php | 117 + backend/config/cors.php | 18 + backend/config/database.php | 184 + backend/config/filesystems.php | 80 + backend/config/logging.php | 132 + backend/config/mail.php | 118 + backend/config/queue.php | 129 + backend/config/sanctum.php | 28 + backend/config/services.php | 38 + backend/config/session.php | 217 + backend/database/.gitignore | 1 + backend/database/factories/UserFactory.php | 45 + .../0001_01_01_000000_create_users_table.php | 49 + .../0001_01_01_000001_create_cache_table.php | 35 + .../0001_01_01_000002_create_jobs_table.php | 57 + .../2024_01_01_000003_create_roles_table.php | 25 + ..._01_01_000004_create_permissions_table.php | 25 + ...24_01_01_000005_create_role_user_table.php | 23 + ...01_000006_create_permission_role_table.php | 23 + ..._000007_add_role_fields_to_users_table.php | 32 + ...024_01_01_000008_create_projects_table.php | 38 + ...01_01_000009_create_project_user_table.php | 24 + .../2024_01_01_000010_create_tasks_table.php | 35 + ...4_01_01_000011_create_checklists_table.php | 25 + ...024_01_01_000012_create_subtasks_table.php | 28 + ...2024_01_01_000013_create_sprints_table.php | 28 + ..._01_01_000014_create_sprint_task_table.php | 23 + ...1_01_000015_create_backlog_items_table.php | 30 + ...024_01_01_000016_create_meetings_table.php | 33 + ...01_01_000017_create_meeting_user_table.php | 23 + ...0018_create_meeting_action_items_table.php | 27 + ...024_01_01_000019_create_comments_table.php | 24 + .../2024_01_01_000020_create_files_table.php | 28 + ...1_01_000021_create_activity_logs_table.php | 29 + ...024_01_01_000022_create_settings_table.php | 24 + ...1_01_000023_create_notifications_table.php | 28 + ...57_create_personal_access_tokens_table.php | 33 + ..._manager_id_nullable_in_projects_table.php | 22 + ..._06_27_180000_create_departments_table.php | 31 + ...80001_add_department_id_to_users_table.php | 23 + .../2026_06_28_000000_sync_system_roles.php | 70 + ..._000001_remove_legacy_team_member_role.php | 43 + ..._000002_backfill_user_status_and_roles.php | 37 + .../2026_06_28_000003_enhance_sprints.php | 74 + ...nization_metadata_to_departments_table.php | 32 + ...28_000005_create_department_user_table.php | 47 + ...06_add_department_id_to_projects_table.php | 26 + ...0007_add_blocker_fields_to_tasks_table.php | 32 + ...tifiable_fields_to_notifications_table.php | 32 + ...6_30_000001_add_type_to_settings_table.php | 26 + ...26_07_01_000001_add_job_titles_setting.php | 28 + ...a_snooze_fields_to_notifications_table.php | 23 + .../database/seeders/ActivityLogSeeder.php | 184 + backend/database/seeders/BacklogSeeder.php | 79 + backend/database/seeders/CommentSeeder.php | 103 + backend/database/seeders/DatabaseSeeder.php | 33 + backend/database/seeders/MeetingSeeder.php | 129 + .../database/seeders/NotificationSeeder.php | 105 + backend/database/seeders/ProjectSeeder.php | 111 + .../database/seeders/RolePermissionSeeder.php | 154 + backend/database/seeders/SettingSeeder.php | 117 + backend/database/seeders/SprintSeeder.php | 58 + backend/database/seeders/TaskSeeder.php | 388 + backend/database/seeders/UserSeeder.php | 101 + backend/package.json | 17 + backend/phpunit.xml | 36 + backend/public/.htaccess | 25 + backend/public/favicon.ico | 0 backend/public/index.php | 20 + backend/public/robots.txt | 2 + backend/resources/css/app.css | 11 + backend/resources/js/app.js | 1 + backend/resources/js/bootstrap.js | 4 + backend/resources/views/welcome.blade.php | 277 + backend/routes/api.php | 192 + backend/routes/console.php | 8 + backend/routes/web.php | 7 + backend/storage/app/.gitignore | 4 + backend/storage/app/private/.gitignore | 2 + backend/storage/app/public/.gitignore | 2 + backend/storage/framework/.gitignore | 9 + backend/storage/framework/cache/.gitignore | 3 + .../storage/framework/cache/data/.gitignore | 2 + backend/storage/framework/sessions/.gitignore | 2 + backend/storage/framework/testing/.gitignore | 2 + backend/storage/framework/views/.gitignore | 2 + backend/storage/logs/.gitignore | 2 + backend/tests/Feature/AuthTest.php | 94 + .../tests/Feature/DepartmentMemberTest.php | 74 + backend/tests/Feature/ExampleTest.php | 19 + backend/tests/Feature/PwaHomeTest.php | 62 + .../Feature/RolePermissionManagementTest.php | 74 + .../tests/Feature/SecurityHardeningTest.php | 87 + backend/tests/Feature/SettingTest.php | 78 + backend/tests/TestCase.php | 22 + backend/tests/Unit/ExampleTest.php | 16 + backend/vite.config.js | 18 + frontend/.gitignore | 24 + frontend/.oxlintrc.json | 8 + frontend/README.md | 16 + frontend/index.html | 16 + frontend/package-lock.json | 2219 +++++ frontend/package.json | 27 + frontend/public/favicon.svg | 1 + frontend/public/icons.svg | 24 + frontend/public/manifest.webmanifest | 20 + frontend/public/offline.html | 19 + frontend/public/pwa-sw.js | 28 + frontend/src/App.css | 184 + frontend/src/App.jsx | 124 + frontend/src/assets/hero.png | Bin 0 -> 13057 bytes frontend/src/assets/react.svg | 1 + frontend/src/assets/vite.svg | 1 + frontend/src/components/ConfirmDialog.jsx | 14 + frontend/src/components/EmptyState.jsx | 12 + frontend/src/components/FormSelect.jsx | 11 + frontend/src/components/Header.jsx | 142 + frontend/src/components/LoadingSkeleton.jsx | 36 + frontend/src/components/Modal.jsx | 22 + frontend/src/components/PersianDateInput.jsx | 116 + frontend/src/components/PriorityBadge.jsx | 17 + frontend/src/components/Sidebar.jsx | 94 + frontend/src/components/StatusBadge.jsx | 56 + frontend/src/components/ThemeAccentPicker.jsx | 35 + frontend/src/components/ThemeModeToggle.jsx | 27 + frontend/src/context/AuthContext.jsx | 89 + frontend/src/index.css | 111 + frontend/src/main.jsx | 22 + frontend/src/pages/Backlog.jsx | 182 + frontend/src/pages/Dashboard.jsx | 168 + frontend/src/pages/Files.jsx | 129 + frontend/src/pages/Kanban.jsx | 339 + frontend/src/pages/Login.jsx | 66 + frontend/src/pages/MeetingList.jsx | 289 + frontend/src/pages/Notifications.jsx | 109 + frontend/src/pages/Organization.jsx | 685 ++ frontend/src/pages/Profile.jsx | 144 + frontend/src/pages/ProjectDetail.jsx | 319 + frontend/src/pages/Projects.jsx | 295 + frontend/src/pages/Reports.jsx | 220 + frontend/src/pages/Roles.jsx | 567 ++ frontend/src/pages/Settings.jsx | 562 ++ frontend/src/pages/Sprints.jsx | 605 ++ frontend/src/pages/Tasks.jsx | 331 + frontend/src/pages/Team.jsx | 336 + frontend/src/pwa/PwaAccessSummary.jsx | 20 + frontend/src/pwa/PwaAccountInfoCard.jsx | 37 + frontend/src/pwa/PwaBottomNav.jsx | 29 + frontend/src/pwa/PwaBottomSheet.jsx | 33 + frontend/src/pwa/PwaChangePasswordSheet.jsx | 58 + frontend/src/pwa/PwaCreateTaskSheet.jsx | 153 + frontend/src/pwa/PwaHome.jsx | 150 + frontend/src/pwa/PwaInstallStatusCard.jsx | 40 + frontend/src/pwa/PwaLayout.jsx | 86 + frontend/src/pwa/PwaMarkAllReadButton.jsx | 10 + frontend/src/pwa/PwaNotificationBadge.jsx | 5 + frontend/src/pwa/PwaNotificationCard.jsx | 56 + .../src/pwa/PwaNotificationDetailSheet.jsx | 18 + frontend/src/pwa/PwaNotificationFilters.jsx | 25 + frontend/src/pwa/PwaNotificationItem.jsx | 35 + frontend/src/pwa/PwaNotificationProvider.jsx | 153 + frontend/src/pwa/PwaNotificationSettings.jsx | 40 + frontend/src/pwa/PwaNotificationTime.js | 21 + frontend/src/pwa/PwaNotificationsPage.jsx | 189 + frontend/src/pwa/PwaProfileAvatar.jsx | 25 + frontend/src/pwa/PwaProfileHeader.jsx | 20 + frontend/src/pwa/PwaProfilePage.jsx | 115 + frontend/src/pwa/PwaProjectActivityList.jsx | 16 + frontend/src/pwa/PwaProjectCard.jsx | 79 + frontend/src/pwa/PwaProjectDetail.jsx | 145 + frontend/src/pwa/PwaProjectFilters.jsx | 24 + frontend/src/pwa/PwaProjectMemberList.jsx | 17 + frontend/src/pwa/PwaProjectProgress.jsx | 15 + frontend/src/pwa/PwaProjectStatusSheet.jsx | 24 + frontend/src/pwa/PwaProjectTaskPreview.jsx | 20 + frontend/src/pwa/PwaProjectsPage.jsx | 117 + .../src/pwa/PwaPushNotificationStatus.jsx | 42 + frontend/src/pwa/PwaQuickAction.jsx | 74 + frontend/src/pwa/PwaSprintBoard.jsx | 26 + frontend/src/pwa/PwaSprintEmptyState.jsx | 10 + frontend/src/pwa/PwaSprintFilters.jsx | 22 + frontend/src/pwa/PwaSprintPage.jsx | 198 + frontend/src/pwa/PwaSprintProgress.jsx | 15 + frontend/src/pwa/PwaSprintSelector.jsx | 16 + frontend/src/pwa/PwaSprintStatusColumn.jsx | 22 + frontend/src/pwa/PwaSprintStatusSheet.jsx | 35 + frontend/src/pwa/PwaSprintSummaryCard.jsx | 54 + frontend/src/pwa/PwaSprintTaskCard.jsx | 53 + frontend/src/pwa/PwaStatCard.jsx | 9 + frontend/src/pwa/PwaTaskCard.jsx | 65 + frontend/src/pwa/PwaTaskDetail.jsx | 186 + frontend/src/pwa/PwaTaskFormFields.jsx | 82 + frontend/src/pwa/PwaTasks.jsx | 203 + frontend/src/pwa/PwaThemeSelector.jsx | 28 + frontend/src/pwa/pwaNotificationUtils.js | 36 + frontend/src/pwa/pwaProjectMeta.js | 15 + frontend/src/pwa/pwaTaskMeta.js | 27 + .../pwa/useBidirectionalNotificationSwipe.js | 169 + frontend/src/pwa/useHorizontalSwipeMenu.js | 77 + frontend/src/pwa/usePwaSheetSwipe.js | 105 + frontend/src/services/api.js | 31 + frontend/src/styles/global.css | 1431 +++ frontend/src/styles/pwa.css | 2455 +++++ frontend/src/utils/appMode.js | 44 + frontend/src/utils/date.js | 165 + frontend/src/utils/rolePriority.js | 35 + frontend/src/utils/themeAccent.js | 36 + frontend/src/utils/themeMode.js | 40 + frontend/vite.config.js | 16 + 306 files changed, 37848 insertions(+) create mode 100644 backend/.editorconfig create mode 100644 backend/.env.example create mode 100644 backend/.gitattributes create mode 100644 backend/.gitignore create mode 100644 backend/README.md create mode 100644 backend/app/Http/Controllers/Api/ActivityLogController.php create mode 100644 backend/app/Http/Controllers/Api/AuthController.php create mode 100644 backend/app/Http/Controllers/Api/BacklogController.php create mode 100644 backend/app/Http/Controllers/Api/ChecklistController.php create mode 100644 backend/app/Http/Controllers/Api/CommentController.php create mode 100644 backend/app/Http/Controllers/Api/DashboardController.php create mode 100644 backend/app/Http/Controllers/Api/DepartmentController.php create mode 100644 backend/app/Http/Controllers/Api/FileController.php create mode 100644 backend/app/Http/Controllers/Api/MeetingController.php create mode 100644 backend/app/Http/Controllers/Api/NotificationController.php create mode 100644 backend/app/Http/Controllers/Api/PermissionController.php create mode 100644 backend/app/Http/Controllers/Api/ProjectController.php create mode 100644 backend/app/Http/Controllers/Api/PwaController.php create mode 100644 backend/app/Http/Controllers/Api/ReportController.php create mode 100644 backend/app/Http/Controllers/Api/RoleController.php create mode 100644 backend/app/Http/Controllers/Api/SearchController.php create mode 100644 backend/app/Http/Controllers/Api/SettingController.php create mode 100644 backend/app/Http/Controllers/Api/SprintController.php create mode 100644 backend/app/Http/Controllers/Api/SubtaskController.php create mode 100644 backend/app/Http/Controllers/Api/TaskController.php create mode 100644 backend/app/Http/Controllers/Api/UserController.php create mode 100644 backend/app/Http/Controllers/Controller.php create mode 100644 backend/app/Http/Middleware/EnsureUserHasPermission.php create mode 100644 backend/app/Http/Middleware/SecurityHeaders.php create mode 100644 backend/app/Http/Requests/ChangePasswordRequest.php create mode 100644 backend/app/Http/Requests/LoginRequest.php create mode 100644 backend/app/Http/Requests/StoreBacklogItemRequest.php create mode 100644 backend/app/Http/Requests/StoreCommentRequest.php create mode 100644 backend/app/Http/Requests/StoreMeetingRequest.php create mode 100644 backend/app/Http/Requests/StoreProjectRequest.php create mode 100644 backend/app/Http/Requests/StoreRoleRequest.php create mode 100644 backend/app/Http/Requests/StoreSprintRequest.php create mode 100644 backend/app/Http/Requests/StoreTaskRequest.php create mode 100644 backend/app/Http/Requests/StoreUserRequest.php create mode 100644 backend/app/Http/Requests/UpdateProfileRequest.php create mode 100644 backend/app/Http/Requests/UpdateProjectRequest.php create mode 100644 backend/app/Http/Requests/UpdateRoleRequest.php create mode 100644 backend/app/Http/Requests/UpdateTaskRequest.php create mode 100644 backend/app/Http/Requests/UpdateUserRequest.php create mode 100644 backend/app/Http/Resources/ActivityLogResource.php create mode 100644 backend/app/Http/Resources/BacklogItemResource.php create mode 100644 backend/app/Http/Resources/ChecklistResource.php create mode 100644 backend/app/Http/Resources/CommentResource.php create mode 100644 backend/app/Http/Resources/FileResource.php create mode 100644 backend/app/Http/Resources/MeetingActionItemResource.php create mode 100644 backend/app/Http/Resources/MeetingResource.php create mode 100644 backend/app/Http/Resources/NotificationResource.php create mode 100644 backend/app/Http/Resources/PermissionResource.php create mode 100644 backend/app/Http/Resources/ProjectResource.php create mode 100644 backend/app/Http/Resources/RoleResource.php create mode 100644 backend/app/Http/Resources/SprintResource.php create mode 100644 backend/app/Http/Resources/SubtaskResource.php create mode 100644 backend/app/Http/Resources/TaskResource.php create mode 100644 backend/app/Http/Resources/UserResource.php create mode 100644 backend/app/Models/ActivityLog.php create mode 100644 backend/app/Models/BacklogItem.php create mode 100644 backend/app/Models/Checklist.php create mode 100644 backend/app/Models/Comment.php create mode 100644 backend/app/Models/Department.php create mode 100644 backend/app/Models/File.php create mode 100644 backend/app/Models/Meeting.php create mode 100644 backend/app/Models/MeetingActionItem.php create mode 100644 backend/app/Models/Notification.php create mode 100644 backend/app/Models/Permission.php create mode 100644 backend/app/Models/Project.php create mode 100644 backend/app/Models/Role.php create mode 100644 backend/app/Models/Setting.php create mode 100644 backend/app/Models/Sprint.php create mode 100644 backend/app/Models/SprintRetrospective.php create mode 100644 backend/app/Models/Subtask.php create mode 100644 backend/app/Models/Task.php create mode 100644 backend/app/Models/User.php create mode 100644 backend/app/Policies/MeetingPolicy.php create mode 100644 backend/app/Policies/ProjectPolicy.php create mode 100644 backend/app/Policies/SprintPolicy.php create mode 100644 backend/app/Policies/TaskPolicy.php create mode 100644 backend/app/Policies/UserPolicy.php create mode 100644 backend/app/Providers/AppServiceProvider.php create mode 100644 backend/app/Services/ActivityLogService.php create mode 100644 backend/app/Services/DashboardService.php create mode 100644 backend/app/Services/NotificationService.php create mode 100644 backend/app/Services/ProjectProgressService.php create mode 100644 backend/app/Services/ReportService.php create mode 100644 backend/app/Services/WorkloadService.php create mode 100644 backend/artisan create mode 100644 backend/bootstrap/app.php create mode 100644 backend/bootstrap/cache/.gitignore create mode 100644 backend/bootstrap/providers.php create mode 100644 backend/composer.json create mode 100644 backend/composer.lock create mode 100644 backend/config/app.php create mode 100644 backend/config/auth.php create mode 100644 backend/config/cache.php create mode 100644 backend/config/cors.php create mode 100644 backend/config/database.php create mode 100644 backend/config/filesystems.php create mode 100644 backend/config/logging.php create mode 100644 backend/config/mail.php create mode 100644 backend/config/queue.php create mode 100644 backend/config/sanctum.php create mode 100644 backend/config/services.php create mode 100644 backend/config/session.php create mode 100644 backend/database/.gitignore create mode 100644 backend/database/factories/UserFactory.php create mode 100644 backend/database/migrations/0001_01_01_000000_create_users_table.php create mode 100644 backend/database/migrations/0001_01_01_000001_create_cache_table.php create mode 100644 backend/database/migrations/0001_01_01_000002_create_jobs_table.php create mode 100644 backend/database/migrations/2024_01_01_000003_create_roles_table.php create mode 100644 backend/database/migrations/2024_01_01_000004_create_permissions_table.php create mode 100644 backend/database/migrations/2024_01_01_000005_create_role_user_table.php create mode 100644 backend/database/migrations/2024_01_01_000006_create_permission_role_table.php create mode 100644 backend/database/migrations/2024_01_01_000007_add_role_fields_to_users_table.php create mode 100644 backend/database/migrations/2024_01_01_000008_create_projects_table.php create mode 100644 backend/database/migrations/2024_01_01_000009_create_project_user_table.php create mode 100644 backend/database/migrations/2024_01_01_000010_create_tasks_table.php create mode 100644 backend/database/migrations/2024_01_01_000011_create_checklists_table.php create mode 100644 backend/database/migrations/2024_01_01_000012_create_subtasks_table.php create mode 100644 backend/database/migrations/2024_01_01_000013_create_sprints_table.php create mode 100644 backend/database/migrations/2024_01_01_000014_create_sprint_task_table.php create mode 100644 backend/database/migrations/2024_01_01_000015_create_backlog_items_table.php create mode 100644 backend/database/migrations/2024_01_01_000016_create_meetings_table.php create mode 100644 backend/database/migrations/2024_01_01_000017_create_meeting_user_table.php create mode 100644 backend/database/migrations/2024_01_01_000018_create_meeting_action_items_table.php create mode 100644 backend/database/migrations/2024_01_01_000019_create_comments_table.php create mode 100644 backend/database/migrations/2024_01_01_000020_create_files_table.php create mode 100644 backend/database/migrations/2024_01_01_000021_create_activity_logs_table.php create mode 100644 backend/database/migrations/2024_01_01_000022_create_settings_table.php create mode 100644 backend/database/migrations/2024_01_01_000023_create_notifications_table.php create mode 100644 backend/database/migrations/2026_06_27_170257_create_personal_access_tokens_table.php create mode 100644 backend/database/migrations/2026_06_27_172544_make_project_manager_id_nullable_in_projects_table.php create mode 100644 backend/database/migrations/2026_06_27_180000_create_departments_table.php create mode 100644 backend/database/migrations/2026_06_27_180001_add_department_id_to_users_table.php create mode 100644 backend/database/migrations/2026_06_28_000000_sync_system_roles.php create mode 100644 backend/database/migrations/2026_06_28_000001_remove_legacy_team_member_role.php create mode 100644 backend/database/migrations/2026_06_28_000002_backfill_user_status_and_roles.php create mode 100644 backend/database/migrations/2026_06_28_000003_enhance_sprints.php create mode 100644 backend/database/migrations/2026_06_28_000004_add_organization_metadata_to_departments_table.php create mode 100644 backend/database/migrations/2026_06_28_000005_create_department_user_table.php create mode 100644 backend/database/migrations/2026_06_28_000006_add_department_id_to_projects_table.php create mode 100644 backend/database/migrations/2026_06_28_000007_add_blocker_fields_to_tasks_table.php create mode 100644 backend/database/migrations/2026_06_28_000008_add_notifiable_fields_to_notifications_table.php create mode 100644 backend/database/migrations/2026_06_30_000001_add_type_to_settings_table.php create mode 100644 backend/database/migrations/2026_07_01_000001_add_job_titles_setting.php create mode 100644 backend/database/migrations/2026_07_01_000002_add_pwa_snooze_fields_to_notifications_table.php create mode 100644 backend/database/seeders/ActivityLogSeeder.php create mode 100644 backend/database/seeders/BacklogSeeder.php create mode 100644 backend/database/seeders/CommentSeeder.php create mode 100644 backend/database/seeders/DatabaseSeeder.php create mode 100644 backend/database/seeders/MeetingSeeder.php create mode 100644 backend/database/seeders/NotificationSeeder.php create mode 100644 backend/database/seeders/ProjectSeeder.php create mode 100644 backend/database/seeders/RolePermissionSeeder.php create mode 100644 backend/database/seeders/SettingSeeder.php create mode 100644 backend/database/seeders/SprintSeeder.php create mode 100644 backend/database/seeders/TaskSeeder.php create mode 100644 backend/database/seeders/UserSeeder.php create mode 100644 backend/package.json create mode 100644 backend/phpunit.xml create mode 100644 backend/public/.htaccess create mode 100644 backend/public/favicon.ico create mode 100644 backend/public/index.php create mode 100644 backend/public/robots.txt create mode 100644 backend/resources/css/app.css create mode 100644 backend/resources/js/app.js create mode 100644 backend/resources/js/bootstrap.js create mode 100644 backend/resources/views/welcome.blade.php create mode 100644 backend/routes/api.php create mode 100644 backend/routes/console.php create mode 100644 backend/routes/web.php create mode 100644 backend/storage/app/.gitignore create mode 100644 backend/storage/app/private/.gitignore create mode 100644 backend/storage/app/public/.gitignore create mode 100644 backend/storage/framework/.gitignore create mode 100644 backend/storage/framework/cache/.gitignore create mode 100644 backend/storage/framework/cache/data/.gitignore create mode 100644 backend/storage/framework/sessions/.gitignore create mode 100644 backend/storage/framework/testing/.gitignore create mode 100644 backend/storage/framework/views/.gitignore create mode 100644 backend/storage/logs/.gitignore create mode 100644 backend/tests/Feature/AuthTest.php create mode 100644 backend/tests/Feature/DepartmentMemberTest.php create mode 100644 backend/tests/Feature/ExampleTest.php create mode 100644 backend/tests/Feature/PwaHomeTest.php create mode 100644 backend/tests/Feature/RolePermissionManagementTest.php create mode 100644 backend/tests/Feature/SecurityHardeningTest.php create mode 100644 backend/tests/Feature/SettingTest.php create mode 100644 backend/tests/TestCase.php create mode 100644 backend/tests/Unit/ExampleTest.php create mode 100644 backend/vite.config.js create mode 100644 frontend/.gitignore create mode 100644 frontend/.oxlintrc.json create mode 100644 frontend/README.md create mode 100644 frontend/index.html create mode 100644 frontend/package-lock.json create mode 100644 frontend/package.json create mode 100644 frontend/public/favicon.svg create mode 100644 frontend/public/icons.svg create mode 100644 frontend/public/manifest.webmanifest create mode 100644 frontend/public/offline.html create mode 100644 frontend/public/pwa-sw.js create mode 100644 frontend/src/App.css create mode 100644 frontend/src/App.jsx create mode 100644 frontend/src/assets/hero.png create mode 100644 frontend/src/assets/react.svg create mode 100644 frontend/src/assets/vite.svg create mode 100644 frontend/src/components/ConfirmDialog.jsx create mode 100644 frontend/src/components/EmptyState.jsx create mode 100644 frontend/src/components/FormSelect.jsx create mode 100644 frontend/src/components/Header.jsx create mode 100644 frontend/src/components/LoadingSkeleton.jsx create mode 100644 frontend/src/components/Modal.jsx create mode 100644 frontend/src/components/PersianDateInput.jsx create mode 100644 frontend/src/components/PriorityBadge.jsx create mode 100644 frontend/src/components/Sidebar.jsx create mode 100644 frontend/src/components/StatusBadge.jsx create mode 100644 frontend/src/components/ThemeAccentPicker.jsx create mode 100644 frontend/src/components/ThemeModeToggle.jsx create mode 100644 frontend/src/context/AuthContext.jsx create mode 100644 frontend/src/index.css create mode 100644 frontend/src/main.jsx create mode 100644 frontend/src/pages/Backlog.jsx create mode 100644 frontend/src/pages/Dashboard.jsx create mode 100644 frontend/src/pages/Files.jsx create mode 100644 frontend/src/pages/Kanban.jsx create mode 100644 frontend/src/pages/Login.jsx create mode 100644 frontend/src/pages/MeetingList.jsx create mode 100644 frontend/src/pages/Notifications.jsx create mode 100644 frontend/src/pages/Organization.jsx create mode 100644 frontend/src/pages/Profile.jsx create mode 100644 frontend/src/pages/ProjectDetail.jsx create mode 100644 frontend/src/pages/Projects.jsx create mode 100644 frontend/src/pages/Reports.jsx create mode 100644 frontend/src/pages/Roles.jsx create mode 100644 frontend/src/pages/Settings.jsx create mode 100644 frontend/src/pages/Sprints.jsx create mode 100644 frontend/src/pages/Tasks.jsx create mode 100644 frontend/src/pages/Team.jsx create mode 100644 frontend/src/pwa/PwaAccessSummary.jsx create mode 100644 frontend/src/pwa/PwaAccountInfoCard.jsx create mode 100644 frontend/src/pwa/PwaBottomNav.jsx create mode 100644 frontend/src/pwa/PwaBottomSheet.jsx create mode 100644 frontend/src/pwa/PwaChangePasswordSheet.jsx create mode 100644 frontend/src/pwa/PwaCreateTaskSheet.jsx create mode 100644 frontend/src/pwa/PwaHome.jsx create mode 100644 frontend/src/pwa/PwaInstallStatusCard.jsx create mode 100644 frontend/src/pwa/PwaLayout.jsx create mode 100644 frontend/src/pwa/PwaMarkAllReadButton.jsx create mode 100644 frontend/src/pwa/PwaNotificationBadge.jsx create mode 100644 frontend/src/pwa/PwaNotificationCard.jsx create mode 100644 frontend/src/pwa/PwaNotificationDetailSheet.jsx create mode 100644 frontend/src/pwa/PwaNotificationFilters.jsx create mode 100644 frontend/src/pwa/PwaNotificationItem.jsx create mode 100644 frontend/src/pwa/PwaNotificationProvider.jsx create mode 100644 frontend/src/pwa/PwaNotificationSettings.jsx create mode 100644 frontend/src/pwa/PwaNotificationTime.js create mode 100644 frontend/src/pwa/PwaNotificationsPage.jsx create mode 100644 frontend/src/pwa/PwaProfileAvatar.jsx create mode 100644 frontend/src/pwa/PwaProfileHeader.jsx create mode 100644 frontend/src/pwa/PwaProfilePage.jsx create mode 100644 frontend/src/pwa/PwaProjectActivityList.jsx create mode 100644 frontend/src/pwa/PwaProjectCard.jsx create mode 100644 frontend/src/pwa/PwaProjectDetail.jsx create mode 100644 frontend/src/pwa/PwaProjectFilters.jsx create mode 100644 frontend/src/pwa/PwaProjectMemberList.jsx create mode 100644 frontend/src/pwa/PwaProjectProgress.jsx create mode 100644 frontend/src/pwa/PwaProjectStatusSheet.jsx create mode 100644 frontend/src/pwa/PwaProjectTaskPreview.jsx create mode 100644 frontend/src/pwa/PwaProjectsPage.jsx create mode 100644 frontend/src/pwa/PwaPushNotificationStatus.jsx create mode 100644 frontend/src/pwa/PwaQuickAction.jsx create mode 100644 frontend/src/pwa/PwaSprintBoard.jsx create mode 100644 frontend/src/pwa/PwaSprintEmptyState.jsx create mode 100644 frontend/src/pwa/PwaSprintFilters.jsx create mode 100644 frontend/src/pwa/PwaSprintPage.jsx create mode 100644 frontend/src/pwa/PwaSprintProgress.jsx create mode 100644 frontend/src/pwa/PwaSprintSelector.jsx create mode 100644 frontend/src/pwa/PwaSprintStatusColumn.jsx create mode 100644 frontend/src/pwa/PwaSprintStatusSheet.jsx create mode 100644 frontend/src/pwa/PwaSprintSummaryCard.jsx create mode 100644 frontend/src/pwa/PwaSprintTaskCard.jsx create mode 100644 frontend/src/pwa/PwaStatCard.jsx create mode 100644 frontend/src/pwa/PwaTaskCard.jsx create mode 100644 frontend/src/pwa/PwaTaskDetail.jsx create mode 100644 frontend/src/pwa/PwaTaskFormFields.jsx create mode 100644 frontend/src/pwa/PwaTasks.jsx create mode 100644 frontend/src/pwa/PwaThemeSelector.jsx create mode 100644 frontend/src/pwa/pwaNotificationUtils.js create mode 100644 frontend/src/pwa/pwaProjectMeta.js create mode 100644 frontend/src/pwa/pwaTaskMeta.js create mode 100644 frontend/src/pwa/useBidirectionalNotificationSwipe.js create mode 100644 frontend/src/pwa/useHorizontalSwipeMenu.js create mode 100644 frontend/src/pwa/usePwaSheetSwipe.js create mode 100644 frontend/src/services/api.js create mode 100644 frontend/src/styles/global.css create mode 100644 frontend/src/styles/pwa.css create mode 100644 frontend/src/utils/appMode.js create mode 100644 frontend/src/utils/date.js create mode 100644 frontend/src/utils/rolePriority.js create mode 100644 frontend/src/utils/themeAccent.js create mode 100644 frontend/src/utils/themeMode.js create mode 100644 frontend/vite.config.js diff --git a/backend/.editorconfig b/backend/.editorconfig new file mode 100644 index 0000000..a186cd2 --- /dev/null +++ b/backend/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 + +[compose.yaml] +indent_size = 4 diff --git a/backend/.env.example b/backend/.env.example new file mode 100644 index 0000000..c0660ea --- /dev/null +++ b/backend/.env.example @@ -0,0 +1,65 @@ +APP_NAME=Laravel +APP_ENV=local +APP_KEY= +APP_DEBUG=true +APP_URL=http://localhost + +APP_LOCALE=en +APP_FALLBACK_LOCALE=en +APP_FAKER_LOCALE=en_US + +APP_MAINTENANCE_DRIVER=file +# APP_MAINTENANCE_STORE=database + +# PHP_CLI_SERVER_WORKERS=4 + +BCRYPT_ROUNDS=12 + +LOG_CHANNEL=stack +LOG_STACK=single +LOG_DEPRECATIONS_CHANNEL=null +LOG_LEVEL=debug + +DB_CONNECTION=sqlite +# DB_HOST=127.0.0.1 +# DB_PORT=3306 +# DB_DATABASE=laravel +# DB_USERNAME=root +# DB_PASSWORD= + +SESSION_DRIVER=database +SESSION_LIFETIME=120 +SESSION_ENCRYPT=false +SESSION_PATH=/ +SESSION_DOMAIN=null + +BROADCAST_CONNECTION=log +FILESYSTEM_DISK=local +QUEUE_CONNECTION=database + +CACHE_STORE=database +# CACHE_PREFIX= + +MEMCACHED_HOST=127.0.0.1 + +REDIS_CLIENT=phpredis +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_MAILER=log +MAIL_SCHEME=null +MAIL_HOST=127.0.0.1 +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_FROM_ADDRESS="hello@example.com" +MAIL_FROM_NAME="${APP_NAME}" + +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= +AWS_USE_PATH_STYLE_ENDPOINT=false + +VITE_APP_NAME="${APP_NAME}" diff --git a/backend/.gitattributes b/backend/.gitattributes new file mode 100644 index 0000000..fcb21d3 --- /dev/null +++ b/backend/.gitattributes @@ -0,0 +1,11 @@ +* text=auto eol=lf + +*.blade.php diff=html +*.css diff=css +*.html diff=html +*.md diff=markdown +*.php diff=php + +/.github export-ignore +CHANGELOG.md export-ignore +.styleci.yml export-ignore diff --git a/backend/.gitignore b/backend/.gitignore new file mode 100644 index 0000000..b71b1ea --- /dev/null +++ b/backend/.gitignore @@ -0,0 +1,24 @@ +*.log +.DS_Store +.env +.env.backup +.env.production +.phpactor.json +.phpunit.result.cache +/.fleet +/.idea +/.nova +/.phpunit.cache +/.vscode +/.zed +/auth.json +/node_modules +/public/build +/public/hot +/public/storage +/storage/*.key +/storage/pail +/vendor +Homestead.json +Homestead.yaml +Thumbs.db diff --git a/backend/README.md b/backend/README.md new file mode 100644 index 0000000..0165a77 --- /dev/null +++ b/backend/README.md @@ -0,0 +1,59 @@ +

Laravel Logo

+ +

+Build Status +Total Downloads +Latest Stable Version +License +

+ +## About Laravel + +Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: + +- [Simple, fast routing engine](https://laravel.com/docs/routing). +- [Powerful dependency injection container](https://laravel.com/docs/container). +- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. +- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). +- Database agnostic [schema migrations](https://laravel.com/docs/migrations). +- [Robust background job processing](https://laravel.com/docs/queues). +- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). + +Laravel is accessible, powerful, and provides tools required for large, robust applications. + +## Learning Laravel + +Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. You can also check out [Laravel Learn](https://laravel.com/learn), where you will be guided through building a modern Laravel application. + +If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. + +## Laravel Sponsors + +We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com). + +### Premium Partners + +- **[Vehikl](https://vehikl.com)** +- **[Tighten Co.](https://tighten.co)** +- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** +- **[64 Robots](https://64robots.com)** +- **[Curotec](https://www.curotec.com/services/technologies/laravel)** +- **[DevSquad](https://devsquad.com/hire-laravel-developers)** +- **[Redberry](https://redberry.international/laravel-development)** +- **[Active Logic](https://activelogic.com)** + +## Contributing + +Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). + +## Code of Conduct + +In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). + +## Security Vulnerabilities + +If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. + +## License + +The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). diff --git a/backend/app/Http/Controllers/Api/ActivityLogController.php b/backend/app/Http/Controllers/Api/ActivityLogController.php new file mode 100644 index 0000000..b967d1a --- /dev/null +++ b/backend/app/Http/Controllers/Api/ActivityLogController.php @@ -0,0 +1,78 @@ +filled('project_id')) { + $query->where('project_id', $request->project_id); + } + if ($request->filled('task_id')) { + $query->where('task_id', $request->task_id); + } + if ($request->filled('user_id')) { + $query->where('user_id', $request->user_id); + } + if ($request->filled('action')) { + $query->where('action', $request->action); + } + if ($request->filled('subject_type')) { + $query->where('subject_type', $request->subject_type); + } + if ($request->filled('subject_id')) { + $query->where('subject_id', $request->subject_id); + } + + $perPage = $request->input('per_page', 15); + $sortBy = $request->input('sort_by', 'created_at'); + $sortDir = $request->input('sort_dir', 'desc'); + $logs = $query->orderBy($sortBy, $sortDir)->paginate($perPage); + + return response()->json([ + 'success' => true, + 'data' => ActivityLogResource::collection($logs), + 'meta' => [ + 'current_page' => $logs->currentPage(), + 'last_page' => $logs->lastPage(), + 'per_page' => $logs->perPage(), + 'total' => $logs->total(), + ], + 'message' => 'لاگ فعالیت‌ها', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت لاگ فعالیت‌ها', + ], 500); + } + } + + public function show(ActivityLog $activityLog): JsonResponse + { + try { + $activityLog->load('user'); + + return response()->json([ + 'success' => true, + 'data' => new ActivityLogResource($activityLog), + 'message' => 'جزئیات لاگ', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت جزئیات لاگ', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/AuthController.php b/backend/app/Http/Controllers/Api/AuthController.php new file mode 100644 index 0000000..62d5b22 --- /dev/null +++ b/backend/app/Http/Controllers/Api/AuthController.php @@ -0,0 +1,240 @@ +validated(); + $identifier = strtolower(trim($credentials['identifier'])); + + $user = $this->findUserForLogin($identifier); + + if (!$user || !Hash::check($credentials['password'], $user->password)) { + $this->logAuthEvent(null, 'failed_login', 'تلاش ناموفق ورود', $request, $identifier); + + return response()->json([ + 'success' => false, + 'message' => 'نام کاربری یا رمز عبور اشتباه است', + ], 401); + } + + if ($user->status !== null && $user->status !== 'active') { + $this->logAuthEvent($user->id, 'blocked_login', 'تلاش ورود کاربر غیرفعال', $request, $identifier); + + return response()->json([ + 'success' => false, + 'message' => 'امکان ورود با این اطلاعات وجود ندارد', + ], 403); + } + + $token = $user->createToken('api-token')->plainTextToken; + + $user->load(['roles.permissions']); + $this->logAuthEvent($user->id, 'login', 'ورود موفق به سیستم', $request, $identifier); + + return response()->json([ + 'success' => true, + 'data' => [ + 'user' => new UserResource($user), + 'token' => $token, + 'permissions' => $user->roles->flatMap(function ($role) { + return $role->permissions->pluck('name'); + })->unique()->values(), + ], + 'message' => 'ورود با موفقیت انجام شد', + ]); + } catch (\Exception $e) { + Log::error('Login failed unexpectedly', [ + 'identifier_hash' => isset($identifier) ? hash('sha256', $identifier) : null, + 'exception' => $e, + ]); + + return response()->json([ + 'success' => false, + 'message' => 'خطا در ورود به سیستم', + ], 500); + } + } + + private function findUserForLogin(string $identifier): ?User + { + $query = User::query() + ->whereRaw('LOWER(email) = ?', [$identifier]) + ->orWhereRaw('LOWER(name) = ?', [$identifier]); + + if (Schema::hasColumn('users', 'username')) { + $query->orWhereRaw('LOWER(username) = ?', [$identifier]); + } + + $user = $query->orderBy('id')->first(); + + if ($user || str_contains($identifier, '@')) { + return $user; + } + + $emailPrefixMatches = User::query() + ->whereRaw('LOWER(email) LIKE ?', [$identifier.'@%']) + ->limit(2) + ->get(); + + return $emailPrefixMatches->count() === 1 ? $emailPrefixMatches->first() : null; + } + + public function logout(Request $request): JsonResponse + { + try { + $this->logAuthEvent($request->user()?->id, 'logout', 'خروج از سیستم', $request); + $request->user()->currentAccessToken()?->delete(); + + return response()->json([ + 'success' => true, + 'message' => 'خروج با موفقیت انجام شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در خروج از سیستم', + ], 500); + } + } + + public function user(Request $request): JsonResponse + { + try { + $user = $request->user()->load(['roles.permissions']); + + return response()->json([ + 'success' => true, + 'data' => new UserResource($user), + 'message' => 'اطلاعات کاربر', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت اطلاعات کاربر', + ], 500); + } + } + + public function updateProfile(UpdateProfileRequest $request): JsonResponse + { + try { + $user = $request->user(); + $user->update($request->validated()); + + return response()->json([ + 'success' => true, + 'data' => new UserResource($user->fresh()), + 'message' => 'پروفایل با موفقیت به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی پروفایل', + ], 500); + } + } + + public function updateAvatar(Request $request): JsonResponse + { + try { + $request->validate([ + 'avatar' => 'required|image|mimes:jpg,jpeg,png,webp|max:2048', + ]); + + $user = $request->user(); + if ($user->avatar && $user->avatar !== 'avatars/default.png' && Storage::disk('public')->exists($user->avatar)) { + Storage::disk('public')->delete($user->avatar); + } + + $path = $request->file('avatar')->store('avatars', 'public'); + $user->update(['avatar' => $path]); + + return response()->json([ + 'success' => true, + 'data' => new UserResource($user->fresh()), + 'message' => 'عکس پروفایل با موفقیت به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی عکس پروفایل', + ], 500); + } + } + + public function changePassword(ChangePasswordRequest $request): JsonResponse + { + try { + $user = $request->user(); + + if (!Hash::check($request->current_password, $user->password)) { + return response()->json([ + 'success' => false, + 'message' => 'رمز عبور فعلی اشتباه است', + ], 400); + } + + $user->update(['password' => Hash::make($request->new_password)]); + + return response()->json([ + 'success' => true, + 'message' => 'رمز عبور با موفقیت تغییر یافت', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در تغییر رمز عبور', + ], 500); + } + } + + public function forgotPassword(Request $request): JsonResponse + { + return response()->json([ + 'success' => true, + 'message' => 'لینک بازیابی رمز عبور به ایمیل شما ارسال شد', + ]); + } + + private function logAuthEvent(?int $userId, string $action, string $description, Request $request, ?string $identifier = null): void + { + try { + $properties = [ + 'ip' => $request->ip(), + 'user_agent' => substr((string) $request->userAgent(), 0, 255), + ]; + + if ($identifier) { + $properties['identifier_hash'] = hash('sha256', strtolower($identifier)); + } + + $this->activityLogService->log($userId, $action, $description, 'auth', $userId, null, null, $properties); + } catch (\Throwable $e) { + Log::warning('Auth activity log failed', [ + 'user_id' => $userId, + 'action' => $action, + 'exception' => $e, + ]); + } + } +} diff --git a/backend/app/Http/Controllers/Api/BacklogController.php b/backend/app/Http/Controllers/Api/BacklogController.php new file mode 100644 index 0000000..340578e --- /dev/null +++ b/backend/app/Http/Controllers/Api/BacklogController.php @@ -0,0 +1,182 @@ +filled('project_id')) { + $query->where('project_id', $request->project_id); + } + if ($request->filled('type')) { + $query->where('type', $request->type); + } + if ($request->filled('status')) { + $query->where('status', $request->status); + } + if ($request->filled('priority')) { + $query->where('priority', $request->priority); + } + + $perPage = $request->input('per_page', 15); + $sortBy = $request->input('sort_by', 'created_at'); + $sortDir = $request->input('sort_dir', 'desc'); + $items = $query->orderBy($sortBy, $sortDir)->paginate($perPage); + + return response()->json([ + 'success' => true, + 'data' => BacklogItemResource::collection($items), + 'meta' => [ + 'current_page' => $items->currentPage(), + 'last_page' => $items->lastPage(), + 'per_page' => $items->perPage(), + 'total' => $items->total(), + ], + 'message' => 'لیست بکلاگ', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت بکلاگ', + ], 500); + } + } + + public function show(BacklogItem $backlogItem): JsonResponse + { + try { + $backlogItem->load(['project', 'assignedSprint', 'creator']); + + return response()->json([ + 'success' => true, + 'data' => new BacklogItemResource($backlogItem), + 'message' => 'اطلاعات آیتم بکلاگ', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت اطلاعات آیتم بکلاگ', + ], 500); + } + } + + public function store(StoreBacklogItemRequest $request): JsonResponse + { + try { + $data = $request->validated(); + $data['created_by'] = $request->user()->id; + $item = BacklogItem::create($data); + $item->load(['project', 'assignedSprint', 'creator']); + + return response()->json([ + 'success' => true, + 'data' => new BacklogItemResource($item), + 'message' => 'آیتم بکلاگ ایجاد شد', + ], 201); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در ایجاد آیتم بکلاگ', + ], 500); + } + } + + public function update(Request $request, BacklogItem $backlogItem): JsonResponse + { + try { + $request->validate([ + 'title' => 'sometimes|required|string|max:255', + 'description' => 'nullable|string', + 'type' => 'sometimes|required|string|max:50', + 'priority' => 'nullable|string|max:50', + 'estimated_effort' => 'nullable|numeric', + 'status' => 'nullable|string|max:50', + 'assigned_sprint_id' => 'nullable|exists:sprints,id', + ]); + + $backlogItem->update($request->only([ + 'title', 'description', 'type', 'priority', + 'estimated_effort', 'status', 'assigned_sprint_id' + ])); + $backlogItem->load(['project', 'assignedSprint', 'creator']); + + return response()->json([ + 'success' => true, + 'data' => new BacklogItemResource($backlogItem->fresh()), + 'message' => 'آیتم بکلاگ به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی آیتم بکلاگ', + ], 500); + } + } + + public function destroy(BacklogItem $backlogItem): JsonResponse + { + try { + $backlogItem->delete(); + + return response()->json([ + 'success' => true, + 'message' => 'آیتم بکلاگ حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف آیتم بکلاگ', + ], 500); + } + } + + public function convertToTask(Request $request, BacklogItem $backlogItem): JsonResponse + { + try { + $request->validate([ + 'assignee_id' => 'nullable|exists:users,id', + 'priority' => 'nullable|string', + 'due_date' => 'nullable|date', + ]); + + $task = Task::create([ + 'title' => $backlogItem->title, + 'description' => $backlogItem->description, + 'project_id' => $backlogItem->project_id, + 'assignee_id' => $request->assignee_id, + 'reporter_id' => $request->user()->id, + 'created_by' => $request->user()->id, + 'priority' => $request->priority ?? $backlogItem->priority, + 'status' => 'todo', + ]); + + $backlogItem->update(['status' => 'converted']); + + $task->load(['project', 'assignee', 'reporter']); + + return response()->json([ + 'success' => true, + 'data' => new TaskResource($task), + 'message' => 'آیتم بکلاگ به وظیفه تبدیل شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در تبدیل آیتم بکلاگ به وظیفه', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/ChecklistController.php b/backend/app/Http/Controllers/Api/ChecklistController.php new file mode 100644 index 0000000..c335f7b --- /dev/null +++ b/backend/app/Http/Controllers/Api/ChecklistController.php @@ -0,0 +1,115 @@ +checklists()->orderBy('position')->get(); + + return response()->json([ + 'success' => true, + 'data' => ChecklistResource::collection($checklists), + 'message' => 'لیست چک‌لیست‌ها', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت چک‌لیست‌ها', + ], 500); + } + } + + public function store(Request $request, Task $task): JsonResponse + { + try { + $request->validate([ + 'title' => 'required|string|max:255', + 'position' => 'nullable|integer', + ]); + + $data = $request->only(['title', 'position']); + $data['task_id'] = $task->id; + $data['is_completed'] = false; + $checklist = Checklist::create($data); + + return response()->json([ + 'success' => true, + 'data' => new ChecklistResource($checklist), + 'message' => 'آیتم چک‌لیست ایجاد شد', + ], 201); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در ایجاد چک‌لیست', + ], 500); + } + } + + public function update(Request $request, Checklist $checklist): JsonResponse + { + try { + $request->validate([ + 'title' => 'sometimes|required|string|max:255', + 'position' => 'nullable|integer', + ]); + + $checklist->update($request->only(['title', 'position'])); + + return response()->json([ + 'success' => true, + 'data' => new ChecklistResource($checklist->fresh()), + 'message' => 'چک‌لیست به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی چک‌لیست', + ], 500); + } + } + + public function destroy(Checklist $checklist): JsonResponse + { + try { + $checklist->delete(); + + return response()->json([ + 'success' => true, + 'message' => 'چک‌لیست حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف چک‌لیست', + ], 500); + } + } + + public function toggleComplete(Checklist $checklist): JsonResponse + { + try { + $checklist->update(['is_completed' => !$checklist->is_completed]); + + return response()->json([ + 'success' => true, + 'data' => new ChecklistResource($checklist->fresh()), + 'message' => $checklist->is_completed ? 'تکمیل شد' : 'ناتمام', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در تغییر وضعیت چک‌لیست', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/CommentController.php b/backend/app/Http/Controllers/Api/CommentController.php new file mode 100644 index 0000000..70bf3f1 --- /dev/null +++ b/backend/app/Http/Controllers/Api/CommentController.php @@ -0,0 +1,173 @@ +filled('commentable_type')) { + $query->where('commentable_type', $request->commentable_type); + } + if ($request->filled('commentable_id')) { + $query->where('commentable_id', $request->commentable_id); + } + + $perPage = $request->input('per_page', 15); + $comments = $query->orderBy('created_at', 'desc')->paginate($perPage); + + return response()->json([ + 'success' => true, + 'data' => CommentResource::collection($comments), + 'meta' => [ + 'current_page' => $comments->currentPage(), + 'last_page' => $comments->lastPage(), + 'per_page' => $comments->perPage(), + 'total' => $comments->total(), + ], + 'message' => 'لیست نظرات', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت نظرات', + ], 500); + } + } + + public function store(StoreCommentRequest $request): JsonResponse + { + try { + $data = $request->validated(); + $data['user_id'] = $request->user()->id; + $comment = Comment::create($data); + $comment->load('user'); + + if (!empty($data['mentioned_user_id'])) { + $mentionedUser = User::find($data['mentioned_user_id']); + if ($mentionedUser && $mentionedUser->id !== $request->user()->id) { + $this->notificationService->create( + $mentionedUser->id, + 'mention', + [ + 'comment_id' => $comment->id, + 'task_id' => $comment->commentable_type === 'App\\Models\\Task' ? $comment->commentable_id : null, + 'notifiable_type' => $comment->commentable_type, + 'notifiable_id' => $comment->commentable_id, + 'url' => $comment->commentable_type === 'App\\Models\\Task' ? '/kanban' : null, + ], + "شما توسط {$request->user()->name} در یک نوت منشن شدید" + ); + } + } + + preg_match_all('/@(\w+)/', $comment->body, $matches); + if (!empty($matches[1])) { + $mentionedUsers = User::whereIn('name', $matches[1])->get(); + foreach ($mentionedUsers as $mentionedUser) { + $mentionedUser->notifications()->create([ + 'type' => 'mention', + 'title' => 'منشن جدید', + 'body' => "شما در کامنت توسط {$request->user()->name} منشن شدید", + 'data' => [ + 'comment_id' => $comment->id, + 'task_id' => $comment->commentable_type === 'App\\Models\\Task' ? $comment->commentable_id : null, + 'url' => $comment->commentable_type === 'App\\Models\\Task' ? '/kanban' : null, + ], + 'is_read' => false, + ]); + } + } + + $this->activityLogService->log( + $request->user()->id, + 'create_comment', + 'نظر جدید اضافه شد', + $comment->commentable_type, + $comment->commentable_id, + null, + null, + ['comment_id' => $comment->id] + ); + + return response()->json([ + 'success' => true, + 'data' => new CommentResource($comment), + 'message' => 'نظر با موفقیت ثبت شد', + ], 201); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در ثبت نظر', + ], 500); + } + } + + public function update(Request $request, Comment $comment): JsonResponse + { + try { + if ($comment->user_id !== $request->user()->id) { + return response()->json([ + 'success' => false, + 'message' => 'شما اجازه ویرایش این نظر را ندارید', + ], 403); + } + + $request->validate(['body' => 'required|string']); + $comment->update(['body' => $request->body]); + + return response()->json([ + 'success' => true, + 'data' => new CommentResource($comment->fresh()->load('user')), + 'message' => 'نظر به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی نظر', + ], 500); + } + } + + public function destroy(Request $request, Comment $comment): JsonResponse + { + try { + if ($comment->user_id !== $request->user()->id) { + return response()->json([ + 'success' => false, + 'message' => 'شما اجازه حذف این نظر را ندارید', + ], 403); + } + + $comment->delete(); + + return response()->json([ + 'success' => true, + 'message' => 'نظر حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف نظر', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/DashboardController.php b/backend/app/Http/Controllers/Api/DashboardController.php new file mode 100644 index 0000000..ecc780b --- /dev/null +++ b/backend/app/Http/Controllers/Api/DashboardController.php @@ -0,0 +1,49 @@ +dashboardService->getSummary($request->user()); + + return response()->json([ + 'success' => true, + 'data' => $data, + 'message' => 'خلاصه داشبورد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت اطلاعات داشبورد', + ], 500); + } + } + + public function charts(): JsonResponse + { + try { + $data = $this->dashboardService->getChartData(); + + return response()->json([ + 'success' => true, + 'data' => $data, + 'message' => 'نمودارهای داشبورد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت نمودارها', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/DepartmentController.php b/backend/app/Http/Controllers/Api/DepartmentController.php new file mode 100644 index 0000000..022474a --- /dev/null +++ b/backend/app/Http/Controllers/Api/DepartmentController.php @@ -0,0 +1,370 @@ +orderBy('sort_order')->get(); + $departmentIds = $departments->pluck('id'); + + $tree = $departments + ->filter(fn($department) => $department->parent_id === null || !$departmentIds->contains($department->parent_id)) + ->values() + ->map(fn($d) => $this->formatNode($d, $departments)); + + return response()->json([ + 'success' => true, + 'data' => $tree, + 'flat' => $departments->values()->map(fn($d) => [ + 'id' => $d->id, + 'name' => $d->name, + 'type' => $d->type ?? 'department', + 'parent_id' => $d->parent_id, + 'parent_name' => $departments->firstWhere('id', $d->parent_id)?->name, + 'children_count' => $departments->where('parent_id', $d->id)->count(), + ]), + 'message' => 'ساختار سازمانی', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت ساختار سازمانی', + ], 500); + } + } + + private function formatNode($dept, $all): array + { + $children = $all->where('parent_id', $dept->id)->values(); + return [ + 'id' => $dept->id, + 'name' => $dept->name, + 'description' => $dept->description, + 'type' => $dept->type ?? 'department', + 'parent_id' => $dept->parent_id, + 'manager' => $dept->manager ? ['id' => $dept->manager->id, 'name' => $dept->manager->name] : null, + 'manager_id' => $dept->manager_id, + 'manager_changed_at' => $dept->manager_changed_at, + 'is_active' => $dept->is_active, + 'sort_order' => $dept->sort_order, + 'users_count' => $dept->members()->count() ?: $dept->users()->count(), + 'children' => $children->map(fn($c) => $this->formatNode($c, $all)), + ]; + } + + public function store(Request $request): JsonResponse + { + try { + $request->validate([ + 'name' => 'required|string|max:255', + 'description' => 'nullable|string', + 'type' => 'nullable|string|in:organization,department,unit,team', + 'parent_id' => 'nullable|exists:departments,id', + 'manager_id' => 'nullable|exists:users,id', + 'is_active' => 'nullable|boolean', + 'sort_order' => 'nullable|integer', + ]); + + $data = $request->only(['name', 'description', 'type', 'parent_id', 'manager_id', 'is_active', 'sort_order']); + $data['type'] = $data['type'] ?? 'department'; + $data['is_active'] = $data['is_active'] ?? true; + if (!empty($data['manager_id'])) { + $data['manager_changed_at'] = now(); + } + $dept = Department::create($data); + + $this->activityLogService->log( + $request->user()?->id, + 'create_department', + "بخش {$dept->name} ایجاد شد", + 'department', + $dept->id, + null, + null, + ['new' => $dept->only(['name', 'type', 'parent_id', 'manager_id', 'is_active'])] + ); + + return response()->json([ + 'success' => true, + 'data' => $dept->load('manager'), + 'message' => 'دپارتمان با موفقیت ایجاد شد', + ], 201); + } catch (ValidationException $e) { + throw $e; + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در ایجاد دپارتمان', + ], 500); + } + } + + public function show(Department $department): JsonResponse + { + try { + $department->load(['manager', 'parent', 'children']); + return response()->json([ + 'success' => true, + 'data' => $department, + 'message' => 'اطلاعات دپارتمان', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت اطلاعات دپارتمان', + ], 500); + } + } + + public function update(Request $request, Department $department): JsonResponse + { + try { + $request->validate([ + 'name' => 'sometimes|required|string|max:255', + 'description' => 'nullable|string', + 'type' => 'nullable|string|in:organization,department,unit,team', + 'parent_id' => 'nullable|exists:departments,id', + 'manager_id' => 'nullable|exists:users,id', + 'is_active' => 'nullable|boolean', + 'sort_order' => 'nullable|integer', + ]); + + $old = $department->only(['name', 'description', 'type', 'parent_id', 'manager_id', 'is_active', 'sort_order']); + $payload = $request->only(['name', 'description', 'type', 'parent_id', 'manager_id', 'is_active', 'sort_order']); + if (array_key_exists('manager_id', $payload) && (int) $payload['manager_id'] !== (int) $department->manager_id) { + $payload['manager_changed_at'] = now(); + } + $department->update($payload); + + $changed = collect($payload) + ->except('manager_changed_at') + ->filter(fn($value, $key) => array_key_exists($key, $old) && $old[$key] != $department->{$key}) + ->map(fn($value, $key) => ['old' => $old[$key], 'new' => $department->{$key}]) + ->all(); + + if (!empty($changed)) { + $this->activityLogService->log( + $request->user()?->id, + array_key_exists('manager_id', $changed) ? 'change_department_manager' : 'update_department', + array_key_exists('manager_id', $changed) + ? "مدیر بخش {$department->name} تغییر کرد" + : "بخش {$department->name} ویرایش شد", + 'department', + $department->id, + null, + null, + ['changes' => $changed] + ); + } + + return response()->json([ + 'success' => true, + 'data' => $department->fresh()->load('manager'), + 'message' => 'دپارتمان به‌روزرسانی شد', + ]); + } catch (ValidationException $e) { + throw $e; + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی دپارتمان', + ], 500); + } + } + + public function destroy(Request $request, Department $department): JsonResponse + { + try { + if ($department->children()->exists()) { + return response()->json([ + 'success' => false, + 'message' => 'این دپارتمان دارای زیرمجموعه است. ابتدا زیرمجموعه‌ها را حذف کنید.', + ], 400); + } + if ($department->members()->exists() || $department->users()->exists()) { + return response()->json([ + 'success' => false, + 'message' => 'این بخش عضو دارد. ابتدا اعضا را منتقل کنید یا بخش را غیرفعال کنید.', + ], 400); + } + + $departmentName = $department->name; + $departmentId = $department->id; + $department->delete(); + + $this->activityLogService->log( + $request->user()?->id, + 'delete_department', + "بخش {$departmentName} حذف شد", + 'department', + $departmentId + ); + + return response()->json([ + 'success' => true, + 'message' => 'دپارتمان حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف دپارتمان', + ], 500); + } + } + + public function addMember(Request $request, Department $department): JsonResponse + { + try { + $request->validate([ + 'user_id' => 'required|exists:users,id', + 'role_in_team' => 'nullable|string|max:255', + 'is_primary' => 'nullable|boolean', + ]); + + $user = User::findOrFail($request->user_id); + $isPrimary = $request->boolean('is_primary'); + $this->syncMember($department, $user, $request->role_in_team, $isPrimary); + + $this->activityLogService->log( + $request->user()?->id, + 'add_department_member', + "{$user->name} به {$department->name} اضافه شد", + 'department', + $department->id, + null, + null, + ['user_id' => $user->id, 'role_in_team' => $request->role_in_team, 'is_primary' => $isPrimary] + ); + + return response()->json(['success' => true, 'message' => 'عضو اضافه شد']); + } catch (ValidationException $e) { + throw $e; + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در افزودن عضو'], 500); + } + } + + public function updateMember(Request $request, Department $department, User $user): JsonResponse + { + try { + $request->validate([ + 'role_in_team' => 'nullable|string|max:255', + 'is_primary' => 'nullable|boolean', + ]); + + $isPrimary = $request->boolean('is_primary'); + $this->syncMember($department, $user, $request->role_in_team, $isPrimary); + + $this->activityLogService->log( + $request->user()?->id, + 'update_department_member', + "عضویت {$user->name} در {$department->name} ویرایش شد", + 'department', + $department->id, + null, + null, + ['user_id' => $user->id, 'role_in_team' => $request->role_in_team, 'is_primary' => $isPrimary] + ); + + return response()->json(['success' => true, 'message' => 'عضویت به‌روزرسانی شد']); + } catch (ValidationException $e) { + throw $e; + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در به‌روزرسانی عضویت'], 500); + } + } + + public function removeMember(Request $request, Department $department, User $user): JsonResponse + { + try { + $department->members()->detach($user->id); + if ((int) $user->department_id === (int) $department->id) { + $primary = $user->departments()->wherePivot('is_primary', true)->first(); + $user->update([ + 'department_id' => $primary?->id, + 'department' => $primary?->name, + ]); + } + + $this->activityLogService->log( + $request->user()?->id, + 'remove_department_member', + "{$user->name} از {$department->name} حذف شد", + 'department', + $department->id, + null, + null, + ['user_id' => $user->id] + ); + + return response()->json(['success' => true, 'message' => 'عضو حذف شد']); + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در حذف عضو'], 500); + } + } + + public function transferMember(Request $request, Department $department, User $user): JsonResponse + { + try { + $request->validate([ + 'target_department_id' => 'required|exists:departments,id', + 'role_in_team' => 'nullable|string|max:255', + 'is_primary' => 'nullable|boolean', + ]); + + $target = Department::findOrFail($request->target_department_id); + $department->members()->detach($user->id); + $this->syncMember($target, $user, $request->role_in_team, $request->boolean('is_primary', true)); + + $this->activityLogService->log( + $request->user()?->id, + 'transfer_department_member', + "{$user->name} از {$department->name} به {$target->name} منتقل شد", + 'department', + $department->id, + null, + null, + ['user_id' => $user->id, 'from' => $department->id, 'to' => $target->id] + ); + + return response()->json(['success' => true, 'message' => 'عضو منتقل شد']); + } catch (ValidationException $e) { + throw $e; + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در انتقال عضو'], 500); + } + } + + private function syncMember(Department $department, User $user, ?string $roleInTeam, bool $isPrimary): void + { + if ($isPrimary) { + DB::table('department_user')->where('user_id', $user->id)->update(['is_primary' => false]); + $user->update([ + 'department_id' => $department->id, + 'department' => $department->name, + ]); + } + + $department->members()->syncWithoutDetaching([ + $user->id => [ + 'role_in_team' => $roleInTeam, + 'is_primary' => $isPrimary, + 'joined_at' => now(), + ], + ]); + } +} diff --git a/backend/app/Http/Controllers/Api/FileController.php b/backend/app/Http/Controllers/Api/FileController.php new file mode 100644 index 0000000..ab584de --- /dev/null +++ b/backend/app/Http/Controllers/Api/FileController.php @@ -0,0 +1,155 @@ +filled('fileable_type')) { + $query->where('fileable_type', $request->fileable_type); + } + if ($request->filled('fileable_id')) { + $query->where('fileable_id', $request->fileable_id); + } + + $perPage = $request->input('per_page', 15); + $files = $query->orderBy('created_at', 'desc')->paginate($perPage); + + return response()->json([ + 'success' => true, + 'data' => FileResource::collection($files), + 'meta' => [ + 'current_page' => $files->currentPage(), + 'last_page' => $files->lastPage(), + 'per_page' => $files->perPage(), + 'total' => $files->total(), + ], + 'message' => 'لیست فایل‌ها', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت فایل‌ها', + ], 500); + } + } + + public function store(Request $request): JsonResponse + { + try { + $request->validate([ + 'file' => 'required|file|max:10240|mimes:pdf,doc,docx,xls,xlsx,ppt,pptx,txt,csv,jpg,jpeg,png,webp,zip', + 'fileable_type' => 'nullable|string|in:App\\Models\\Project,App\\Models\\Task,App\\Models\\Comment,App\\Models\\Meeting', + 'fileable_id' => 'nullable|integer', + 'project_id' => 'nullable|exists:projects,id', + ]); + + $fileableType = $request->fileable_type; + $fileableId = $request->fileable_id; + + if ($request->filled('project_id')) { + $fileableType = Project::class; + $fileableId = $request->project_id; + } + + if (!$fileableType || !$fileableId) { + return response()->json([ + 'success' => false, + 'message' => 'انتخاب محل آپلود فایل الزامی است', + ], 422); + } + + $uploadedFile = $request->file('file'); + $originalName = $uploadedFile->getClientOriginalName(); + $extension = strtolower($uploadedFile->getClientOriginalExtension()); + $name = Str::uuid()->toString() . ($extension ? ".{$extension}" : ''); + $path = $uploadedFile->storeAs('files', $name, 'local'); + + $file = File::create([ + 'name' => $name, + 'original_name' => $originalName, + 'path' => $path, + 'mime_type' => $uploadedFile->getMimeType(), + 'size' => $uploadedFile->getSize(), + 'fileable_id' => $fileableId, + 'fileable_type' => $fileableType, + 'user_id' => $request->user()->id, + ]); + $file->load('user'); + + return response()->json([ + 'success' => true, + 'data' => new FileResource($file), + 'message' => 'فایل با موفقیت آپلود شد', + ], 201); + } catch (ValidationException $e) { + throw $e; + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در آپلود فایل', + ], 500); + } + } + + public function show(File $file): JsonResponse + { + try { + $disk = Storage::disk('local')->exists($file->path) ? 'local' : 'public'; + + if (!Storage::disk($disk)->exists($file->path)) { + return response()->json([ + 'success' => false, + 'message' => 'فایل یافت نشد', + ], 404); + } + + $filePath = Storage::disk($disk)->path($file->path); + + return response()->download($filePath, $file->original_name); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت فایل', + ], 500); + } + } + + public function destroy(File $file): JsonResponse + { + try { + foreach (['local', 'public'] as $disk) { + if (Storage::disk($disk)->exists($file->path)) { + Storage::disk($disk)->delete($file->path); + break; + } + } + + $file->delete(); + + return response()->json([ + 'success' => true, + 'message' => 'فایل حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف فایل', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/MeetingController.php b/backend/app/Http/Controllers/Api/MeetingController.php new file mode 100644 index 0000000..daa29e3 --- /dev/null +++ b/backend/app/Http/Controllers/Api/MeetingController.php @@ -0,0 +1,306 @@ +filled('project_id')) { + $query->where('project_id', $request->project_id); + } + if ($request->filled('date_from')) { + $query->whereDate('date', '>=', $request->date_from); + } + if ($request->filled('date_to')) { + $query->whereDate('date', '<=', $request->date_to); + } + if ($request->filled('meeting_type')) { + $query->where('meeting_type', $request->meeting_type); + } + + $perPage = $request->input('per_page', 15); + $sortBy = $request->input('sort_by', 'date'); + $sortDir = $request->input('sort_dir', 'desc'); + $meetings = $query->orderBy($sortBy, $sortDir)->paginate($perPage); + + return response()->json([ + 'success' => true, + 'data' => MeetingResource::collection($meetings), + 'meta' => [ + 'current_page' => $meetings->currentPage(), + 'last_page' => $meetings->lastPage(), + 'per_page' => $meetings->perPage(), + 'total' => $meetings->total(), + ], + 'message' => 'لیست جلسات', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت جلسات', + ], 500); + } + } + + public function show(Meeting $meeting): JsonResponse + { + try { + $meeting->load(['project', 'creator', 'participants', 'actionItems.assignee']); + + return response()->json([ + 'success' => true, + 'data' => new MeetingResource($meeting), + 'message' => 'اطلاعات جلسه', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت اطلاعات جلسه', + ], 500); + } + } + + public function store(StoreMeetingRequest $request): JsonResponse + { + try { + $data = $request->validated(); + $data['created_by'] = $request->user()->id; + $meeting = Meeting::create($data); + $meeting->load(['project', 'creator']); + + return response()->json([ + 'success' => true, + 'data' => new MeetingResource($meeting), + 'message' => 'جلسه با موفقیت ایجاد شد', + ], 201); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در ایجاد جلسه', + ], 500); + } + } + + public function update(Request $request, Meeting $meeting): JsonResponse + { + try { + $request->validate([ + 'title' => 'sometimes|required|string|max:255', + 'date' => 'sometimes|required|date', + 'start_time' => 'nullable', + 'end_time' => 'nullable', + 'meeting_type' => 'sometimes|required|string|max:50', + 'location' => 'nullable|string', + 'meeting_link' => 'nullable|string', + 'agenda' => 'nullable|string', + 'notes' => 'nullable|string', + 'decisions' => 'nullable|string', + ]); + + $meeting->update($request->only([ + 'title', 'date', 'start_time', 'end_time', 'meeting_type', + 'location', 'meeting_link', 'agenda', 'notes', 'decisions' + ])); + $meeting->load(['project', 'creator']); + + return response()->json([ + 'success' => true, + 'data' => new MeetingResource($meeting->fresh()), + 'message' => 'جلسه به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی جلسه', + ], 500); + } + } + + public function destroy(Meeting $meeting): JsonResponse + { + try { + $meeting->delete(); + + return response()->json([ + 'success' => true, + 'message' => 'جلسه حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف جلسه', + ], 500); + } + } + + public function addParticipant(Request $request, Meeting $meeting): JsonResponse + { + try { + $request->validate(['user_id' => 'required|exists:users,id']); + $meeting->participants()->syncWithoutDetaching([$request->user_id]); + + $this->notificationService->create( + $request->user_id, + 'meeting_assigned', + [ + 'meeting_id' => $meeting->id, + 'project_id' => $meeting->project_id, + 'url' => '/meetings', + 'notifiable_type' => 'App\\Models\\Meeting', + 'notifiable_id' => $meeting->id, + ], + "شما به جلسه {$meeting->title} اضافه شدید" + ); + + return response()->json([ + 'success' => true, + 'message' => 'شرکت‌کننده اضافه شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در اضافه کردن شرکت‌کننده', + ], 500); + } + } + + public function removeParticipant(Meeting $meeting, User $user): JsonResponse + { + try { + $meeting->participants()->detach($user->id); + + return response()->json([ + 'success' => true, + 'message' => 'شرکت‌کننده حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف شرکت‌کننده', + ], 500); + } + } + + public function addActionItem(Request $request, Meeting $meeting): JsonResponse + { + try { + $request->validate([ + 'title' => 'required|string|max:255', + 'assigned_to' => 'nullable|exists:users,id', + 'due_date' => 'nullable|date', + ]); + + $actionItem = $meeting->actionItems()->create([ + 'title' => $request->title, + 'assigned_to' => $request->assigned_to, + 'due_date' => $request->due_date, + 'is_completed' => false, + ]); + $actionItem->load('assignee'); + + if ($actionItem->assigned_to) { + $this->notificationService->create( + $actionItem->assigned_to, + 'meeting_action_assigned', + [ + 'meeting_id' => $meeting->id, + 'action_item_id' => $actionItem->id, + 'url' => '/meetings', + 'notifiable_type' => 'App\\Models\\MeetingActionItem', + 'notifiable_id' => $actionItem->id, + ], + "اقدام جلسه {$actionItem->title} به شما اختصاص داده شد" + ); + } + + return response()->json([ + 'success' => true, + 'data' => new MeetingActionItemResource($actionItem), + 'message' => 'ایتم اقدام ایجاد شد', + ], 201); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در ایجاد ایتم اقدام', + ], 500); + } + } + + public function updateActionItem(Request $request, Meeting $meeting, MeetingActionItem $actionItem): JsonResponse + { + try { + $request->validate([ + 'title' => 'sometimes|required|string|max:255', + 'assigned_to' => 'nullable|exists:users,id', + 'due_date' => 'nullable|date', + 'is_completed' => 'nullable|boolean', + ]); + + $actionItem->update($request->only(['title', 'assigned_to', 'due_date', 'is_completed'])); + $actionItem->load('assignee'); + + return response()->json([ + 'success' => true, + 'data' => new MeetingActionItemResource($actionItem->fresh()), + 'message' => 'ایتم اقدام به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی ایتم اقدام', + ], 500); + } + } + + public function convertActionItemToTask(Request $request, Meeting $meeting, MeetingActionItem $actionItem): JsonResponse + { + try { + $request->validate([ + 'project_id' => 'required|exists:projects,id', + ]); + + $task = Task::create([ + 'title' => $actionItem->title, + 'project_id' => $request->project_id, + 'assignee_id' => $actionItem->assigned_to, + 'reporter_id' => $request->user()->id, + 'created_by' => $request->user()->id, + 'due_date' => $actionItem->due_date, + 'status' => 'todo', + ]); + + $actionItem->update(['converted_to_task_id' => $task->id]); + $task->load(['project', 'assignee']); + + return response()->json([ + 'success' => true, + 'data' => new TaskResource($task), + 'message' => 'ایتم اقدام به وظیفه تبدیل شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در تبدیل ایتم اقدام به وظیفه', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/NotificationController.php b/backend/app/Http/Controllers/Api/NotificationController.php new file mode 100644 index 0000000..fbb25a4 --- /dev/null +++ b/backend/app/Http/Controllers/Api/NotificationController.php @@ -0,0 +1,110 @@ +user()->notifications(); + + $perPage = $request->input('per_page', 15); + $notifications = $query->orderBy('created_at', 'desc')->paginate($perPage); + + return response()->json([ + 'success' => true, + 'data' => NotificationResource::collection($notifications), + 'meta' => [ + 'current_page' => $notifications->currentPage(), + 'last_page' => $notifications->lastPage(), + 'per_page' => $notifications->perPage(), + 'total' => $notifications->total(), + 'unread_count' => $request->user()->notifications()->whereNull('read_at')->count(), + ], + 'message' => 'لیست اعلان‌ها', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت اعلان‌ها', + ], 500); + } + } + + public function markAsRead(Notification $notification): JsonResponse + { + try { + if ($notification->user_id !== request()->user()->id) { + return response()->json([ + 'success' => false, + 'message' => 'شما اجازه دسترسی به این اعلان را ندارید', + ], 403); + } + + $notification->update(['read_at' => Carbon::now(), 'is_read' => true]); + + return response()->json([ + 'success' => true, + 'data' => new NotificationResource($notification->fresh()), + 'message' => 'اعلان به عنوان خوانده شده علامت خورد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی اعلان', + ], 500); + } + } + + public function markAllAsRead(Request $request): JsonResponse + { + try { + $request->user()->notifications()->whereNull('read_at')->update([ + 'read_at' => Carbon::now(), + 'is_read' => true, + ]); + + return response()->json([ + 'success' => true, + 'message' => 'همه اعلان‌ها به عنوان خوانده شده علامت خوردند', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی اعلان‌ها', + ], 500); + } + } + + public function destroy(Request $request, Notification $notification): JsonResponse + { + try { + if ($notification->user_id !== $request->user()->id) { + return response()->json([ + 'success' => false, + 'message' => 'شما اجازه حذف این اعلان را ندارید', + ], 403); + } + + $notification->delete(); + + return response()->json([ + 'success' => true, + 'message' => 'اعلان حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف اعلان', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/PermissionController.php b/backend/app/Http/Controllers/Api/PermissionController.php new file mode 100644 index 0000000..535844d --- /dev/null +++ b/backend/app/Http/Controllers/Api/PermissionController.php @@ -0,0 +1,51 @@ +groupBy('module'); + + return response()->json([ + 'success' => true, + 'data' => $permissions->map(function ($items, $module) { + return [ + 'module' => $module, + 'permissions' => PermissionResource::collection($items), + ]; + })->values(), + 'message' => 'لیست دسترسی‌ها', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت دسترسی‌ها', + ], 500); + } + } + + public function show(Permission $permission): JsonResponse + { + try { + return response()->json([ + 'success' => true, + 'data' => new PermissionResource($permission), + 'message' => 'اطلاعات دسترسی', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت اطلاعات دسترسی', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/ProjectController.php b/backend/app/Http/Controllers/Api/ProjectController.php new file mode 100644 index 0000000..6bb1ad3 --- /dev/null +++ b/backend/app/Http/Controllers/Api/ProjectController.php @@ -0,0 +1,301 @@ +filled('status')) { + $query->where('status', $request->status); + } + if ($request->filled('priority')) { + $query->where('priority', $request->priority); + } + if ($request->filled('project_manager_id')) { + $query->where('project_manager_id', $request->project_manager_id); + } + if ($request->filled('risk_level')) { + $query->where('risk_level', $request->risk_level); + } + if ($request->filled('search')) { + $search = $request->search; + $query->where('title', 'like', "%{$search}%"); + } + + $perPage = min((int) $request->input('per_page', 15), 100); + $sortBy = in_array($request->input('sort_by'), ['id', 'title', 'status', 'priority', 'created_at', 'updated_at', 'start_date', 'end_date'], true) + ? $request->input('sort_by') + : 'created_at'; + $sortDir = $request->input('sort_dir') === 'asc' ? 'asc' : 'desc'; + $projects = $query->orderBy($sortBy, $sortDir)->paginate($perPage); + + return response()->json([ + 'success' => true, + 'data' => ProjectResource::collection($projects), + 'meta' => [ + 'current_page' => $projects->currentPage(), + 'last_page' => $projects->lastPage(), + 'per_page' => $projects->perPage(), + 'total' => $projects->total(), + ], + 'message' => 'لیست پروژه‌ها', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت لیست پروژه‌ها', + ], 500); + } + } + + public function show(Project $project): JsonResponse + { + try { + $project->load(['projectManager', 'creator', 'department', 'members', 'tasks', 'sprints', 'meetings']); + + return response()->json([ + 'success' => true, + 'data' => new ProjectResource($project), + 'message' => 'اطلاعات پروژه', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت اطلاعات پروژه', + ], 500); + } + } + + public function store(StoreProjectRequest $request): JsonResponse + { + try { + $data = $request->validated(); + $data['created_by'] = $request->user()->id; + $project = Project::create($data); + $project->load(['projectManager', 'creator', 'department']); + + $this->activityLogService->log( + $request->user()->id, + 'create_project', + "پروژه {$project->title} ایجاد شد", + 'project', + $project->id, + $project->id, + null, + ['project_title' => $project->title] + ); + + return response()->json([ + 'success' => true, + 'data' => new ProjectResource($project), + 'message' => 'پروژه با موفقیت ایجاد شد', + ], 201); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در ایجاد پروژه', + ], 500); + } + } + + public function update(UpdateProjectRequest $request, Project $project): JsonResponse + { + try { + $project->update($request->validated()); + $project->load(['projectManager', 'creator', 'department']); + + $this->activityLogService->log( + $request->user()->id, + 'update_project', + "پروژه {$project->title} به‌روزرسانی شد", + 'project', + $project->id, + $project->id, + null, + ['project_title' => $project->title] + ); + + return response()->json([ + 'success' => true, + 'data' => new ProjectResource($project->fresh()), + 'message' => 'پروژه با موفقیت به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی پروژه', + ], 500); + } + } + + public function destroy(Request $request, Project $project): JsonResponse + { + try { + $projectTitle = $project->title; + $project->delete(); + + $this->activityLogService->log( + $request->user()->id, + 'delete_project', + "پروژه {$projectTitle} حذف شد", + 'project', + $project->id, + $project->id, + null, + ['project_title' => $projectTitle] + ); + + return response()->json([ + 'success' => true, + 'message' => 'پروژه با موفقیت حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف پروژه', + ], 500); + } + } + + public function archive(Request $request, Project $project): JsonResponse + { + try { + $project->update(['is_archived' => true]); + + return response()->json([ + 'success' => true, + 'data' => new ProjectResource($project->fresh()), + 'message' => 'پروژه بایگانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در بایگانی پروژه', + ], 500); + } + } + + public function restore(Request $request, Project $project): JsonResponse + { + try { + $project->update(['is_archived' => false]); + + return response()->json([ + 'success' => true, + 'data' => new ProjectResource($project->fresh()), + 'message' => 'پروژه از بایگانی خارج شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در بازیابی پروژه', + ], 500); + } + } + + public function addMember(Request $request, Project $project): JsonResponse + { + try { + $request->validate([ + 'user_id' => 'required|exists:users,id', + 'role_in_project' => 'nullable|string', + ]); + + $project->members()->syncWithoutDetaching([ + $request->user_id => [ + 'role_in_project' => $request->role_in_project ?? 'member', + ], + ]); + + $this->activityLogService->log( + $request->user()->id, + 'add_member', + "عضو جدید به پروژه {$project->title} اضافه شد", + 'project', + $project->id, + $project->id, + null, + ['user_id' => $request->user_id] + ); + + return response()->json([ + 'success' => true, + 'data' => new ProjectResource($project->fresh()->load(['projectManager', 'creator', 'department', 'members'])), + 'message' => 'عضو با موفقیت اضافه شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در اضافه کردن عضو', + ], 500); + } + } + + public function removeMember(Request $request, Project $project, User $user): JsonResponse + { + try { + $project->members()->detach($user->id); + + $this->activityLogService->log( + $request->user()->id, + 'remove_member', + "عضو از پروژه {$project->title} حذف شد", + 'project', + $project->id, + $project->id, + null, + ['user_id' => $user->id] + ); + + return response()->json([ + 'success' => true, + 'message' => 'عضو با موفقیت حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف عضو', + ], 500); + } + } + + public function updateProgress(Request $request, Project $project): JsonResponse + { + try { + $progress = $this->projectProgressService->calculateProgress($project->id); + + return response()->json([ + 'success' => true, + 'data' => ['progress' => $progress], + 'message' => 'پیشرفت پروژه به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی پیشرفت', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/PwaController.php b/backend/app/Http/Controllers/Api/PwaController.php new file mode 100644 index 0000000..0c09d48 --- /dev/null +++ b/backend/app/Http/Controllers/Api/PwaController.php @@ -0,0 +1,988 @@ +user()->loadMissing(['roles.permissions', 'dept', 'departments']); + $permissions = $user->roles + ->flatMap(fn($role) => $role->permissions->pluck('name')) + ->unique() + ->values(); + + return response()->json([ + 'success' => true, + 'data' => [ + 'user' => [ + 'id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + 'phone' => $user->phone, + 'job_title' => $user->job_title, + 'department' => $user->dept?->name ?: $user->department, + 'status' => $user->status ?: 'active', + 'avatar' => $user->avatar, + 'avatar_url' => $user->avatar ? asset('storage/' . $user->avatar) : null, + 'roles' => $user->roles->map(fn($role) => [ + 'id' => $role->id, + 'name' => $role->name, + 'display_name' => $role->display_name, + ])->values(), + 'primary_role' => $user->roles->first()?->display_name ?: $user->roles->first()?->name, + 'departments' => $user->departments->map(fn($department) => [ + 'id' => $department->id, + 'name' => $department->name, + 'role_in_team' => $department->pivot?->role_in_team, + 'is_primary' => (bool) $department->pivot?->is_primary, + ])->values(), + ], + 'access_summary' => $this->profileAccessSummary($permissions, $user), + 'capabilities' => [ + 'can_change_password' => true, + 'can_update_profile' => true, + 'can_update_avatar' => true, + 'push_backend_ready' => false, + ], + ], + 'message' => 'پروفایل موبایل', + ]); + } + + public function projects(Request $request): JsonResponse + { + $user = $request->user()->loadMissing(['roles.permissions']); + $query = $this->visibleProjectsQuery($user) + ->with(['projectManager:id,name,job_title,avatar', 'members:id,name,job_title,avatar']) + ->withCount([ + 'tasks', + 'tasks as done_tasks_count' => fn($taskQuery) => $taskQuery->where('status', 'done'), + 'tasks as overdue_tasks_count' => fn($taskQuery) => $taskQuery + ->whereDate('due_date', '<', now()->toDateString()) + ->whereNotIn('status', ['done', 'canceled', 'cancelled']), + ]); + + $filter = $request->input('filter', 'all'); + match ($filter) { + 'active' => $query->where('status', 'active'), + 'waiting' => $query->whereIn('status', ['waiting', 'pending']), + 'completed' => $query->whereIn('status', ['completed', 'done']), + 'delayed' => $query->whereHas('tasks', fn($taskQuery) => $taskQuery + ->whereDate('due_date', '<', now()->toDateString()) + ->whereNotIn('status', ['done', 'canceled', 'cancelled'])), + 'mine' => $query->where(function ($scopeQuery) use ($user) { + $scopeQuery->where('project_manager_id', $user->id) + ->orWhereHas('members', fn($memberQuery) => $memberQuery->where('users.id', $user->id)); + }), + default => null, + }; + + if ($request->filled('search')) { + $search = trim($request->input('search')); + $query->where('title', 'like', "%{$search}%"); + } + + $projects = $query + ->where(function ($scopeQuery) { + $scopeQuery->where('is_archived', false)->orWhereNull('is_archived'); + }) + ->orderByRaw('case when end_date is null then 1 else 0 end') + ->orderBy('end_date') + ->latest() + ->paginate(min((int) $request->input('per_page', 20), 50)); + + return response()->json([ + 'success' => true, + 'data' => collect($projects->items())->map(fn(Project $project) => $this->projectCard($project))->values(), + 'meta' => [ + 'current_page' => $projects->currentPage(), + 'last_page' => $projects->lastPage(), + 'per_page' => $projects->perPage(), + 'total' => $projects->total(), + ], + 'message' => 'پروژه‌های موبایل', + ]); + } + + public function projectDetail(Request $request, Project $project): JsonResponse + { + $this->abortUnlessProjectVisible($request, $project); + $today = now()->toDateString(); + + $project->load([ + 'projectManager:id,name,job_title,avatar', + 'members:id,name,job_title,avatar', + 'tasks' => fn($taskQuery) => $taskQuery + ->with(['assignee:id,name,job_title']) + ->orderByRaw("case priority when 'urgent' then 0 when 'high' then 1 when 'medium' then 2 else 3 end") + ->orderByRaw('case when due_date is null then 1 else 0 end') + ->orderBy('due_date') + ->limit(8), + ])->loadCount([ + 'tasks', + 'tasks as done_tasks_count' => fn($taskQuery) => $taskQuery->where('status', 'done'), + 'tasks as overdue_tasks_count' => fn($taskQuery) => $taskQuery + ->whereDate('due_date', '<', $today) + ->whereNotIn('status', ['done', 'canceled', 'cancelled']), + 'tasks as today_tasks_count' => fn($taskQuery) => $taskQuery->whereDate('due_date', $today), + 'members', + ]); + + $activities = ActivityLog::query() + ->where('project_id', $project->id) + ->latest() + ->limit(6) + ->get(['id', 'action', 'description', 'created_at']) + ->map(fn(ActivityLog $activity) => [ + 'id' => $activity->id, + 'action' => $activity->action, + 'description' => $activity->description, + 'created_at' => $activity->created_at, + ]); + + return response()->json([ + 'success' => true, + 'data' => array_merge($this->projectCard($project), [ + 'description' => $project->description, + 'members_count' => $project->members_count, + 'today_tasks_count' => $project->today_tasks_count, + 'tasks' => $project->tasks->map(fn(Task $task) => $this->taskCard($task))->values(), + 'members' => $project->members->map(fn(User $member) => [ + 'id' => $member->id, + 'name' => $member->name, + 'job_title' => $member->job_title, + 'avatar_url' => $member->avatar ? asset('storage/' . $member->avatar) : null, + 'role_in_project' => $member->pivot?->role_in_project, + ])->values(), + 'activities' => $activities, + ]), + 'message' => 'جزئیات پروژه', + ]); + } + + public function updateProjectStatus(Request $request, Project $project): JsonResponse + { + $this->abortUnlessProjectVisible($request, $project); + + $data = $request->validate([ + 'status' => ['required', Rule::in(['active', 'waiting', 'pending', 'paused', 'completed', 'done'])], + ], [ + 'status.required' => 'انتخاب وضعیت پروژه الزامی است.', + 'status.in' => 'وضعیت انتخاب‌شده معتبر نیست.', + ]); + + $status = $data['status'] === 'done' ? 'completed' : $data['status']; + $status = $status === 'pending' ? 'waiting' : $status; + $project->update(['status' => $status]); + + $project->load(['projectManager:id,name,job_title,avatar', 'members:id,name,job_title,avatar']) + ->loadCount([ + 'tasks', + 'tasks as done_tasks_count' => fn($taskQuery) => $taskQuery->where('status', 'done'), + 'tasks as overdue_tasks_count' => fn($taskQuery) => $taskQuery + ->whereDate('due_date', '<', now()->toDateString()) + ->whereNotIn('status', ['done', 'canceled', 'cancelled']), + ]); + + return response()->json([ + 'success' => true, + 'data' => $this->projectCard($project), + 'message' => 'وضعیت پروژه تغییر کرد.', + ]); + } + + public function notifications(Request $request): JsonResponse + { + $query = $request->user()->notifications() + ->whereNull('dismissed_at') + ->where(function ($innerQuery) { + $innerQuery->whereNull('remind_at')->orWhere('remind_at', '<=', now()); + }); + $filter = $request->input('filter', 'all'); + + match ($filter) { + 'unread' => $query->where(function ($innerQuery) { + $innerQuery->whereNull('read_at')->orWhere('is_read', false); + }), + 'tasks' => $query->whereIn('type', ['task_assigned', 'task_new', 'task_created', 'task_status_changed', 'task_overdue']), + 'comments' => $query->whereIn('type', ['comment_created', 'comment_new']), + 'mentions' => $query->where('type', 'mention'), + 'deadlines' => $query->whereIn('type', ['deadline_soon', 'task_overdue']), + 'system' => $query->where('type', 'system'), + default => null, + }; + + $notifications = $query + ->latest() + ->paginate(min((int) $request->input('per_page', 20), 50)); + + return response()->json([ + 'success' => true, + 'data' => collect($notifications->items())->map(fn(Notification $notification) => $this->notificationPayload($notification))->values(), + 'meta' => [ + 'current_page' => $notifications->currentPage(), + 'last_page' => $notifications->lastPage(), + 'per_page' => $notifications->perPage(), + 'total' => $notifications->total(), + 'unread_count' => $this->unreadNotificationsCount($request), + ], + 'message' => 'اعلان‌های موبایل', + ]); + } + + public function notificationRead(Request $request, Notification $notification): JsonResponse + { + abort_unless((int) $notification->user_id === (int) $request->user()->id, 403, 'شما به این اعلان دسترسی ندارید.'); + + $notification->update([ + 'read_at' => now(), + 'is_read' => true, + ]); + + return response()->json([ + 'success' => true, + 'data' => $this->notificationPayload($notification->fresh()), + 'meta' => ['unread_count' => $this->unreadNotificationsCount($request)], + 'message' => 'اعلان خوانده شد.', + ]); + } + + public function notificationUnread(Request $request, Notification $notification): JsonResponse + { + abort_unless((int) $notification->user_id === (int) $request->user()->id, 403, 'شما به این اعلان دسترسی ندارید.'); + + $notification->update([ + 'read_at' => null, + 'is_read' => false, + ]); + + return response()->json([ + 'success' => true, + 'data' => $this->notificationPayload($notification->fresh()), + 'meta' => ['unread_count' => $this->unreadNotificationsCount($request)], + 'message' => 'اعلان به حالت خوانده‌نشده برگشت.', + ]); + } + + public function notificationRemind(Request $request, Notification $notification): JsonResponse + { + abort_unless((int) $notification->user_id === (int) $request->user()->id, 403, 'شما به این اعلان دسترسی ندارید.'); + + $notification->update([ + 'remind_at' => now()->addMinutes(30), + 'dismissed_at' => null, + 'read_at' => null, + 'is_read' => false, + ]); + + return response()->json([ + 'success' => true, + 'data' => $this->notificationPayload($notification->fresh()), + 'meta' => ['unread_count' => $this->unreadNotificationsCount($request)], + 'message' => '۳۰ دقیقه دیگر یادآوری می‌شود.', + ]); + } + + public function notificationDismiss(Request $request, Notification $notification): JsonResponse + { + abort_unless((int) $notification->user_id === (int) $request->user()->id, 403, 'شما به این اعلان دسترسی ندارید.'); + + $notification->update([ + 'dismissed_at' => now(), + ]); + + return response()->json([ + 'success' => true, + 'meta' => ['unread_count' => $this->unreadNotificationsCount($request)], + 'message' => 'اعلان از لیست خارج شد.', + ]); + } + + public function notificationsReadAll(Request $request): JsonResponse + { + $request->user()->notifications() + ->where(function ($query) { + $query->whereNull('read_at')->orWhere('is_read', false); + }) + ->update([ + 'read_at' => now(), + 'is_read' => true, + ]); + + return response()->json([ + 'success' => true, + 'meta' => ['unread_count' => 0], + 'message' => 'همه اعلان‌ها خوانده شدند.', + ]); + } + + public function tasks(Request $request): JsonResponse + { + $user = $request->user()->loadMissing(['roles.permissions']); + $query = $this->visibleTasksQuery($user) + ->with(['project:id,title,status', 'assignee:id,name,job_title']) + ->withCount(['comments', 'files']); + + $filter = $request->input('filter', 'all'); + $today = now()->toDateString(); + + match ($filter) { + 'today' => $query->whereDate('due_date', $today), + 'overdue' => $query->whereDate('due_date', '<', $today)->whereNotIn('status', ['done', 'canceled', 'cancelled']), + 'active' => $query->whereIn('status', ['waiting', 'todo', 'in_progress', 'review']), + 'done' => $query->where('status', 'done'), + 'urgent' => $query->where('priority', 'urgent'), + default => null, + }; + + if ($request->filled('search')) { + $search = trim($request->input('search')); + $query->where(function ($innerQuery) use ($search) { + $innerQuery->where('title', 'like', "%{$search}%") + ->orWhereHas('project', fn($projectQuery) => $projectQuery->where('title', 'like', "%{$search}%")); + }); + } + + if ($request->filled('project_id')) { + $query->where('project_id', $request->input('project_id')); + } + + $tasks = $query + ->orderByRaw("case priority when 'urgent' then 0 when 'high' then 1 when 'medium' then 2 else 3 end") + ->orderByRaw('case when due_date is null then 1 else 0 end') + ->orderBy('due_date') + ->latest() + ->paginate(min((int) $request->input('per_page', 20), 50)); + + return response()->json([ + 'success' => true, + 'data' => collect($tasks->items())->map(fn(Task $task) => $this->taskCard($task))->values(), + 'meta' => [ + 'current_page' => $tasks->currentPage(), + 'last_page' => $tasks->lastPage(), + 'per_page' => $tasks->perPage(), + 'total' => $tasks->total(), + ], + 'message' => 'تسک‌های موبایل', + ]); + } + + public function taskDetail(Request $request, Task $task): JsonResponse + { + $this->abortUnlessTaskVisible($request, $task); + $task->load([ + 'project:id,title,status', + 'assignee:id,name,job_title', + 'reporter:id,name,job_title', + 'comments.user:id,name,job_title', + 'files.user:id,name,job_title', + ])->loadCount(['comments', 'files']); + + return response()->json([ + 'success' => true, + 'data' => $this->taskDetailPayload($task), + 'message' => 'جزئیات تسک', + ]); + } + + public function updateTaskStatus(Request $request, Task $task): JsonResponse + { + $this->abortUnlessTaskVisible($request, $task); + + $data = $request->validate([ + 'status' => ['required', Rule::in(['waiting', 'todo', 'in_progress', 'done'])], + ], [ + 'status.required' => 'انتخاب وضعیت الزامی است.', + 'status.in' => 'وضعیت انتخاب‌شده معتبر نیست.', + ]); + + $task->update(['status' => $data['status']]); + $this->projectProgressService->calculateProgress($task->project_id); + $task->load(['project:id,title,status', 'assignee:id,name,job_title'])->loadCount(['comments', 'files']); + + return response()->json([ + 'success' => true, + 'data' => $this->taskCard($task->fresh(['project', 'assignee'])->loadCount(['comments', 'files'])), + 'message' => 'وضعیت تسک تغییر کرد.', + ]); + } + + public function addTaskComment(Request $request, Task $task): JsonResponse + { + $this->abortUnlessTaskVisible($request, $task); + + $data = $request->validate([ + 'body' => 'required|string|max:3000', + ], [ + 'body.required' => 'متن کامنت الزامی است.', + 'body.max' => 'متن کامنت بیش از حد طولانی است.', + ]); + + $comment = Comment::create([ + 'body' => $data['body'], + 'user_id' => $request->user()->id, + 'commentable_id' => $task->id, + 'commentable_type' => Task::class, + ])->load('user'); + + return response()->json([ + 'success' => true, + 'data' => new CommentResource($comment), + 'message' => 'کامنت ثبت شد.', + ], 201); + } + + public function addTaskAttachment(Request $request, Task $task): JsonResponse + { + $this->abortUnlessTaskVisible($request, $task); + + $request->validate([ + 'file' => 'required|file|max:10240|mimes:pdf,doc,docx,xls,xlsx,ppt,pptx,txt,csv,jpg,jpeg,png,webp,zip', + ], [ + 'file.required' => 'انتخاب فایل الزامی است.', + 'file.max' => 'حجم فایل نباید بیشتر از ۱۰ مگابایت باشد.', + 'file.mimes' => 'نوع فایل انتخاب‌شده مجاز نیست.', + ]); + + $uploadedFile = $request->file('file'); + $extension = strtolower($uploadedFile->getClientOriginalExtension()); + $name = Str::uuid()->toString() . ($extension ? ".{$extension}" : ''); + $path = $uploadedFile->storeAs('files', $name, 'local'); + + $file = File::create([ + 'name' => $name, + 'original_name' => $uploadedFile->getClientOriginalName(), + 'path' => $path, + 'mime_type' => $uploadedFile->getMimeType(), + 'size' => $uploadedFile->getSize(), + 'fileable_id' => $task->id, + 'fileable_type' => Task::class, + 'user_id' => $request->user()->id, + ])->load('user'); + + return response()->json([ + 'success' => true, + 'data' => new FileResource($file), + 'message' => 'فایل با موفقیت آپلود شد.', + ], 201); + } + + public function downloadTaskAttachment(Request $request, Task $task, File $file) + { + $this->abortUnlessTaskVisible($request, $task); + + if ($file->fileable_type !== Task::class || (int) $file->fileable_id !== (int) $task->id) { + abort(404); + } + + $disk = Storage::disk('local')->exists($file->path) ? 'local' : 'public'; + abort_unless(Storage::disk($disk)->exists($file->path), 404); + + return response()->download(Storage::disk($disk)->path($file->path), $file->original_name); + } + + public function taskOptions(Request $request): JsonResponse + { + $user = $request->user()->loadMissing(['roles.permissions']); + + if (!$user->hasPermission('tasks.create')) { + return response()->json([ + 'success' => false, + 'message' => 'شما مجوز ایجاد تسک را ندارید.', + ], 403); + } + + $projectQuery = Project::query() + ->with(['members:id,name,job_title,avatar', 'projectManager:id,name,job_title,avatar']) + ->when(!$user->hasPermission('reports.view'), function ($query) use ($user) { + $query->where(function ($scopeQuery) use ($user) { + $scopeQuery->where('project_manager_id', $user->id) + ->orWhere('created_by', $user->id) + ->orWhereHas('members', fn($memberQuery) => $memberQuery->where('users.id', $user->id)); + }); + }) + ->where(function ($query) { + $query->where('is_archived', false)->orWhereNull('is_archived'); + }) + ->orderBy('title'); + + $projects = $projectQuery->limit(100)->get(); + $projectUserIds = $projects + ->flatMap(fn(Project $project) => $project->members->pluck('id')->push($project->project_manager_id)) + ->filter() + ->unique() + ->values(); + + $users = User::query() + ->when(!$user->hasPermission('reports.view'), function ($query) use ($user, $projectUserIds) { + $query->where('id', $user->id) + ->when($projectUserIds->isNotEmpty(), fn($innerQuery) => $innerQuery->orWhereIn('id', $projectUserIds)); + }) + ->where(function ($query) { + $query->where('status', 'active')->orWhereNull('status'); + }) + ->orderBy('name') + ->limit(200) + ->get(['id', 'name', 'job_title', 'avatar']); + + return response()->json([ + 'success' => true, + 'data' => [ + 'projects' => $projects->map(fn(Project $project) => [ + 'id' => $project->id, + 'title' => $project->title, + 'members' => $project->members + ->push($project->projectManager) + ->filter() + ->unique('id') + ->values() + ->map(fn(User $member) => [ + 'id' => $member->id, + 'name' => $member->name, + 'job_title' => $member->job_title, + ]), + ])->values(), + 'users' => $users->map(fn(User $optionUser) => [ + 'id' => $optionUser->id, + 'name' => $optionUser->name, + 'job_title' => $optionUser->job_title, + ])->values(), + 'priorities' => [ + ['value' => 'low', 'label' => 'کم'], + ['value' => 'medium', 'label' => 'متوسط'], + ['value' => 'high', 'label' => 'زیاد'], + ['value' => 'urgent', 'label' => 'فوری'], + ], + ], + 'message' => 'گزینه‌های ایجاد تسک', + ]); + } + + public function sprints(Request $request): JsonResponse + { + $user = $request->user()->loadMissing(['roles.permissions']); + + $query = Sprint::query()->with('project:id,title,status'); + + if (!$user->hasPermission('reports.view')) { + $visibleProjectIds = $this->visibleProjectsQuery($user)->pluck('id'); + + $query->where(function ($scopeQuery) use ($user, $visibleProjectIds) { + $scopeQuery + ->when($visibleProjectIds->isNotEmpty(), fn($innerQuery) => $innerQuery->whereIn('project_id', $visibleProjectIds)) + ->orWhereHas('members', fn($memberQuery) => $memberQuery->where('users.id', $user->id)) + ->orWhereHas('tasks', function ($taskQuery) use ($user) { + $taskQuery + ->where('assignee_id', $user->id) + ->orWhere('reporter_id', $user->id) + ->orWhere('created_by', $user->id); + }); + }); + } + + $sprints = $query + ->orderByRaw("case when status = 'active' then 0 when status in ('planning','planned') then 1 else 2 end") + ->orderByRaw('case when end_date is null then 1 else 0 end') + ->orderByDesc('end_date') + ->orderByDesc('start_date') + ->limit(8) + ->get(); + + return response()->json([ + 'success' => true, + 'data' => $sprints->map(fn(Sprint $sprint) => $this->pwaSprintPayload($sprint, $user))->values(), + 'message' => 'اسپرینت‌های موبایل', + ]); + } + + public function home(Request $request): JsonResponse + { + $user = $request->user()->loadMissing(['roles.permissions']); + $today = now()->toDateString(); + $openStatuses = ['waiting', 'todo', 'in_progress', 'review']; + + $myTasks = Task::query() + ->with(['project:id,title,status']) + ->where('assignee_id', $user->id); + + $todayTasks = (clone $myTasks) + ->whereDate('due_date', $today) + ->whereIn('status', $openStatuses); + + $overdueTasks = (clone $myTasks) + ->whereDate('due_date', '<', $today) + ->whereNotIn('status', ['done', 'canceled', 'cancelled']); + + $activeTasks = (clone $myTasks) + ->whereIn('status', ['todo', 'in_progress', 'review', 'waiting']); + + $importantTasks = (clone $myTasks) + ->whereIn('status', $openStatuses) + ->orderByRaw("case priority when 'urgent' then 0 when 'high' then 1 when 'medium' then 2 else 3 end") + ->orderByRaw('case when due_date is null then 1 else 0 end') + ->orderBy('due_date') + ->limit(5) + ->get() + ->map(fn(Task $task) => $this->taskPreview($task)) + ->values(); + + $notifications = Notification::query() + ->where('user_id', $user->id) + ->latest() + ->limit(5) + ->get() + ->map(fn(Notification $notification) => [ + 'id' => $notification->id, + 'type' => $notification->type, + 'title' => $notification->title, + 'body' => $notification->body, + 'data' => $notification->data, + 'notifiable_type' => $notification->notifiable_type, + 'notifiable_id' => $notification->notifiable_id, + 'is_read' => (bool) $notification->is_read, + 'created_at' => $notification->created_at, + ]) + ->values(); + + $permissions = $user->roles + ->flatMap(fn($role) => $role->permissions->pluck('name')) + ->unique() + ->values(); + + $canViewTeamScope = $user->hasAnyPermission(['reports.view', 'team.view', 'tasks.edit']); + $managerSummary = null; + + if ($canViewTeamScope) { + $manageableProjectIds = $this->manageableProjectIds($user); + + $teamTaskQuery = Task::query() + ->when($manageableProjectIds->isNotEmpty(), fn($query) => $query->whereIn('project_id', $manageableProjectIds)) + ->when($manageableProjectIds->isEmpty() && !$user->hasPermission('reports.view'), fn($query) => $query->whereRaw('1 = 0')); + + $managerSummary = [ + 'overdue_team_tasks' => (clone $teamTaskQuery) + ->whereDate('due_date', '<', $today) + ->whereNotIn('status', ['done', 'canceled', 'cancelled']) + ->count(), + 'review_tasks' => (clone $teamTaskQuery)->where('status', 'review')->count(), + 'active_sprint' => Sprint::query() + ->with('project:id,title') + ->where('status', 'active') + ->when($manageableProjectIds->isNotEmpty(), fn($query) => $query->whereIn('project_id', $manageableProjectIds)) + ->latest() + ->first()?->only(['id', 'title', 'project_id', 'start_date', 'end_date']), + 'delayed_members' => (clone $teamTaskQuery) + ->whereDate('due_date', '<', $today) + ->whereNotIn('status', ['done', 'canceled', 'cancelled']) + ->whereNotNull('assignee_id') + ->distinct('assignee_id') + ->count('assignee_id'), + ]; + } + + return response()->json([ + 'success' => true, + 'data' => [ + 'user' => [ + 'id' => $user->id, + 'name' => $user->name, + 'job_title' => $user->job_title, + 'role_label' => $user->roles->first()?->display_name, + ], + 'permissions' => $permissions, + 'stats' => [ + 'today_tasks' => $todayTasks->count(), + 'overdue_tasks' => $overdueTasks->count(), + 'active_tasks' => $activeTasks->count(), + 'unread_notifications' => Notification::where('user_id', $user->id)->where('is_read', false)->count(), + ], + 'tasks' => $importantTasks, + 'notifications' => $notifications, + 'manager_summary' => $managerSummary, + ], + 'message' => 'خانه موبایل', + ]); + } + + private function taskPreview(Task $task): array + { + return [ + 'id' => $task->id, + 'title' => $task->title, + 'status' => $task->status, + 'priority' => $task->priority, + 'due_date' => $task->due_date?->format('Y-m-d'), + 'project' => $task->project ? [ + 'id' => $task->project->id, + 'title' => $task->project->title, + ] : null, + ]; + } + + private function profileAccessSummary($permissions, User $user): array + { + $items = [ + ['permissions' => ['projects.view'], 'label' => 'مشاهده پروژه‌ها'], + ['permissions' => ['projects.edit', 'projects.create'], 'label' => 'مدیریت پروژه‌ها'], + ['permissions' => ['tasks.view'], 'label' => 'مشاهده تسک‌ها'], + ['permissions' => ['tasks.create'], 'label' => 'ایجاد تسک'], + ['permissions' => ['tasks.edit'], 'label' => 'تغییر وضعیت تسک'], + ['permissions' => ['comments.create'], 'label' => 'ثبت کامنت'], + ['permissions' => ['files.upload'], 'label' => 'آپلود فایل'], + ['permissions' => ['notifications.view'], 'label' => 'مشاهده اعلان‌ها'], + ['permissions' => ['reports.view'], 'label' => 'مشاهده گزارش‌ها'], + ]; + + $permissionSet = $permissions->flip(); + $summary = collect($items) + ->filter(fn($item) => collect($item['permissions'])->contains(fn($permission) => $permissionSet->has($permission))) + ->map(fn($item) => ['label' => $item['label']]) + ->values(); + + $isAdmin = $user->roles->contains(fn($role) => in_array($role->name, ['admin', 'super_admin', 'system_admin'], true)) + || $permissionSet->has('roles.edit') + || $permissionSet->has('settings.edit'); + + return [ + 'is_admin' => $isAdmin, + 'items' => $summary, + ]; + } + + private function manageableProjectIds($user) + { + if ($user->hasPermission('reports.view')) { + return collect(); + } + + return $user->managedProjects()->pluck('id') + ->merge($user->projects()->pluck('projects.id')) + ->unique() + ->values(); + } + + private function visibleTasksQuery(User $user) + { + if ($user->hasPermission('reports.view')) { + return Task::query(); + } + + $manageableProjectIds = $this->manageableProjectIds($user); + + return Task::query()->where(function ($query) use ($user, $manageableProjectIds) { + $query->where('assignee_id', $user->id) + ->orWhere('reporter_id', $user->id) + ->orWhere('created_by', $user->id) + ->when($manageableProjectIds->isNotEmpty(), fn($innerQuery) => $innerQuery->orWhereIn('project_id', $manageableProjectIds)); + }); + } + + private function abortUnlessTaskVisible(Request $request, Task $task): void + { + $user = $request->user()->loadMissing(['roles.permissions']); + $allowed = $this->visibleTasksQuery($user)->where('id', $task->id)->exists(); + abort_unless($allowed, 403, 'شما به این تسک دسترسی ندارید.'); + } + + private function visibleProjectsQuery(User $user) + { + if ($user->hasPermission('reports.view')) { + return Project::query(); + } + + return Project::query()->where(function ($query) use ($user) { + $query->where('project_manager_id', $user->id) + ->orWhere('created_by', $user->id) + ->orWhereHas('members', fn($memberQuery) => $memberQuery->where('users.id', $user->id)); + }); + } + + private function abortUnlessProjectVisible(Request $request, Project $project): void + { + $user = $request->user()->loadMissing(['roles.permissions']); + $allowed = $this->visibleProjectsQuery($user)->where('id', $project->id)->exists(); + abort_unless($allowed, 403, 'شما به این پروژه دسترسی ندارید.'); + } + + private function projectCard(Project $project): array + { + return [ + 'id' => $project->id, + 'title' => $project->title, + 'description' => $project->description, + 'status' => $project->status, + 'progress' => (int) ($project->progress ?? 0), + 'due_date' => $project->end_date?->format('Y-m-d'), + 'manager' => $project->projectManager ? [ + 'id' => $project->projectManager->id, + 'name' => $project->projectManager->name, + ] : null, + 'task_counts' => [ + 'total' => $project->tasks_count ?? 0, + 'done' => $project->done_tasks_count ?? 0, + 'overdue' => $project->overdue_tasks_count ?? 0, + ], + 'members_preview' => $project->relationLoaded('members') + ? $project->members->take(4)->map(fn(User $member) => [ + 'id' => $member->id, + 'name' => $member->name, + 'avatar_url' => $member->avatar ? asset('storage/' . $member->avatar) : null, + ])->values() + : [], + ]; + } + + private function notificationPayload(Notification $notification): array + { + $data = $notification->data ?? []; + + return [ + 'id' => $notification->id, + 'type' => $notification->type, + 'title' => $notification->title, + 'body' => $notification->body, + 'message' => $notification->body, + 'data' => [ + 'task_id' => $data['task_id'] ?? null, + 'project_id' => $data['project_id'] ?? null, + 'comment_id' => $data['comment_id'] ?? null, + 'target_type' => $data['target_type'] ?? $data['targetType'] ?? null, + 'target_id' => $data['target_id'] ?? $data['targetId'] ?? null, + ], + 'notifiable_type' => $notification->notifiable_type, + 'notifiable_id' => $notification->notifiable_id, + 'is_read' => (bool) $notification->is_read || $notification->read_at !== null, + 'read_at' => $notification->read_at, + 'remind_at' => $notification->remind_at, + 'dismissed_at' => $notification->dismissed_at, + 'created_at' => $notification->created_at, + ]; + } + + private function unreadNotificationsCount(Request $request): int + { + return $request->user()->notifications() + ->whereNull('dismissed_at') + ->where(function ($outerQuery) { + $outerQuery->whereNull('remind_at')->orWhere('remind_at', '<=', now()); + }) + ->where(function ($query) { + $query->whereNull('read_at')->orWhere('is_read', false); + }) + ->count(); + } + + private function taskCard(Task $task): array + { + $latestComment = $task->relationLoaded('comments') + ? $task->comments->sortByDesc('created_at')->first() + : $task->comments()->latest()->first(); + + return [ + 'id' => $task->id, + 'title' => $task->title, + 'status' => $task->status, + 'priority' => $task->priority, + 'due_date' => $task->due_date?->format('Y-m-d'), + 'created_at' => $task->created_at, + 'project' => $task->project ? [ + 'id' => $task->project->id, + 'title' => $task->project->title, + ] : null, + 'assignee' => $task->assignee ? [ + 'id' => $task->assignee->id, + 'name' => $task->assignee->name, + ] : null, + 'comments_count' => $task->comments_count, + 'files_count' => $task->files_count, + 'latest_comment' => $latestComment ? [ + 'id' => $latestComment->id, + 'body' => Str::limit($latestComment->body, 90), + 'created_at' => $latestComment->created_at, + ] : null, + ]; + } + + private function pwaSprintPayload(Sprint $sprint, User $user): array + { + $today = now()->toDateString(); + $tasks = $this->visibleTasksQuery($user) + ->whereHas('sprints', fn($sprintQuery) => $sprintQuery->where('sprints.id', $sprint->id)) + ->with(['project:id,title,status', 'assignee:id,name,job_title']) + ->withCount(['comments', 'files']) + ->orderByRaw("case priority when 'urgent' then 0 when 'high' then 1 when 'medium' then 2 else 3 end") + ->orderByRaw('case when due_date is null then 1 else 0 end') + ->orderBy('due_date') + ->get(); + + $total = $tasks->count(); + $done = $tasks->where('status', 'done')->count(); + $inProgress = $tasks->whereIn('status', ['in_progress', 'review'])->count(); + $overdue = $tasks + ->filter(fn(Task $task) => $task->due_date && $task->due_date->format('Y-m-d') < $today && !in_array($task->status, ['done', 'canceled', 'cancelled'], true)) + ->count(); + $progress = $total > 0 ? (int) round(($done / $total) * 100) : 0; + $remainingDays = $sprint->end_date ? now()->startOfDay()->diffInDays($sprint->end_date->copy()->startOfDay(), false) : null; + + return [ + 'id' => $sprint->id, + 'title' => $sprint->title, + 'status' => $sprint->status, + 'goal' => $sprint->goal, + 'start_date' => $sprint->start_date?->format('Y-m-d'), + 'end_date' => $sprint->end_date?->format('Y-m-d'), + 'remaining_days' => $remainingDays, + 'progress' => $progress, + 'project' => $sprint->project ? [ + 'id' => $sprint->project->id, + 'title' => $sprint->project->title, + ] : null, + 'task_counts' => [ + 'total' => $total, + 'done' => $done, + 'in_progress' => $inProgress, + 'overdue' => $overdue, + ], + 'tasks' => $tasks->map(fn(Task $task) => $this->taskCard($task))->values(), + 'capabilities' => [ + 'can_create_task' => $user->hasPermission('tasks.create'), + 'can_update_task_status' => $user->hasPermission('tasks.edit'), + 'can_comment' => $user->hasPermission('comments.create'), + ], + ]; + } + + private function taskDetailPayload(Task $task): array + { + return array_merge($this->taskCard($task), [ + 'description' => $task->description, + 'reporter' => $task->reporter ? [ + 'id' => $task->reporter->id, + 'name' => $task->reporter->name, + ] : null, + 'comments' => CommentResource::collection($task->comments->sortByDesc('created_at')->values()), + 'files' => FileResource::collection($task->files->sortByDesc('created_at')->values()), + ]); + } +} diff --git a/backend/app/Http/Controllers/Api/ReportController.php b/backend/app/Http/Controllers/Api/ReportController.php new file mode 100644 index 0000000..ff9370c --- /dev/null +++ b/backend/app/Http/Controllers/Api/ReportController.php @@ -0,0 +1,169 @@ +reportService->projectStatus($request->only(['status', 'project_id'])); + + return response()->json([ + 'success' => true, + 'data' => $data, + 'message' => 'گزارش وضعیت پروژه‌ها', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت گزارش', + ], 500); + } + } + + public function delayedTasks(Request $request): JsonResponse + { + try { + $data = $this->reportService->delayedTasks($request->only([ + 'date_from', 'date_to', 'project_id', 'user_id', 'status' + ])); + + return response()->json([ + 'success' => true, + 'data' => $data, + 'message' => 'گزارش وظایف عقب افتاده', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت گزارش', + ], 500); + } + } + + public function teamPerformance(Request $request): JsonResponse + { + try { + $data = $this->reportService->teamPerformance($request->only([ + 'date_from', 'date_to', 'user_id' + ])); + + return response()->json([ + 'success' => true, + 'data' => $data, + 'message' => 'گزارش عملکرد تیم', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت گزارش', + ], 500); + } + } + + public function workload(Request $request): JsonResponse + { + try { + $data = $this->reportService->workload($request->only(['user_id'])); + + return response()->json([ + 'success' => true, + 'data' => $data, + 'message' => 'گزارش بار کاری', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت گزارش', + ], 500); + } + } + + public function sprintProgress(Request $request): JsonResponse + { + try { + $data = $this->reportService->sprintProgress($request->only([ + 'project_id', 'status' + ])); + + return response()->json([ + 'success' => true, + 'data' => $data, + 'message' => 'گزارش پیشرفت اسپرینت', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت گزارش', + ], 500); + } + } + + public function timeEstimate(Request $request): JsonResponse + { + try { + $data = $this->reportService->timeEstimate($request->only([ + 'date_from', 'date_to', 'project_id', 'user_id', 'status' + ])); + + return response()->json([ + 'success' => true, + 'data' => $data, + 'message' => 'گزارش برآورد زمانی', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت گزارش', + ], 500); + } + } + + public function recentActivities(Request $request): JsonResponse + { + try { + $data = $this->reportService->recentActivities($request->only([ + 'date_from', 'date_to', 'project_id', 'user_id', 'action' + ])); + + return response()->json([ + 'success' => true, + 'data' => $data, + 'message' => 'گزارش فعالیت‌های اخیر', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت گزارش', + ], 500); + } + } + + public function riskyProjects(Request $request): JsonResponse + { + try { + $data = $this->reportService->riskyProjects($request->only([ + 'status', 'project_id' + ])); + + return response()->json([ + 'success' => true, + 'data' => $data, + 'message' => 'گزارش پروژه‌های پرخطر', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت گزارش', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/RoleController.php b/backend/app/Http/Controllers/Api/RoleController.php new file mode 100644 index 0000000..59669f8 --- /dev/null +++ b/backend/app/Http/Controllers/Api/RoleController.php @@ -0,0 +1,179 @@ +withCount('users'); + + $perPage = min((int) $request->input('per_page', 15), 100); + $sortBy = in_array($request->input('sort_by'), ['id', 'name', 'display_name', 'created_at', 'updated_at'], true) + ? $request->input('sort_by') + : 'created_at'; + $sortDir = $request->input('sort_dir') === 'asc' ? 'asc' : 'desc'; + $roles = $query->orderBy($sortBy, $sortDir)->paginate($perPage); + + return response()->json([ + 'success' => true, + 'data' => RoleResource::collection($roles), + 'meta' => [ + 'current_page' => $roles->currentPage(), + 'last_page' => $roles->lastPage(), + 'per_page' => $roles->perPage(), + 'total' => $roles->total(), + ], + 'message' => 'لیست نقش‌ها', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت نقش‌ها', + ], 500); + } + } + + public function show(Role $role): JsonResponse + { + try { + $role->load('permissions'); + + return response()->json([ + 'success' => true, + 'data' => new RoleResource($role), + 'message' => 'اطلاعات نقش', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت اطلاعات نقش', + ], 500); + } + } + + public function store(StoreRoleRequest $request): JsonResponse + { + try { + $data = $request->validated(); + $permissionIds = $data['permissions'] ?? []; + unset($data['permissions']); + + $data['guard_name'] = $data['guard_name'] ?? 'web'; + + $role = Role::create($data); + $role->permissions()->sync($permissionIds); + $role->load('permissions')->loadCount('users'); + + return response()->json([ + 'success' => true, + 'data' => new RoleResource($role), + 'message' => 'نقش با موفقیت ایجاد شد', + ], 201); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در ایجاد نقش', + ], 500); + } + } + + public function update(UpdateRoleRequest $request, Role $role): JsonResponse + { + try { + $data = $request->validated(); + $permissionIds = $data['permissions'] ?? null; + unset($data['permissions']); + + if (array_key_exists('guard_name', $data) && !$data['guard_name']) { + $data['guard_name'] = 'web'; + } + + $role->update($data); + if ($permissionIds !== null) { + $role->permissions()->sync($permissionIds); + } + $role->load('permissions')->loadCount('users'); + + return response()->json([ + 'success' => true, + 'data' => new RoleResource($role), + 'message' => 'نقش به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی نقش', + ], 500); + } + } + + public function destroy(Role $role): JsonResponse + { + try { + $role->delete(); + + return response()->json([ + 'success' => true, + 'message' => 'نقش حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف نقش', + ], 500); + } + } + + public function assignPermissions(Request $request, Role $role): JsonResponse + { + try { + $request->validate([ + 'permissions' => 'present|array', + 'permissions.*' => 'exists:permissions,id', + ]); + + $role->permissions()->sync($request->permissions); + $role->load('permissions')->loadCount('users'); + + return response()->json([ + 'success' => true, + 'data' => new RoleResource($role), + 'message' => 'دسترسی‌های نقش به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی دسترسی‌های نقش', + ], 500); + } + } + + public function getPermissions(Role $role): JsonResponse + { + try { + $role->load('permissions'); + + return response()->json([ + 'success' => true, + 'data' => PermissionResource::collection($role->permissions), + 'message' => 'دسترسی‌های نقش', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت دسترسی‌های نقش', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/SearchController.php b/backend/app/Http/Controllers/Api/SearchController.php new file mode 100644 index 0000000..ea4171d --- /dev/null +++ b/backend/app/Http/Controllers/Api/SearchController.php @@ -0,0 +1,52 @@ +validate(['q' => 'required|string|min:2']); + $keyword = $request->q; + $limit = $request->input('limit', 5); + + $projects = Project::where('title', 'like', "%{$keyword}%")->limit($limit)->get(); + $tasks = Task::where('title', 'like', "%{$keyword}%")->limit($limit)->get(); + $users = User::where('name', 'like', "%{$keyword}%")->orWhere('email', 'like', "%{$keyword}%")->limit($limit)->get(); + $meetings = Meeting::where('title', 'like', "%{$keyword}%")->limit($limit)->get(); + $backlogItems = BacklogItem::where('title', 'like', "%{$keyword}%")->limit($limit)->get(); + + return response()->json([ + 'success' => true, + 'data' => [ + 'projects' => ProjectResource::collection($projects), + 'tasks' => TaskResource::collection($tasks), + 'users' => UserResource::collection($users), + 'meetings' => MeetingResource::collection($meetings), + 'backlog_items' => BacklogItemResource::collection($backlogItems), + ], + 'message' => 'نتایج جستجو', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در جستجو', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/SettingController.php b/backend/app/Http/Controllers/Api/SettingController.php new file mode 100644 index 0000000..9ca47d3 --- /dev/null +++ b/backend/app/Http/Controllers/Api/SettingController.php @@ -0,0 +1,106 @@ +filled('group')) { + $query->where('group', $request->group); + } + + $settings = $query->orderBy('group')->orderBy('key')->get(); + + return response()->json([ + 'success' => true, + 'data' => $settings, + 'message' => 'لیست تنظیمات', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت تنظیمات', + ], 500); + } + } + + public function store(Request $request): JsonResponse + { + try { + $request->validate([ + 'key' => 'required|string|max:255|unique:settings,key', + 'value' => 'present', + 'group' => 'nullable|string|max:255', + 'type' => 'nullable|string|max:50', + ]); + + $setting = Setting::create([ + 'key' => $request->input('key'), + 'value' => $request->input('value'), + 'group' => $request->input('group', 'general'), + 'type' => $request->input('type'), + ]); + + return response()->json([ + 'success' => true, + 'data' => $setting, + 'message' => 'تنظیم با موفقیت ایجاد شد', + ], 201); + } catch (ValidationException $e) { + return response()->json([ + 'success' => false, + 'message' => 'اطلاعات تنظیم معتبر نیست', + 'errors' => $e->errors(), + ], 422); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در ایجاد تنظیم', + ], 500); + } + } + + public function update(Request $request, Setting $setting): JsonResponse + { + try { + $request->validate([ + 'value' => 'present', + 'group' => 'nullable|string|max:255', + 'type' => 'nullable|string|max:50', + ]); + + $setting->update([ + 'value' => $request->input('value'), + 'group' => $request->input('group', $setting->group), + 'type' => $request->input('type', $setting->type), + ]); + + return response()->json([ + 'success' => true, + 'data' => $setting->fresh(), + 'message' => 'تنظیم به‌روزرسانی شد', + ]); + } catch (ValidationException $e) { + return response()->json([ + 'success' => false, + 'message' => 'اطلاعات تنظیم معتبر نیست', + 'errors' => $e->errors(), + ], 422); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی تنظیم', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/SprintController.php b/backend/app/Http/Controllers/Api/SprintController.php new file mode 100644 index 0000000..771917a --- /dev/null +++ b/backend/app/Http/Controllers/Api/SprintController.php @@ -0,0 +1,425 @@ +filled('project_id')) { + $query->where('project_id', $request->project_id); + } + if ($request->filled('status')) { + $query->where('status', $request->status); + } + if ($request->boolean('mine')) { + $query->whereHas('members', fn($q) => $q->where('users.id', $request->user()->id)); + } + + $perPage = min((int) $request->input('per_page', 15), 100); + $sortBy = in_array($request->input('sort_by'), ['id', 'title', 'status', 'created_at', 'updated_at', 'start_date', 'end_date'], true) + ? $request->input('sort_by') + : 'created_at'; + $sortDir = $request->input('sort_dir') === 'asc' ? 'asc' : 'desc'; + $sprints = $query->orderBy($sortBy, $sortDir)->paginate($perPage); + + return response()->json([ + 'success' => true, + 'data' => SprintResource::collection($sprints), + 'meta' => [ + 'current_page' => $sprints->currentPage(), + 'last_page' => $sprints->lastPage(), + 'per_page' => $sprints->perPage(), + 'total' => $sprints->total(), + ], + 'message' => 'لیست Sprintها', + ]); + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در دریافت Sprintها'], 500); + } + } + + public function show(Sprint $sprint): JsonResponse + { + try { + $sprint->load([ + 'project', + 'tasks.project', + 'tasks.assignee', + 'tasks.reporter', + 'members', + 'creator', + 'retrospective', + ]); + + return response()->json([ + 'success' => true, + 'data' => new SprintResource($sprint), + 'message' => 'اطلاعات Sprint', + ]); + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در دریافت اطلاعات Sprint'], 500); + } + } + + public function store(Request $request): JsonResponse + { + try { + $data = $this->validatedSprintData($request); + $memberIds = $data['member_ids'] ?? []; + unset($data['member_ids']); + + $data['created_by'] = $request->user()->id; + $data['status'] = 'planning'; + + $sprint = DB::transaction(function () use ($data, $memberIds) { + $sprint = Sprint::create($data); + $sprint->members()->sync($memberIds); + return $sprint; + }); + + $sprint->load(['project', 'tasks', 'members']); + + return response()->json([ + 'success' => true, + 'data' => new SprintResource($sprint), + 'message' => 'Sprint با موفقیت ایجاد شد', + ], 201); + } catch (ValidationException $e) { + throw $e; + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در ایجاد Sprint'], 500); + } + } + + public function update(Request $request, Sprint $sprint): JsonResponse + { + try { + $data = $this->validatedSprintData($request, true); + $memberIds = $data['member_ids'] ?? null; + unset($data['member_ids']); + + DB::transaction(function () use ($sprint, $data, $memberIds) { + $sprint->update($data); + if (is_array($memberIds)) { + $sprint->members()->sync($memberIds); + } + }); + + $sprint->load(['project', 'tasks', 'members', 'retrospective']); + + return response()->json([ + 'success' => true, + 'data' => new SprintResource($sprint->fresh()->load(['project', 'tasks', 'members', 'retrospective'])), + 'message' => 'Sprint به‌روزرسانی شد', + ]); + } catch (ValidationException $e) { + throw $e; + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در به‌روزرسانی Sprint'], 500); + } + } + + public function destroy(Sprint $sprint): JsonResponse + { + try { + $sprint->delete(); + + return response()->json(['success' => true, 'message' => 'Sprint حذف شد']); + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در حذف Sprint'], 500); + } + } + + public function availableTasks(Sprint $sprint): JsonResponse + { + try { + $taskIdsInSprint = $sprint->tasks()->pluck('tasks.id'); + $tasks = Task::with(['project', 'assignee']) + ->withCount(['comments', 'files']) + ->where('project_id', $sprint->project_id) + ->whereNotIn('id', $taskIdsInSprint) + ->whereNotIn('status', ['done', 'canceled']) + ->orderBy('created_at', 'desc') + ->get(); + + return response()->json([ + 'success' => true, + 'data' => TaskResource::collection($tasks), + 'message' => 'تسک‌های قابل افزودن به Sprint', + ]); + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در دریافت تسک‌های قابل افزودن'], 500); + } + } + + public function addTask(Request $request, Sprint $sprint): JsonResponse + { + try { + $request->validate(['task_id' => 'required|exists:tasks,id']); + $task = Task::findOrFail($request->task_id); + + if ($task->project_id !== $sprint->project_id) { + return response()->json(['success' => false, 'message' => 'این تسک متعلق به پروژه Sprint نیست'], 422); + } + + $sprint->tasks()->syncWithoutDetaching([$task->id]); + + return response()->json(['success' => true, 'message' => 'تسک به Sprint اضافه شد']); + } catch (ValidationException $e) { + throw $e; + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در اضافه کردن تسک به Sprint'], 500); + } + } + + public function removeTask(Sprint $sprint, Task $task): JsonResponse + { + try { + $sprint->tasks()->detach($task->id); + + return response()->json(['success' => true, 'message' => 'تسک از Sprint حذف شد']); + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در حذف تسک از Sprint'], 500); + } + } + + public function updateTaskStatus(Request $request, Sprint $sprint, Task $task): JsonResponse + { + try { + $request->validate([ + 'status' => 'required|string|in:waiting,todo,in_progress,review,done', + ]); + + if (!$sprint->tasks()->where('tasks.id', $task->id)->exists()) { + return response()->json(['success' => false, 'message' => 'این تسک در Sprint انتخاب‌شده نیست'], 404); + } + + $task->update(['status' => $request->status]); + + return response()->json([ + 'success' => true, + 'data' => new TaskResource($task->fresh()->load(['project', 'assignee'])), + 'message' => 'وضعیت تسک به‌روزرسانی شد', + ]); + } catch (ValidationException $e) { + throw $e; + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در تغییر وضعیت تسک'], 500); + } + } + + public function updateStatus(Request $request, Sprint $sprint): JsonResponse + { + try { + $request->validate(['status' => 'required|string|in:' . implode(',', $this->statuses)]); + $sprint->update(['status' => $request->status]); + + return response()->json([ + 'success' => true, + 'data' => new SprintResource($sprint->fresh()->load(['project', 'tasks', 'members'])), + 'message' => 'وضعیت Sprint به‌روزرسانی شد', + ]); + } catch (ValidationException $e) { + throw $e; + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در به‌روزرسانی وضعیت Sprint'], 500); + } + } + + public function start(Sprint $sprint): JsonResponse + { + try { + if ($sprint->status !== 'planning') { + return response()->json(['success' => false, 'message' => 'فقط Sprint برنامه‌ریزی شده قابل شروع است'], 422); + } + + $activeSprint = Sprint::where('project_id', $sprint->project_id) + ->where('status', 'active') + ->where('id', '!=', $sprint->id) + ->first(); + + if ($activeSprint) { + return response()->json([ + 'success' => false, + 'message' => "در این پروژه Sprint فعال دیگری وجود دارد: {$activeSprint->title}", + ], 422); + } + + $sprint->update(['status' => 'active']); + + return response()->json([ + 'success' => true, + 'data' => new SprintResource($sprint->fresh()->load(['project', 'tasks', 'members'])), + 'message' => 'Sprint شروع شد', + ]); + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در شروع Sprint'], 500); + } + } + + public function end(Request $request, Sprint $sprint): JsonResponse + { + try { + $request->validate([ + 'incomplete_action' => 'required|string|in:move_to_next,backlog,keep', + 'target_sprint_id' => 'nullable|required_if:incomplete_action,move_to_next|exists:sprints,id', + ]); + + if ($sprint->status !== 'active') { + return response()->json(['success' => false, 'message' => 'فقط Sprint فعال قابل پایان دادن است'], 422); + } + + $incompleteTasks = $sprint->tasks()->where('status', '!=', 'done')->get(); + $completedTasks = $sprint->tasks()->where('status', 'done')->count(); + $totalTasks = $sprint->tasks()->count(); + + DB::transaction(function () use ($request, $sprint, $incompleteTasks, $totalTasks, $completedTasks) { + if ($request->incomplete_action === 'move_to_next') { + $targetSprint = Sprint::where('id', $request->target_sprint_id) + ->where('project_id', $sprint->project_id) + ->where('status', 'planning') + ->firstOrFail(); + $targetSprint->tasks()->syncWithoutDetaching($incompleteTasks->pluck('id')->all()); + $sprint->tasks()->detach($incompleteTasks->pluck('id')->all()); + } + + if (in_array($request->incomplete_action, ['backlog', 'keep'], true)) { + $sprint->tasks()->detach($incompleteTasks->pluck('id')->all()); + } + + $sprint->update([ + 'status' => 'completed', + 'completed_at' => now(), + 'completion_summary' => [ + 'total_tasks' => $totalTasks, + 'completed_tasks' => $completedTasks, + 'incomplete_tasks' => $incompleteTasks->count(), + 'incomplete_action' => $request->incomplete_action, + ], + ]); + }); + + return response()->json([ + 'success' => true, + 'data' => new SprintResource($sprint->fresh()->load(['project', 'tasks', 'members', 'retrospective'])), + 'message' => 'Sprint پایان یافت', + ]); + } catch (ValidationException $e) { + throw $e; + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در پایان Sprint'], 500); + } + } + + public function cancel(Sprint $sprint): JsonResponse + { + try { + if (!in_array($sprint->status, ['planning', 'active'], true)) { + return response()->json(['success' => false, 'message' => 'این Sprint قابل لغو نیست'], 422); + } + + $sprint->update(['status' => 'cancelled']); + + return response()->json([ + 'success' => true, + 'data' => new SprintResource($sprint->fresh()->load(['project', 'tasks', 'members'])), + 'message' => 'Sprint لغو شد', + ]); + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در لغو Sprint'], 500); + } + } + + public function report(Sprint $sprint): JsonResponse + { + try { + $sprint->load(['tasks.assignee', 'members']); + $tasks = $sprint->tasks; + $totalTasks = $tasks->count(); + $completedTasks = $tasks->where('status', 'done')->count(); + $incompleteTasks = $totalTasks - $completedTasks; + + return response()->json([ + 'success' => true, + 'data' => [ + 'total_tasks' => $totalTasks, + 'completed_tasks' => $completedTasks, + 'incomplete_tasks' => $incompleteTasks, + 'completion_percentage' => $totalTasks > 0 ? round(($completedTasks / $totalTasks) * 100, 2) : 0, + 'completed_by_member' => $tasks + ->where('status', 'done') + ->groupBy(fn($task) => $task->assignee?->name ?? 'بدون مسئول') + ->map(fn($items, $name) => ['name' => $name, 'completed' => $items->count()]) + ->values(), + 'unfinished_tasks' => TaskResource::collection($tasks->where('status', '!=', 'done')->values()), + ], + 'message' => 'گزارش Sprint', + ]); + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در دریافت گزارش Sprint'], 500); + } + } + + public function updateRetrospective(Request $request, Sprint $sprint): JsonResponse + { + try { + $request->validate([ + 'went_well' => 'nullable|string', + 'problems' => 'nullable|string', + 'improvements' => 'nullable|string', + ]); + + $sprint->retrospective()->updateOrCreate( + ['sprint_id' => $sprint->id], + [ + 'went_well' => $request->went_well, + 'problems' => $request->problems, + 'improvements' => $request->improvements, + 'updated_by' => $request->user()->id, + ] + ); + + return response()->json([ + 'success' => true, + 'data' => new SprintResource($sprint->fresh()->load(['project', 'tasks', 'members', 'retrospective'])), + 'message' => 'یادداشت پایان Sprint ذخیره شد', + ]); + } catch (ValidationException $e) { + throw $e; + } catch (\Exception $e) { + return response()->json(['success' => false, 'message' => 'خطا در ذخیره یادداشت پایان Sprint'], 500); + } + } + + private function validatedSprintData(Request $request, bool $partial = false): array + { + $required = $partial ? 'sometimes|required' : 'required'; + + return $request->validate([ + 'title' => "{$required}|string|max:255", + 'project_id' => "{$required}|exists:projects,id", + 'goal' => 'nullable|string|max:1000', + 'capacity_hours' => 'nullable|numeric|min:0', + 'start_date' => "{$required}|date", + 'end_date' => "{$required}|date|after_or_equal:start_date", + 'member_ids' => 'nullable|array', + 'member_ids.*' => 'exists:users,id', + ]); + } +} diff --git a/backend/app/Http/Controllers/Api/SubtaskController.php b/backend/app/Http/Controllers/Api/SubtaskController.php new file mode 100644 index 0000000..56e2fe6 --- /dev/null +++ b/backend/app/Http/Controllers/Api/SubtaskController.php @@ -0,0 +1,125 @@ +subtasks()->with('assignee')->orderBy('position')->get(); + + return response()->json([ + 'success' => true, + 'data' => SubtaskResource::collection($subtasks), + 'message' => 'لیست زیروظایف', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت زیروظایف', + ], 500); + } + } + + public function store(Request $request, Task $task): JsonResponse + { + try { + $request->validate([ + 'title' => 'required|string|max:255', + 'description' => 'nullable|string', + 'assignee_id' => 'nullable|exists:users,id', + 'due_date' => 'nullable|date', + 'position' => 'nullable|integer', + ]); + + $data = $request->only(['title', 'description', 'assignee_id', 'due_date', 'position']); + $data['task_id'] = $task->id; + $data['status'] = 'todo'; + $subtask = Subtask::create($data); + $subtask->load('assignee'); + + return response()->json([ + 'success' => true, + 'data' => new SubtaskResource($subtask), + 'message' => 'زیروظیفه ایجاد شد', + ], 201); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در ایجاد زیروظیفه', + ], 500); + } + } + + public function update(Request $request, Subtask $subtask): JsonResponse + { + try { + $request->validate([ + 'title' => 'sometimes|required|string|max:255', + 'description' => 'nullable|string', + 'assignee_id' => 'nullable|exists:users,id', + 'due_date' => 'nullable|date', + 'position' => 'nullable|integer', + ]); + + $subtask->update($request->only(['title', 'description', 'assignee_id', 'due_date', 'position'])); + $subtask->load('assignee'); + + return response()->json([ + 'success' => true, + 'data' => new SubtaskResource($subtask->fresh()), + 'message' => 'زیروظیفه به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی زیروظیفه', + ], 500); + } + } + + public function destroy(Subtask $subtask): JsonResponse + { + try { + $subtask->delete(); + + return response()->json([ + 'success' => true, + 'message' => 'زیروظیفه حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف زیروظیفه', + ], 500); + } + } + + public function updateStatus(Request $request, Subtask $subtask): JsonResponse + { + try { + $request->validate(['status' => 'required|string']); + $subtask->update(['status' => $request->status]); + $subtask->load('assignee'); + + return response()->json([ + 'success' => true, + 'data' => new SubtaskResource($subtask->fresh()), + 'message' => 'وضعیت زیروظیفه به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی وضعیت', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/TaskController.php b/backend/app/Http/Controllers/Api/TaskController.php new file mode 100644 index 0000000..cedf9f4 --- /dev/null +++ b/backend/app/Http/Controllers/Api/TaskController.php @@ -0,0 +1,368 @@ +withCount(['comments', 'files']); + + if ($request->filled('project_id')) { + $query->where('project_id', $request->project_id); + } + if ($request->filled('assignee_id')) { + $query->where('assignee_id', $request->assignee_id); + } + if ($request->filled('status')) { + $query->where('status', $request->status); + } + if ($request->filled('priority')) { + $query->where('priority', $request->priority); + } + if ($request->filled('search')) { + $search = $request->search; + $query->where('title', 'like', "%{$search}%"); + } + + $perPage = min((int) $request->input('per_page', 15), 100); + $sortBy = in_array($request->input('sort_by'), ['id', 'title', 'status', 'priority', 'created_at', 'updated_at', 'due_date', 'sort_order'], true) + ? $request->input('sort_by') + : 'created_at'; + $sortDir = $request->input('sort_dir') === 'asc' ? 'asc' : 'desc'; + $tasks = $query->orderBy($sortBy, $sortDir)->paginate($perPage); + + return response()->json([ + 'success' => true, + 'data' => TaskResource::collection($tasks), + 'meta' => [ + 'current_page' => $tasks->currentPage(), + 'last_page' => $tasks->lastPage(), + 'per_page' => $tasks->perPage(), + 'total' => $tasks->total(), + ], + 'message' => 'لیست وظایف', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت لیست وظایف', + ], 500); + } + } + + public function show(Task $task): JsonResponse + { + try { + $task->load(['project', 'assignee', 'reporter', 'checklists', 'subtasks', 'comments.user', 'files']); + + return response()->json([ + 'success' => true, + 'data' => new TaskResource($task), + 'message' => 'اطلاعات وظیفه', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت اطلاعات وظیفه', + ], 500); + } + } + + public function store(StoreTaskRequest $request): JsonResponse + { + try { + $data = $request->validated(); + $data['reporter_id'] = $request->user()->id; + $data['created_by'] = $request->user()->id; + $task = Task::create($data); + + $this->projectProgressService->calculateProgress($task->project_id); + + $this->activityLogService->log( + $request->user()->id, + 'create_task', + "وظیفه {$task->title} ایجاد شد", + 'task', + $task->id, + $task->project_id, + $task->id, + ['task_title' => $task->title] + ); + + if ($task->assignee_id) { + $this->notificationService->create( + $task->assignee_id, + 'task_assigned', + [ + 'task_id' => $task->id, + 'project_id' => $task->project_id, + 'url' => '/kanban', + 'notifiable_type' => 'App\\Models\\Task', + 'notifiable_id' => $task->id, + ], + "وظیفه جدید {$task->title} به شما اختصاص داده شد" + ); + } + + $task->load(['project', 'assignee', 'reporter']); + + return response()->json([ + 'success' => true, + 'data' => new TaskResource($task), + 'message' => 'وظیفه با موفقیت ایجاد شد', + ], 201); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در ایجاد وظیفه', + ], 500); + } + } + + public function update(UpdateTaskRequest $request, Task $task): JsonResponse + { + try { + $oldStatus = $task->status; + $task->update($request->validated()); + + if ($task->wasChanged('status')) { + $this->activityLogService->log( + $request->user()->id, + 'update_task_status', + "وضعیت وظیفه {$task->title} از {$oldStatus} به {$task->status} تغییر یافت", + 'task', + $task->id, + $task->project_id, + $task->id, + ['old_status' => $oldStatus, 'new_status' => $task->status] + ); + } + + $this->projectProgressService->calculateProgress($task->project_id); + $task->load(['project', 'assignee', 'reporter']); + + return response()->json([ + 'success' => true, + 'data' => new TaskResource($task->fresh()), + 'message' => 'وظیفه با موفقیت به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی وظیفه', + ], 500); + } + } + + public function destroy(Request $request, Task $task): JsonResponse + { + try { + $projectId = $task->project_id; + $taskId = $task->id; + $taskTitle = $task->title; + + $this->activityLogService->log( + $request->user()->id, + 'delete_task', + "وظیفه {$taskTitle} حذف شد", + 'task', + $taskId, + $projectId, + null, + ['task_title' => $taskTitle] + ); + + $task->delete(); + $this->projectProgressService->calculateProgress($projectId); + + return response()->json([ + 'success' => true, + 'message' => 'وظیفه با موفقیت حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف وظیفه', + ], 500); + } + } + + public function updateStatus(Request $request, Task $task): JsonResponse + { + try { + $request->validate(['status' => 'required|string']); + + $oldStatus = $task->status; + $task->update(['status' => $request->status]); + + $this->projectProgressService->calculateProgress($task->project_id); + + $this->activityLogService->log( + $request->user()->id, + 'update_task_status', + "وضعیت وظیفه {$task->title} از {$oldStatus} به {$task->status} تغییر یافت", + 'task', + $task->id, + $task->project_id, + $task->id, + ['old_status' => $oldStatus, 'new_status' => $task->status] + ); + + if ($task->assignee_id) { + $this->notificationService->create( + $task->assignee_id, + 'task_status_changed', + ['task_id' => $task->id, 'status' => $task->status], + "وضعیت وظیفه {$task->title} به {$task->status} تغییر یافت" + ); + } + + return response()->json([ + 'success' => true, + 'data' => new TaskResource($task->fresh()->load(['project', 'assignee'])), + 'message' => 'وضعیت وظیفه به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی وضعیت', + ], 500); + } + } + + public function updateAssignee(Request $request, Task $task): JsonResponse + { + try { + $request->validate(['assignee_id' => 'nullable|exists:users,id']); + + $oldAssigneeId = $task->assignee_id; + $task->update(['assignee_id' => $request->assignee_id]); + + if ($request->assignee_id && $request->assignee_id != $oldAssigneeId) { + $this->notificationService->create( + $request->assignee_id, + 'task_assigned', + [ + 'task_id' => $task->id, + 'project_id' => $task->project_id, + 'url' => '/kanban', + 'notifiable_type' => 'App\\Models\\Task', + 'notifiable_id' => $task->id, + ], + "وظیفه {$task->title} به شما اختصاص داده شد" + ); + } + + $this->activityLogService->log( + $request->user()->id, + 'update_task_assignee', + "مسئول وظیفه {$task->title} تغییر یافت", + 'task', + $task->id, + $task->project_id, + $task->id, + ['old_assignee' => $oldAssigneeId, 'new_assignee' => $request->assignee_id] + ); + + return response()->json([ + 'success' => true, + 'data' => new TaskResource($task->fresh()->load(['project', 'assignee'])), + 'message' => 'مسئول وظیفه به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی مسئول', + ], 500); + } + } + + public function reorder(Request $request): JsonResponse + { + try { + $request->validate([ + 'tasks' => 'required|array', + 'tasks.*.id' => 'required|exists:tasks,id', + 'tasks.*.sort_order' => 'required|integer', + ]); + + foreach ($request->tasks as $item) { + Task::where('id', $item['id'])->update(['sort_order' => $item['sort_order']]); + } + + return response()->json([ + 'success' => true, + 'message' => 'ترتیب وظایف به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در مرتب‌سازی وظایف', + ], 500); + } + } + + public function myTasks(Request $request): JsonResponse + { + try { + $tasks = Task::with(['project', 'assignee']) + ->where('assignee_id', $request->user()->id) + ->where('status', '!=', 'done') + ->orderBy('due_date') + ->get(); + + return response()->json([ + 'success' => true, + 'data' => TaskResource::collection($tasks), + 'message' => 'وظایف من', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت وظایف من', + ], 500); + } + } + + public function delayedTasks(): JsonResponse + { + try { + $tasks = Task::with(['project', 'assignee']) + ->where('due_date', '<', Carbon::now()) + ->where('status', '!=', 'done') + ->orderBy('due_date') + ->get(); + + return response()->json([ + 'success' => true, + 'data' => TaskResource::collection($tasks), + 'message' => 'وظایف عقب افتاده', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت وظایف عقب افتاده', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Api/UserController.php b/backend/app/Http/Controllers/Api/UserController.php new file mode 100644 index 0000000..ef5cba2 --- /dev/null +++ b/backend/app/Http/Controllers/Api/UserController.php @@ -0,0 +1,237 @@ +filled('search')) { + $search = $request->search; + $query->where(function ($q) use ($search) { + $q->where('name', 'like', "%{$search}%") + ->orWhere('email', 'like', "%{$search}%"); + }); + } + + $perPage = min((int) $request->input('per_page', 15), 100); + $sortBy = in_array($request->input('sort_by'), ['id', 'name', 'email', 'status', 'created_at', 'updated_at'], true) + ? $request->input('sort_by') + : 'created_at'; + $sortDir = $request->input('sort_dir') === 'asc' ? 'asc' : 'desc'; + $users = $query->orderBy($sortBy, $sortDir)->paginate($perPage); + + return response()->json([ + 'success' => true, + 'data' => UserResource::collection($users), + 'meta' => [ + 'current_page' => $users->currentPage(), + 'last_page' => $users->lastPage(), + 'per_page' => $users->perPage(), + 'total' => $users->total(), + ], + 'message' => 'لیست کاربران', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت لیست کاربران', + ], 500); + } + } + + public function show(User $user): JsonResponse + { + try { + $user->load(['roles.permissions', 'projects', 'dept', 'departments']); + + return response()->json([ + 'success' => true, + 'data' => new UserResource($user), + 'message' => 'اطلاعات کاربر', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت اطلاعات کاربر', + ], 500); + } + } + + public function store(StoreUserRequest $request): JsonResponse + { + try { + $data = $request->validated(); + $data['password'] = Hash::make($data['password']); + $data['status'] = $data['status'] ?? 'active'; + $user = User::create($data); + if (array_key_exists('role_id', $data)) { + $data['role_id'] ? $user->roles()->sync([$data['role_id']]) : $user->roles()->detach(); + } + $user->load(['role', 'roles.permissions', 'dept']); + + return response()->json([ + 'success' => true, + 'data' => new UserResource($user), + 'message' => 'کاربر با موفقیت ایجاد شد', + ], 201); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در ایجاد کاربر', + ], 500); + } + } + + public function update(UpdateUserRequest $request, User $user): JsonResponse + { + try { + $data = $request->validated(); + if (!empty($data['password'])) { + $data['password'] = Hash::make($data['password']); + } else { + unset($data['password']); + } + $user->update($data); + if (!empty($data['role_id'])) { + $user->roles()->sync([$data['role_id']]); + } + $user->load(['role', 'roles.permissions']); + + return response()->json([ + 'success' => true, + 'data' => new UserResource($user->fresh()), + 'message' => 'کاربر با موفقیت به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی کاربر', + ], 500); + } + } + + public function destroy(User $user): JsonResponse + { + try { + if ($user->id === request()->user()->id) { + return response()->json([ + 'success' => false, + 'message' => 'نمی‌توانید خودتان را حذف کنید', + ], 400); + } + + $user->delete(); + + return response()->json([ + 'success' => true, + 'message' => 'کاربر با موفقیت حذف شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در حذف کاربر', + ], 500); + } + } + + public function updateStatus(Request $request, User $user): JsonResponse + { + try { + $request->validate(['status' => 'required|string|in:active,inactive']); + $user->update(['status' => $request->status]); + + return response()->json([ + 'success' => true, + 'data' => new UserResource($user->fresh()), + 'message' => 'وضعیت کاربر به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی وضعیت', + ], 500); + } + } + + public function syncRoles(Request $request, User $user): JsonResponse + { + try { + $request->validate([ + 'roles' => 'present|array', + 'roles.*' => 'integer|exists:roles,id', + ]); + + $user->roles()->sync($request->roles); + $user->load(['roles.permissions', 'dept', 'departments']); + + return response()->json([ + 'success' => true, + 'data' => new UserResource($user), + 'message' => 'نقش‌های کاربر به‌روزرسانی شد', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در به‌روزرسانی نقش‌های کاربر', + ], 500); + } + } + + public function updateWorkload(User $user): JsonResponse + { + try { + $workload = collect($this->workloadService->getWorkload()) + ->firstWhere('user_id', $user->id); + + return response()->json([ + 'success' => true, + 'data' => $workload, + 'message' => 'بار کاری کاربر', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت بار کاری', + ], 500); + } + } + + public function taskStats(User $user): JsonResponse + { + try { + $tasks = Task::where('assignee_id', $user->id); + + return response()->json([ + 'success' => true, + 'data' => [ + 'assigned_tasks_count' => (clone $tasks)->count(), + 'in_progress_count' => (clone $tasks)->whereNotIn('status', ['done', 'canceled'])->count(), + 'delayed_tasks_count' => (clone $tasks)->whereDate('due_date', '<', now()->toDateString())->where('status', '!=', 'done')->count(), + ], + 'message' => 'آمار تسک‌های کاربر', + ]); + } catch (\Exception $e) { + return response()->json([ + 'success' => false, + 'message' => 'خطا در دریافت آمار کاربر', + ], 500); + } + } +} diff --git a/backend/app/Http/Controllers/Controller.php b/backend/app/Http/Controllers/Controller.php new file mode 100644 index 0000000..8677cd5 --- /dev/null +++ b/backend/app/Http/Controllers/Controller.php @@ -0,0 +1,8 @@ +user(); + + if (!$user) { + return response()->json([ + 'success' => false, + 'message' => 'Unauthenticated.', + ], 401); + } + + $user->loadMissing('roles.permissions'); + + $isAdmin = $user->roles->contains('name', 'admin'); + + if (!$isAdmin && !$user->hasPermission($permission)) { + return response()->json([ + 'success' => false, + 'message' => 'شما دسترسی لازم برای انجام این عملیات را ندارید', + ], 403); + } + + return $next($request); + } +} diff --git a/backend/app/Http/Middleware/SecurityHeaders.php b/backend/app/Http/Middleware/SecurityHeaders.php new file mode 100644 index 0000000..37a63c3 --- /dev/null +++ b/backend/app/Http/Middleware/SecurityHeaders.php @@ -0,0 +1,30 @@ +headers->set('X-Content-Type-Options', 'nosniff'); + $response->headers->set('X-Frame-Options', 'DENY'); + $response->headers->set('Referrer-Policy', 'strict-origin-when-cross-origin'); + $response->headers->set('Permissions-Policy', 'camera=(), microphone=(), geolocation=()'); + + if (!$response->headers->has('Content-Security-Policy')) { + $response->headers->set( + 'Content-Security-Policy', + "default-src 'self'; frame-ancestors 'none'; object-src 'none'; base-uri 'self'" + ); + } + + return $response; + } +} diff --git a/backend/app/Http/Requests/ChangePasswordRequest.php b/backend/app/Http/Requests/ChangePasswordRequest.php new file mode 100644 index 0000000..f9e8829 --- /dev/null +++ b/backend/app/Http/Requests/ChangePasswordRequest.php @@ -0,0 +1,21 @@ + 'required', + 'new_password' => 'required|min:8|confirmed', + ]; + } +} diff --git a/backend/app/Http/Requests/LoginRequest.php b/backend/app/Http/Requests/LoginRequest.php new file mode 100644 index 0000000..35618fc --- /dev/null +++ b/backend/app/Http/Requests/LoginRequest.php @@ -0,0 +1,33 @@ +input('identifier', $this->input('email')); + + if ($identifier !== null) { + $this->merge([ + 'identifier' => strtolower(trim((string) $identifier)), + ]); + } + } + + public function authorize(): bool + { + return true; + } + + public function rules(): array + { + return [ + 'identifier' => 'required|string|max:255', + 'email' => 'sometimes|nullable|string|max:255', + 'password' => 'required|string', + ]; + } +} diff --git a/backend/app/Http/Requests/StoreBacklogItemRequest.php b/backend/app/Http/Requests/StoreBacklogItemRequest.php new file mode 100644 index 0000000..0b026a8 --- /dev/null +++ b/backend/app/Http/Requests/StoreBacklogItemRequest.php @@ -0,0 +1,25 @@ + 'required|string|max:255', + 'type' => 'required|string|max:50', + 'project_id' => 'nullable|exists:projects,id', + 'priority' => 'nullable|string|max:50', + 'estimated_effort' => 'nullable|numeric', + 'status' => 'nullable|string|max:50', + ]; + } +} diff --git a/backend/app/Http/Requests/StoreCommentRequest.php b/backend/app/Http/Requests/StoreCommentRequest.php new file mode 100644 index 0000000..e36526b --- /dev/null +++ b/backend/app/Http/Requests/StoreCommentRequest.php @@ -0,0 +1,23 @@ + 'required|string', + 'commentable_id' => 'required|integer', + 'commentable_type' => 'required|string', + 'mentioned_user_id' => 'nullable|exists:users,id', + ]; + } +} diff --git a/backend/app/Http/Requests/StoreMeetingRequest.php b/backend/app/Http/Requests/StoreMeetingRequest.php new file mode 100644 index 0000000..dde2d15 --- /dev/null +++ b/backend/app/Http/Requests/StoreMeetingRequest.php @@ -0,0 +1,25 @@ + 'required|string|max:255', + 'project_id' => 'nullable|exists:projects,id', + 'date' => 'required|date', + 'start_time' => 'nullable', + 'end_time' => 'nullable', + 'meeting_type' => 'required|string|max:50', + ]; + } +} diff --git a/backend/app/Http/Requests/StoreProjectRequest.php b/backend/app/Http/Requests/StoreProjectRequest.php new file mode 100644 index 0000000..432d652 --- /dev/null +++ b/backend/app/Http/Requests/StoreProjectRequest.php @@ -0,0 +1,32 @@ + 'required|string|max:255', + 'description' => 'nullable|string', + 'client' => 'nullable|string|max:255', + 'project_manager_id' => 'nullable|exists:users,id', + 'department_id' => 'nullable|exists:departments,id', + 'start_date' => 'nullable|date', + 'end_date' => 'nullable|date|after_or_equal:start_date', + 'priority' => 'nullable|string|max:50', + 'status' => 'nullable|string|max:50', + 'risk_level' => 'nullable|string|max:50', + 'budget' => 'nullable|numeric', + 'estimated_hours' => 'nullable|numeric', + 'actual_hours' => 'nullable|numeric', + ]; + } +} diff --git a/backend/app/Http/Requests/StoreRoleRequest.php b/backend/app/Http/Requests/StoreRoleRequest.php new file mode 100644 index 0000000..20ccc0e --- /dev/null +++ b/backend/app/Http/Requests/StoreRoleRequest.php @@ -0,0 +1,25 @@ + 'required|string|max:255|unique:roles,name', + 'display_name' => 'required|string|max:255', + 'description' => 'nullable|string|max:1000', + 'guard_name' => 'nullable|string|max:50', + 'permissions' => 'nullable|array', + 'permissions.*' => 'integer|exists:permissions,id', + ]; + } +} diff --git a/backend/app/Http/Requests/StoreSprintRequest.php b/backend/app/Http/Requests/StoreSprintRequest.php new file mode 100644 index 0000000..19a0e87 --- /dev/null +++ b/backend/app/Http/Requests/StoreSprintRequest.php @@ -0,0 +1,24 @@ + 'required|string|max:255', + 'project_id' => 'required|exists:projects,id', + 'goal' => 'nullable|string', + 'start_date' => 'required|date', + 'end_date' => 'required|date|after_or_equal:start_date', + ]; + } +} diff --git a/backend/app/Http/Requests/StoreTaskRequest.php b/backend/app/Http/Requests/StoreTaskRequest.php new file mode 100644 index 0000000..559851f --- /dev/null +++ b/backend/app/Http/Requests/StoreTaskRequest.php @@ -0,0 +1,85 @@ + 'required|string|max:255', + 'description' => 'nullable|string', + 'project_id' => 'required|exists:projects,id', + 'assignee_id' => 'nullable|exists:users,id', + 'priority' => ['nullable', Rule::in(['low', 'medium', 'high', 'urgent'])], + 'status' => ['nullable', Rule::in(['waiting', 'todo', 'in_progress', 'review', 'done', 'canceled', 'cancelled'])], + 'blocker_type' => 'nullable|string|max:80', + 'blocker_note' => 'nullable|string', + 'start_date' => 'nullable|date', + 'due_date' => 'nullable|date|after_or_equal:today', + 'estimated_time' => 'nullable|numeric', + 'actual_time' => 'nullable|numeric', + ]; + } + + public function messages(): array + { + return [ + 'title.required' => 'عنوان تسک الزامی است.', + 'title.max' => 'عنوان تسک نباید بیشتر از ۲۵۵ کاراکتر باشد.', + 'project_id.required' => 'انتخاب پروژه الزامی است.', + 'project_id.exists' => 'پروژه انتخاب‌شده معتبر نیست.', + 'assignee_id.exists' => 'مسئول انتخاب‌شده معتبر نیست.', + 'priority.in' => 'اولویت انتخاب‌شده معتبر نیست.', + 'status.in' => 'وضعیت انتخاب‌شده معتبر نیست.', + 'due_date.date' => 'مهلت انجام معتبر نیست.', + 'due_date.after_or_equal' => 'مهلت انجام نمی‌تواند قبل از امروز باشد.', + ]; + } + + public function withValidator(Validator $validator): void + { + $validator->after(function (Validator $validator) { + $user = $this->user()?->loadMissing('roles.permissions'); + $project = Project::with('members:id')->find($this->input('project_id')); + + if (!$user || !$project) { + return; + } + + $canUseProject = $user->hasPermission('reports.view') + || (int) $project->project_manager_id === (int) $user->id + || (int) $project->created_by === (int) $user->id + || $project->members->contains('id', $user->id); + + if (!$canUseProject) { + $validator->errors()->add('project_id', 'شما به این پروژه دسترسی ندارید.'); + } + + if ($this->filled('assignee_id')) { + $assignee = User::find($this->input('assignee_id')); + $assigneeAllowed = $assignee && ( + $user->hasPermission('reports.view') + || (int) $assignee->id === (int) $user->id + || $project->members->contains('id', $assignee->id) + || (int) $project->project_manager_id === (int) $assignee->id + ); + + if (!$assigneeAllowed) { + $validator->errors()->add('assignee_id', 'مسئول انتخاب‌شده برای این پروژه مجاز نیست.'); + } + } + }); + } +} diff --git a/backend/app/Http/Requests/StoreUserRequest.php b/backend/app/Http/Requests/StoreUserRequest.php new file mode 100644 index 0000000..f078e21 --- /dev/null +++ b/backend/app/Http/Requests/StoreUserRequest.php @@ -0,0 +1,43 @@ +input($field) === '') { + $this->merge([$field => null]); + } + } + + if ($this->has('email')) { + $this->merge([ + 'email' => strtolower(trim((string) $this->input('email'))), + ]); + } + } + + public function authorize(): bool + { + return true; + } + + public function rules(): array + { + return [ + 'name' => 'required|string|max:255', + 'email' => 'required|email|unique:users,email', + 'phone' => 'nullable|string|max:50', + 'job_title' => 'nullable|string|max:255', + 'department' => 'nullable|string|max:255', + 'department_id' => 'nullable|exists:departments,id', + 'role_id' => 'nullable|exists:roles,id', + 'status' => 'nullable|string|in:active,inactive', + 'password' => 'required|min:8', + ]; + } +} diff --git a/backend/app/Http/Requests/UpdateProfileRequest.php b/backend/app/Http/Requests/UpdateProfileRequest.php new file mode 100644 index 0000000..2682d2e --- /dev/null +++ b/backend/app/Http/Requests/UpdateProfileRequest.php @@ -0,0 +1,33 @@ +has('email')) { + $this->merge([ + 'email' => strtolower(trim((string) $this->input('email'))), + ]); + } + } + + public function authorize(): bool + { + return true; + } + + public function rules(): array + { + return [ + 'name' => 'required|string|max:255', + 'email' => 'required|email|unique:users,email,' . $this->user()->id, + 'phone' => 'nullable|string|max:50', + 'job_title' => 'nullable|string|max:255', + 'department' => 'nullable|string|max:255', + ]; + } +} diff --git a/backend/app/Http/Requests/UpdateProjectRequest.php b/backend/app/Http/Requests/UpdateProjectRequest.php new file mode 100644 index 0000000..6e151cb --- /dev/null +++ b/backend/app/Http/Requests/UpdateProjectRequest.php @@ -0,0 +1,32 @@ + 'sometimes|required|string|max:255', + 'description' => 'nullable|string', + 'client' => 'nullable|string|max:255', + 'project_manager_id' => 'nullable|exists:users,id', + 'department_id' => 'nullable|exists:departments,id', + 'start_date' => 'nullable|date', + 'end_date' => 'nullable|date|after_or_equal:start_date', + 'priority' => 'nullable|string|max:50', + 'status' => 'nullable|string|max:50', + 'risk_level' => 'nullable|string|max:50', + 'budget' => 'nullable|numeric', + 'estimated_hours' => 'nullable|numeric', + 'actual_hours' => 'nullable|numeric', + ]; + } +} diff --git a/backend/app/Http/Requests/UpdateRoleRequest.php b/backend/app/Http/Requests/UpdateRoleRequest.php new file mode 100644 index 0000000..adb85cd --- /dev/null +++ b/backend/app/Http/Requests/UpdateRoleRequest.php @@ -0,0 +1,26 @@ +route('role'); + return [ + 'name' => 'sometimes|required|string|max:255|unique:roles,name,' . $roleId, + 'display_name' => 'sometimes|required|string|max:255', + 'description' => 'nullable|string|max:1000', + 'guard_name' => 'nullable|string|max:50', + 'permissions' => 'nullable|array', + 'permissions.*' => 'integer|exists:permissions,id', + ]; + } +} diff --git a/backend/app/Http/Requests/UpdateTaskRequest.php b/backend/app/Http/Requests/UpdateTaskRequest.php new file mode 100644 index 0000000..73fbb8f --- /dev/null +++ b/backend/app/Http/Requests/UpdateTaskRequest.php @@ -0,0 +1,31 @@ + 'sometimes|required|string|max:255', + 'description' => 'nullable|string', + 'project_id' => 'sometimes|required|exists:projects,id', + 'assignee_id' => 'nullable|exists:users,id', + 'priority' => 'nullable|string|max:50', + 'status' => 'nullable|string|max:50', + 'blocker_type' => 'nullable|string|max:80', + 'blocker_note' => 'nullable|string', + 'start_date' => 'nullable|date', + 'due_date' => 'nullable|date', + 'estimated_time' => 'nullable|numeric', + 'actual_time' => 'nullable|numeric', + ]; + } +} diff --git a/backend/app/Http/Requests/UpdateUserRequest.php b/backend/app/Http/Requests/UpdateUserRequest.php new file mode 100644 index 0000000..0c53af4 --- /dev/null +++ b/backend/app/Http/Requests/UpdateUserRequest.php @@ -0,0 +1,45 @@ +input($field) === '') { + $this->merge([$field => null]); + } + } + + if ($this->has('email')) { + $this->merge([ + 'email' => strtolower(trim((string) $this->input('email'))), + ]); + } + } + + public function authorize(): bool + { + return true; + } + + public function rules(): array + { + $userId = $this->route('user'); + $userId = is_object($userId) ? $userId->id : $userId; + return [ + 'name' => 'sometimes|required|string|max:255', + 'email' => 'sometimes|required|email|unique:users,email,' . $userId, + 'phone' => 'nullable|string|max:50', + 'job_title' => 'nullable|string|max:255', + 'department' => 'nullable|string|max:255', + 'department_id' => 'nullable|exists:departments,id', + 'role_id' => 'nullable|exists:roles,id', + 'status' => 'nullable|string|in:active,inactive', + 'password' => 'nullable|min:8', + ]; + } +} diff --git a/backend/app/Http/Resources/ActivityLogResource.php b/backend/app/Http/Resources/ActivityLogResource.php new file mode 100644 index 0000000..bf5e647 --- /dev/null +++ b/backend/app/Http/Resources/ActivityLogResource.php @@ -0,0 +1,27 @@ + $this->id, + 'user_id' => $this->user_id, + 'user' => new UserResource($this->whenLoaded('user')), + 'action' => $this->action, + 'description' => $this->description, + 'subject_type' => $this->subject_type, + 'subject_id' => $this->subject_id, + 'project_id' => $this->project_id, + 'task_id' => $this->task_id, + 'properties' => $this->properties, + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Http/Resources/BacklogItemResource.php b/backend/app/Http/Resources/BacklogItemResource.php new file mode 100644 index 0000000..7b30b5c --- /dev/null +++ b/backend/app/Http/Resources/BacklogItemResource.php @@ -0,0 +1,30 @@ + $this->id, + 'title' => $this->title, + 'description' => $this->description, + 'type' => $this->type, + 'project_id' => $this->project_id, + 'project' => new ProjectResource($this->whenLoaded('project')), + 'priority' => $this->priority, + 'estimated_effort' => $this->estimated_effort, + 'status' => $this->status, + 'assigned_sprint_id' => $this->assigned_sprint_id, + 'assigned_sprint' => new SprintResource($this->whenLoaded('assignedSprint')), + 'created_by' => $this->created_by, + 'creator' => new UserResource($this->whenLoaded('creator')), + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Http/Resources/ChecklistResource.php b/backend/app/Http/Resources/ChecklistResource.php new file mode 100644 index 0000000..589e1f5 --- /dev/null +++ b/backend/app/Http/Resources/ChecklistResource.php @@ -0,0 +1,22 @@ + $this->id, + 'task_id' => $this->task_id, + 'title' => $this->title, + 'is_completed' => $this->is_completed, + 'position' => $this->position, + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Http/Resources/CommentResource.php b/backend/app/Http/Resources/CommentResource.php new file mode 100644 index 0000000..3ea82bf --- /dev/null +++ b/backend/app/Http/Resources/CommentResource.php @@ -0,0 +1,24 @@ + $this->id, + 'body' => $this->body, + 'user_id' => $this->user_id, + 'user' => new UserResource($this->whenLoaded('user')), + 'commentable_id' => $this->commentable_id, + 'commentable_type' => $this->commentable_type, + 'files' => FileResource::collection($this->whenLoaded('files')), + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Http/Resources/FileResource.php b/backend/app/Http/Resources/FileResource.php new file mode 100644 index 0000000..6f0f990 --- /dev/null +++ b/backend/app/Http/Resources/FileResource.php @@ -0,0 +1,27 @@ + $this->id, + 'name' => $this->name, + 'original_name' => $this->original_name, + 'download_url' => url("/api/files/{$this->id}"), + 'mime_type' => $this->mime_type, + 'size' => $this->size, + 'fileable_id' => $this->fileable_id, + 'fileable_type' => $this->fileable_type, + 'user_id' => $this->user_id, + 'user' => new UserResource($this->whenLoaded('user')), + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Http/Resources/MeetingActionItemResource.php b/backend/app/Http/Resources/MeetingActionItemResource.php new file mode 100644 index 0000000..69d01df --- /dev/null +++ b/backend/app/Http/Resources/MeetingActionItemResource.php @@ -0,0 +1,25 @@ + $this->id, + 'meeting_id' => $this->meeting_id, + 'title' => $this->title, + 'assigned_to' => $this->assigned_to, + 'assignee' => new UserResource($this->whenLoaded('assignee')), + 'due_date' => $this->due_date?->format('Y-m-d'), + 'is_completed' => $this->is_completed, + 'converted_to_task_id' => $this->converted_to_task_id, + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Http/Resources/MeetingResource.php b/backend/app/Http/Resources/MeetingResource.php new file mode 100644 index 0000000..321441d --- /dev/null +++ b/backend/app/Http/Resources/MeetingResource.php @@ -0,0 +1,34 @@ + $this->id, + 'title' => $this->title, + 'project_id' => $this->project_id, + 'project' => new ProjectResource($this->whenLoaded('project')), + 'date' => $this->date?->format('Y-m-d'), + 'start_time' => $this->start_time, + 'end_time' => $this->end_time, + 'location' => $this->location, + 'meeting_link' => $this->meeting_link, + 'meeting_type' => $this->meeting_type, + 'agenda' => $this->agenda, + 'notes' => $this->notes, + 'decisions' => $this->decisions, + 'participants' => UserResource::collection($this->whenLoaded('participants')), + 'action_items' => MeetingActionItemResource::collection($this->whenLoaded('actionItems')), + 'created_by' => $this->created_by, + 'creator' => new UserResource($this->whenLoaded('creator')), + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Http/Resources/NotificationResource.php b/backend/app/Http/Resources/NotificationResource.php new file mode 100644 index 0000000..840aaf0 --- /dev/null +++ b/backend/app/Http/Resources/NotificationResource.php @@ -0,0 +1,27 @@ + $this->id, + 'type' => $this->type, + 'title' => $this->title, + 'body' => $this->body, + 'data' => $this->data, + 'message' => $this->title, + 'notifiable_type' => $this->notifiable_type, + 'notifiable_id' => $this->notifiable_id, + 'is_read' => $this->is_read, + 'read_at' => $this->read_at, + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Http/Resources/PermissionResource.php b/backend/app/Http/Resources/PermissionResource.php new file mode 100644 index 0000000..c337e71 --- /dev/null +++ b/backend/app/Http/Resources/PermissionResource.php @@ -0,0 +1,21 @@ + $this->id, + 'name' => $this->name, + 'display_name' => $this->display_name, + 'module' => $this->module, + 'guard_name' => $this->guard_name, + 'created_at' => $this->created_at, + ]; + } +} diff --git a/backend/app/Http/Resources/ProjectResource.php b/backend/app/Http/Resources/ProjectResource.php new file mode 100644 index 0000000..5344af3 --- /dev/null +++ b/backend/app/Http/Resources/ProjectResource.php @@ -0,0 +1,46 @@ + $this->id, + 'title' => $this->title, + 'description' => $this->description, + 'client' => $this->client, + 'project_manager_id' => $this->project_manager_id, + 'project_manager' => new UserResource($this->whenLoaded('projectManager')), + 'department_id' => $this->department_id, + 'department' => $this->whenLoaded('department', fn() => [ + 'id' => $this->department?->id, + 'name' => $this->department?->name, + 'type' => $this->department?->type, + ]), + 'members' => UserResource::collection($this->whenLoaded('members')), + 'start_date' => $this->start_date?->format('Y-m-d'), + 'end_date' => $this->end_date?->format('Y-m-d'), + 'priority' => $this->priority, + 'status' => $this->status, + 'progress' => $this->progress, + 'risk_level' => $this->risk_level, + 'budget' => $this->budget, + 'estimated_hours' => $this->estimated_hours, + 'actual_hours' => $this->actual_hours, + 'tags' => $this->tags, + 'notes' => $this->notes, + 'is_archived' => $this->is_archived, + 'created_by' => $this->created_by, + 'creator' => new UserResource($this->whenLoaded('creator')), + 'tasks_count' => $this->when($this->tasks_count !== null, $this->tasks_count), + 'meetings_count' => $this->when($this->meetings_count !== null, $this->meetings_count), + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Http/Resources/RoleResource.php b/backend/app/Http/Resources/RoleResource.php new file mode 100644 index 0000000..e8da927 --- /dev/null +++ b/backend/app/Http/Resources/RoleResource.php @@ -0,0 +1,24 @@ + $this->id, + 'name' => $this->name, + 'display_name' => $this->display_name, + 'description' => $this->description, + 'guard_name' => $this->guard_name, + 'permissions' => PermissionResource::collection($this->whenLoaded('permissions')), + 'users_count' => $this->when($this->users_count !== null, $this->users_count), + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Http/Resources/SprintResource.php b/backend/app/Http/Resources/SprintResource.php new file mode 100644 index 0000000..2058643 --- /dev/null +++ b/backend/app/Http/Resources/SprintResource.php @@ -0,0 +1,44 @@ +whenLoaded('tasks', fn() => $this->tasks->count(), 0); + $completedTasks = $this->whenLoaded('tasks', fn() => $this->tasks->where('status', 'done')->count(), 0); + $remainingTasks = max($totalTasks - $completedTasks, 0); + + return [ + 'id' => $this->id, + 'title' => $this->title, + 'project_id' => $this->project_id, + 'project' => new ProjectResource($this->whenLoaded('project')), + 'goal' => $this->goal, + 'capacity_hours' => $this->capacity_hours, + 'start_date' => $this->start_date?->format('Y-m-d'), + 'end_date' => $this->end_date?->format('Y-m-d'), + 'status' => $this->status, + 'tasks' => TaskResource::collection($this->whenLoaded('tasks')), + 'members' => UserResource::collection($this->whenLoaded('members')), + 'retrospective' => $this->whenLoaded('retrospective', fn() => [ + 'went_well' => $this->retrospective?->went_well, + 'problems' => $this->retrospective?->problems, + 'improvements' => $this->retrospective?->improvements, + ]), + 'total_tasks' => $totalTasks, + 'completed_tasks' => $completedTasks, + 'remaining_tasks' => $remainingTasks, + 'progress' => $totalTasks > 0 ? round(($completedTasks / $totalTasks) * 100, 2) : 0, + 'completed_at' => $this->completed_at?->toDateTimeString(), + 'completion_summary' => $this->completion_summary, + 'created_by' => $this->created_by, + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Http/Resources/SubtaskResource.php b/backend/app/Http/Resources/SubtaskResource.php new file mode 100644 index 0000000..996787d --- /dev/null +++ b/backend/app/Http/Resources/SubtaskResource.php @@ -0,0 +1,26 @@ + $this->id, + 'task_id' => $this->task_id, + 'title' => $this->title, + 'description' => $this->description, + 'assignee_id' => $this->assignee_id, + 'assignee' => new UserResource($this->whenLoaded('assignee')), + 'status' => $this->status, + 'due_date' => $this->due_date, + 'position' => $this->position, + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Http/Resources/TaskResource.php b/backend/app/Http/Resources/TaskResource.php new file mode 100644 index 0000000..d122862 --- /dev/null +++ b/backend/app/Http/Resources/TaskResource.php @@ -0,0 +1,41 @@ + $this->id, + 'title' => $this->title, + 'description' => $this->description, + 'project_id' => $this->project_id, + 'project' => new ProjectResource($this->whenLoaded('project')), + 'assignee_id' => $this->assignee_id, + 'assignee' => new UserResource($this->whenLoaded('assignee')), + 'reporter_id' => $this->reporter_id, + 'reporter' => new UserResource($this->whenLoaded('reporter')), + 'priority' => $this->priority, + 'status' => $this->status, + 'blocker_type' => $this->blocker_type, + 'blocker_note' => $this->blocker_note, + 'start_date' => $this->start_date?->format('Y-m-d'), + 'due_date' => $this->due_date?->format('Y-m-d'), + 'estimated_time' => $this->estimated_time, + 'actual_time' => $this->actual_time, + 'tags' => $this->tags, + 'sort_order' => $this->sort_order, + 'checklists' => ChecklistResource::collection($this->whenLoaded('checklists')), + 'subtasks' => SubtaskResource::collection($this->whenLoaded('subtasks')), + 'comments_count' => $this->when($this->comments_count !== null, $this->comments_count), + 'files_count' => $this->when($this->files_count !== null, $this->files_count), + 'created_by' => $this->created_by, + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Http/Resources/UserResource.php b/backend/app/Http/Resources/UserResource.php new file mode 100644 index 0000000..a51b2dc --- /dev/null +++ b/backend/app/Http/Resources/UserResource.php @@ -0,0 +1,41 @@ + $this->id, + 'name' => $this->name, + 'email' => $this->email, + 'phone' => $this->phone, + 'job_title' => $this->job_title, + 'department' => $this->department, + 'department_id' => $this->department_id, + 'department_name' => $this->when($this->relationLoaded('dept'), fn() => $this->dept?->name), + 'departments' => $this->when($this->relationLoaded('departments'), fn() => $this->departments->map(fn($department) => [ + 'id' => $department->id, + 'name' => $department->name, + 'type' => $department->type, + 'role_in_team' => $department->pivot?->role_in_team, + 'is_primary' => (bool) $department->pivot?->is_primary, + 'joined_at' => $department->pivot?->joined_at, + ])->values()), + 'status' => $this->status, + 'skills' => $this->skills, + 'avatar' => $this->avatar, + 'avatar_url' => $this->avatar ? asset('storage/' . $this->avatar) : null, + 'role_id' => $this->role_id, + 'role' => new RoleResource($this->whenLoaded('role')), + 'roles' => RoleResource::collection($this->whenLoaded('roles')), + 'projects_count' => $this->when($this->projects_count !== null, $this->projects_count), + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]; + } +} diff --git a/backend/app/Models/ActivityLog.php b/backend/app/Models/ActivityLog.php new file mode 100644 index 0000000..ca0aa3d --- /dev/null +++ b/backend/app/Models/ActivityLog.php @@ -0,0 +1,23 @@ + 'array', + ]; + + public function user(): BelongsTo + { + return $this->belongsTo(User::class); + } +} diff --git a/backend/app/Models/BacklogItem.php b/backend/app/Models/BacklogItem.php new file mode 100644 index 0000000..9220a00 --- /dev/null +++ b/backend/app/Models/BacklogItem.php @@ -0,0 +1,29 @@ +belongsTo(Project::class); + } + + public function assignedSprint(): BelongsTo + { + return $this->belongsTo(Sprint::class, 'assigned_sprint_id'); + } + + public function creator(): BelongsTo + { + return $this->belongsTo(User::class, 'created_by'); + } +} diff --git a/backend/app/Models/Checklist.php b/backend/app/Models/Checklist.php new file mode 100644 index 0000000..757d7af --- /dev/null +++ b/backend/app/Models/Checklist.php @@ -0,0 +1,20 @@ + 'boolean', + ]; + + public function task(): BelongsTo + { + return $this->belongsTo(Task::class); + } +} diff --git a/backend/app/Models/Comment.php b/backend/app/Models/Comment.php new file mode 100644 index 0000000..2a06b24 --- /dev/null +++ b/backend/app/Models/Comment.php @@ -0,0 +1,28 @@ +belongsTo(User::class); + } + + public function commentable(): MorphTo + { + return $this->morphTo(); + } + + public function files(): MorphMany + { + return $this->morphMany(File::class, 'fileable'); + } +} diff --git a/backend/app/Models/Department.php b/backend/app/Models/Department.php new file mode 100644 index 0000000..08b5251 --- /dev/null +++ b/backend/app/Models/Department.php @@ -0,0 +1,45 @@ + 'boolean', + 'manager_changed_at' => 'datetime', + ]; + + public function parent(): BelongsTo + { + return $this->belongsTo(Department::class, 'parent_id'); + } + + public function children(): HasMany + { + return $this->hasMany(Department::class, 'parent_id')->orderBy('sort_order'); + } + + public function manager(): BelongsTo + { + return $this->belongsTo(User::class, 'manager_id'); + } + + public function users(): HasMany + { + return $this->hasMany(User::class, 'department_id'); + } + + public function members(): BelongsToMany + { + return $this->belongsToMany(User::class, 'department_user') + ->withPivot(['role_in_team', 'is_primary', 'joined_at']) + ->withTimestamps(); + } +} diff --git a/backend/app/Models/File.php b/backend/app/Models/File.php new file mode 100644 index 0000000..ebe187a --- /dev/null +++ b/backend/app/Models/File.php @@ -0,0 +1,22 @@ +belongsTo(User::class); + } + + public function fileable(): MorphTo + { + return $this->morphTo(); + } +} diff --git a/backend/app/Models/Meeting.php b/backend/app/Models/Meeting.php new file mode 100644 index 0000000..29cd0ae --- /dev/null +++ b/backend/app/Models/Meeting.php @@ -0,0 +1,51 @@ + 'date', + ]; + + public function project(): BelongsTo + { + return $this->belongsTo(Project::class); + } + + public function creator(): BelongsTo + { + return $this->belongsTo(User::class, 'created_by'); + } + + public function participants(): BelongsToMany + { + return $this->belongsToMany(User::class, 'meeting_user')->withTimestamps(); + } + + public function actionItems(): HasMany + { + return $this->hasMany(MeetingActionItem::class); + } + + public function comments(): MorphMany + { + return $this->morphMany(Comment::class, 'commentable'); + } + + public function files(): MorphMany + { + return $this->morphMany(File::class, 'fileable'); + } +} diff --git a/backend/app/Models/MeetingActionItem.php b/backend/app/Models/MeetingActionItem.php new file mode 100644 index 0000000..503236c --- /dev/null +++ b/backend/app/Models/MeetingActionItem.php @@ -0,0 +1,33 @@ + 'date', + 'is_completed' => 'boolean', + ]; + + public function meeting(): BelongsTo + { + return $this->belongsTo(Meeting::class); + } + + public function assignee(): BelongsTo + { + return $this->belongsTo(User::class, 'assigned_to'); + } + + public function convertedTask(): BelongsTo + { + return $this->belongsTo(Task::class, 'converted_to_task_id'); + } +} diff --git a/backend/app/Models/Notification.php b/backend/app/Models/Notification.php new file mode 100644 index 0000000..512e8a7 --- /dev/null +++ b/backend/app/Models/Notification.php @@ -0,0 +1,21 @@ + 'array', + 'is_read' => 'boolean', + 'read_at' => 'datetime', + 'remind_at' => 'datetime', + 'dismissed_at' => 'datetime', + ]; +} diff --git a/backend/app/Models/Permission.php b/backend/app/Models/Permission.php new file mode 100644 index 0000000..75e3376 --- /dev/null +++ b/backend/app/Models/Permission.php @@ -0,0 +1,16 @@ +belongsToMany(Role::class)->withTimestamps(); + } +} diff --git a/backend/app/Models/Project.php b/backend/app/Models/Project.php new file mode 100644 index 0000000..35f15a9 --- /dev/null +++ b/backend/app/Models/Project.php @@ -0,0 +1,67 @@ + 'array', + 'start_date' => 'date', + 'end_date' => 'date', + 'is_archived' => 'boolean', + 'budget' => 'decimal:2', + 'estimated_hours' => 'decimal:2', + 'actual_hours' => 'decimal:2', + ]; + + public function projectManager(): BelongsTo + { + return $this->belongsTo(User::class, 'project_manager_id'); + } + + public function department(): BelongsTo + { + return $this->belongsTo(Department::class); + } + + public function creator(): BelongsTo + { + return $this->belongsTo(User::class, 'created_by'); + } + + public function members(): BelongsToMany + { + return $this->belongsToMany(User::class, 'project_user')->withPivot('role_in_project')->withTimestamps(); + } + + public function tasks(): HasMany + { + return $this->hasMany(Task::class); + } + + public function sprints(): HasMany + { + return $this->hasMany(Sprint::class); + } + + public function meetings(): HasMany + { + return $this->hasMany(Meeting::class); + } + + public function backlogItems(): HasMany + { + return $this->hasMany(BacklogItem::class); + } +} diff --git a/backend/app/Models/Role.php b/backend/app/Models/Role.php new file mode 100644 index 0000000..cf3cddc --- /dev/null +++ b/backend/app/Models/Role.php @@ -0,0 +1,21 @@ +belongsToMany(User::class)->withTimestamps(); + } + + public function permissions(): BelongsToMany + { + return $this->belongsToMany(Permission::class)->withTimestamps(); + } +} diff --git a/backend/app/Models/Setting.php b/backend/app/Models/Setting.php new file mode 100644 index 0000000..0628d46 --- /dev/null +++ b/backend/app/Models/Setting.php @@ -0,0 +1,29 @@ + is_array($value) || is_object($value) || is_bool($value) + ? json_encode($value, JSON_UNESCAPED_UNICODE) + : $value, + ); + } +} diff --git a/backend/app/Models/Sprint.php b/backend/app/Models/Sprint.php new file mode 100644 index 0000000..e32a4fd --- /dev/null +++ b/backend/app/Models/Sprint.php @@ -0,0 +1,55 @@ + 'date', + 'end_date' => 'date', + 'capacity_hours' => 'decimal:2', + 'completed_at' => 'datetime', + 'completion_summary' => 'array', + ]; + + public function project(): BelongsTo + { + return $this->belongsTo(Project::class); + } + + public function creator(): BelongsTo + { + return $this->belongsTo(User::class, 'created_by'); + } + + public function tasks(): BelongsToMany + { + return $this->belongsToMany(Task::class, 'sprint_task')->withTimestamps(); + } + + public function members(): BelongsToMany + { + return $this->belongsToMany(User::class, 'sprint_members')->withTimestamps(); + } + + public function retrospective(): HasOne + { + return $this->hasOne(SprintRetrospective::class); + } + + public function backlogItems(): HasMany + { + return $this->hasMany(BacklogItem::class, 'assigned_sprint_id'); + } +} diff --git a/backend/app/Models/SprintRetrospective.php b/backend/app/Models/SprintRetrospective.php new file mode 100644 index 0000000..7938fc8 --- /dev/null +++ b/backend/app/Models/SprintRetrospective.php @@ -0,0 +1,23 @@ +belongsTo(Sprint::class); + } + + public function updater(): BelongsTo + { + return $this->belongsTo(User::class, 'updated_by'); + } +} diff --git a/backend/app/Models/Subtask.php b/backend/app/Models/Subtask.php new file mode 100644 index 0000000..8136a7f --- /dev/null +++ b/backend/app/Models/Subtask.php @@ -0,0 +1,25 @@ + 'date', + ]; + + public function task(): BelongsTo + { + return $this->belongsTo(Task::class); + } + + public function assignee(): BelongsTo + { + return $this->belongsTo(User::class, 'assignee_id'); + } +} diff --git a/backend/app/Models/Task.php b/backend/app/Models/Task.php new file mode 100644 index 0000000..4c32667 --- /dev/null +++ b/backend/app/Models/Task.php @@ -0,0 +1,70 @@ + 'array', + 'start_date' => 'date', + 'due_date' => 'date', + 'estimated_time' => 'decimal:2', + 'actual_time' => 'decimal:2', + ]; + + public function project(): BelongsTo + { + return $this->belongsTo(Project::class); + } + + public function assignee(): BelongsTo + { + return $this->belongsTo(User::class, 'assignee_id'); + } + + public function reporter(): BelongsTo + { + return $this->belongsTo(User::class, 'reporter_id'); + } + + public function creator(): BelongsTo + { + return $this->belongsTo(User::class, 'created_by'); + } + + public function checklists(): HasMany + { + return $this->hasMany(Checklist::class); + } + + public function subtasks(): HasMany + { + return $this->hasMany(Subtask::class); + } + + public function comments(): MorphMany + { + return $this->morphMany(Comment::class, 'commentable'); + } + + public function files(): MorphMany + { + return $this->morphMany(File::class, 'fileable'); + } + + public function sprints() + { + return $this->belongsToMany(Sprint::class, 'sprint_task')->withTimestamps(); + } +} diff --git a/backend/app/Models/User.php b/backend/app/Models/User.php new file mode 100644 index 0000000..e321f10 --- /dev/null +++ b/backend/app/Models/User.php @@ -0,0 +1,113 @@ + */ + use HasApiTokens, HasFactory, Notifiable; + + protected $fillable = [ + 'name', 'email', 'password', 'role_id', 'phone', 'job_title', + 'department', 'department_id', 'status', 'skills', 'avatar', + ]; + + protected $hidden = [ + 'password', 'remember_token', + ]; + + protected function casts(): array + { + return [ + 'email_verified_at' => 'datetime', + 'password' => 'hashed', + 'skills' => 'array', + ]; + } + + public function role(): BelongsTo + { + return $this->belongsTo(Role::class); + } + + public function dept(): BelongsTo + { + return $this->belongsTo(Department::class, 'department_id'); + } + + public function departments(): BelongsToMany + { + return $this->belongsToMany(Department::class, 'department_user') + ->withPivot(['role_in_team', 'is_primary', 'joined_at']) + ->withTimestamps(); + } + + public function roles(): BelongsToMany + { + return $this->belongsToMany(Role::class, 'role_user')->withTimestamps(); + } + + public function hasPermission(string $permission): bool + { + foreach ($this->roles as $role) { + if ($role->permissions->contains('name', $permission)) { + return true; + } + } + return false; + } + + public function hasAnyPermission(array $permissions): bool + { + foreach ($permissions as $permission) { + if ($this->hasPermission($permission)) { + return true; + } + } + return false; + } + + public function managedProjects(): HasMany + { + return $this->hasMany(Project::class, 'project_manager_id'); + } + + public function projects(): BelongsToMany + { + return $this->belongsToMany(Project::class, 'project_user')->withPivot('role_in_project')->withTimestamps(); + } + + public function tasks(): HasMany + { + return $this->hasMany(Task::class, 'assignee_id'); + } + + public function reportedTasks(): HasMany + { + return $this->hasMany(Task::class, 'reporter_id'); + } + + public function comments(): HasMany + { + return $this->hasMany(Comment::class); + } + + public function notifications(): HasMany + { + return $this->hasMany(Notification::class); + } + + public function activityLogs(): HasMany + { + return $this->hasMany(ActivityLog::class); + } +} diff --git a/backend/app/Policies/MeetingPolicy.php b/backend/app/Policies/MeetingPolicy.php new file mode 100644 index 0000000..ce37093 --- /dev/null +++ b/backend/app/Policies/MeetingPolicy.php @@ -0,0 +1,28 @@ +hasPermission('view_meetings'); + } + + public function create(User $user): bool + { + return $user->hasPermission('create_meetings'); + } + + public function update(User $user): bool + { + return $user->hasPermission('edit_meetings'); + } + + public function delete(User $user): bool + { + return $user->hasPermission('delete_meetings'); + } +} diff --git a/backend/app/Policies/ProjectPolicy.php b/backend/app/Policies/ProjectPolicy.php new file mode 100644 index 0000000..a31984b --- /dev/null +++ b/backend/app/Policies/ProjectPolicy.php @@ -0,0 +1,28 @@ +hasPermission('view_projects'); + } + + public function create(User $user): bool + { + return $user->hasPermission('create_projects'); + } + + public function update(User $user): bool + { + return $user->hasPermission('edit_projects'); + } + + public function delete(User $user): bool + { + return $user->hasPermission('delete_projects'); + } +} diff --git a/backend/app/Policies/SprintPolicy.php b/backend/app/Policies/SprintPolicy.php new file mode 100644 index 0000000..4855cd6 --- /dev/null +++ b/backend/app/Policies/SprintPolicy.php @@ -0,0 +1,28 @@ +hasPermission('view_sprints'); + } + + public function create(User $user): bool + { + return $user->hasPermission('create_sprints'); + } + + public function update(User $user): bool + { + return $user->hasPermission('edit_sprints'); + } + + public function delete(User $user): bool + { + return $user->hasPermission('delete_sprints'); + } +} diff --git a/backend/app/Policies/TaskPolicy.php b/backend/app/Policies/TaskPolicy.php new file mode 100644 index 0000000..d976d11 --- /dev/null +++ b/backend/app/Policies/TaskPolicy.php @@ -0,0 +1,28 @@ +hasPermission('view_tasks'); + } + + public function create(User $user): bool + { + return $user->hasPermission('create_tasks'); + } + + public function update(User $user): bool + { + return $user->hasPermission('edit_tasks'); + } + + public function delete(User $user): bool + { + return $user->hasPermission('delete_tasks'); + } +} diff --git a/backend/app/Policies/UserPolicy.php b/backend/app/Policies/UserPolicy.php new file mode 100644 index 0000000..68290ba --- /dev/null +++ b/backend/app/Policies/UserPolicy.php @@ -0,0 +1,28 @@ +hasPermission('view_team'); + } + + public function create(User $user): bool + { + return $user->hasPermission('create_team'); + } + + public function update(User $user): bool + { + return $user->hasPermission('edit_team'); + } + + public function delete(User $user): bool + { + return $user->hasPermission('delete_team'); + } +} diff --git a/backend/app/Providers/AppServiceProvider.php b/backend/app/Providers/AppServiceProvider.php new file mode 100644 index 0000000..9d6980a --- /dev/null +++ b/backend/app/Providers/AppServiceProvider.php @@ -0,0 +1,44 @@ +app->singleton(ActivityLogService::class); + $this->app->singleton(NotificationService::class); + $this->app->singleton(DashboardService::class); + $this->app->singleton(ReportService::class); + $this->app->singleton(ProjectProgressService::class); + $this->app->singleton(WorkloadService::class); + } + + public function boot(): void + { + RateLimiter::for('login', function (Request $request) { + $identifier = Str::lower((string) $request->input('identifier', $request->input('email'))); + + return [ + Limit::perMinute(5)->by($identifier.'|'.$request->ip()), + Limit::perMinute(20)->by($request->ip()), + ]; + }); + + RateLimiter::for('sensitive', function (Request $request) { + return Limit::perMinute(30)->by(optional($request->user())->id ?: $request->ip()); + }); + } +} diff --git a/backend/app/Services/ActivityLogService.php b/backend/app/Services/ActivityLogService.php new file mode 100644 index 0000000..57268e8 --- /dev/null +++ b/backend/app/Services/ActivityLogService.php @@ -0,0 +1,22 @@ + $userId, + 'action' => $action, + 'description' => $description, + 'subject_type' => $subjectType, + 'subject_id' => $subjectId, + 'project_id' => $projectId, + 'task_id' => $taskId, + 'properties' => $properties, + ]); + } +} diff --git a/backend/app/Services/DashboardService.php b/backend/app/Services/DashboardService.php new file mode 100644 index 0000000..ca2bce4 --- /dev/null +++ b/backend/app/Services/DashboardService.php @@ -0,0 +1,162 @@ +where('is_archived', false)->count(); + $completedProjects = Project::where('status', 'done')->count(); + $today = Carbon::today(); + $delayedProjects = Project::whereDate('end_date', '<', $today)->where('status', '!=', 'done')->where('is_archived', false)->count(); + + $openTasks = Task::whereNotIn('status', ['done', 'canceled'])->count(); + $completedTasks = Task::where('status', 'done')->count(); + $delayedTasks = Task::whereDate('due_date', '<', $today)->where('status', '!=', 'done')->count(); + + $teamPerformance = []; + $workload = []; + + $riskyProjects = Project::whereIn('risk_level', ['high', 'critical'])->where('is_archived', false)->limit(5)->get(); + + $upcomingDeadlines = Task::with('project') + ->whereDate('due_date', '>=', $today) + ->whereDate('due_date', '<=', $today->copy()->addDays(7)) + ->where('status', '!=', 'done') + ->orderBy('due_date') + ->limit(10) + ->get() + ->map(fn($t) => [ + 'id' => $t->id, + 'title' => $t->title, + 'project' => $t->project?->title, + 'due_date' => $t->due_date?->format('Y-m-d'), + 'days_left' => $today->diffInDays($t->due_date, false), + ]); + + $recentActivities = ActivityLog::with('user') + ->orderBy('created_at', 'desc') + ->limit(10) + ->get() + ->map(fn($log) => [ + 'id' => $log->id, + 'description' => $log->description, + 'user' => $log->user?->name ?? '?', + 'created_at' => $log->created_at?->toDateTimeString(), + 'time_ago' => $log->created_at?->diffForHumans(), + ]); + + $myTasks = collect(); + if ($user) { + $myTasks = Task::where('assignee_id', $user->id) + ->where('status', '!=', 'done') + ->orderBy('due_date') + ->limit(10) + ->get(); + } + + $activeSprint = null; + if ($user) { + $sprint = Sprint::with(['project', 'tasks.assignee']) + ->where('status', 'active') + ->whereHas('members', fn($query) => $query->where('users.id', $user->id)) + ->orderBy('end_date') + ->first(); + + if ($sprint) { + $totalTasks = $sprint->tasks->count(); + $completedTasks = $sprint->tasks->where('status', 'done')->count(); + $activeSprint = [ + 'id' => $sprint->id, + 'title' => $sprint->title, + 'project' => $sprint->project?->title, + 'end_date' => $sprint->end_date?->format('Y-m-d'), + 'remaining_days' => max(Carbon::today()->diffInDays($sprint->end_date, false), 0), + 'progress' => $totalTasks > 0 ? round(($completedTasks / $totalTasks) * 100, 2) : 0, + 'my_tasks' => $sprint->tasks + ->where('assignee_id', $user->id) + ->values() + ->map(fn($task) => [ + 'id' => $task->id, + 'title' => $task->title, + 'status' => $task->status, + ]), + ]; + } + } + + $todayMeetings = Meeting::whereDate('date', Carbon::today())->count(); + $teamMembers = \App\Models\User::count(); + + $projectProgresses = Project::where('is_archived', false) + ->select(['id', 'title', 'progress', 'status']) + ->limit(10) + ->get(); + + return [ + 'activeProjects' => $activeProjects, + 'completedProjects' => $completedProjects, + 'delayedProjects' => $delayedProjects, + 'openTasks' => $openTasks, + 'completedTasks' => $completedTasks, + 'delayedTasks' => $delayedTasks, + 'teamPerformance' => $teamPerformance, + 'workload' => $workload, + 'riskyProjects' => $riskyProjects, + 'upcomingDeadlines' => $upcomingDeadlines, + 'recentActivities' => $recentActivities, + 'myTasks' => $myTasks, + 'todayMeetings' => $todayMeetings, + 'teamMembers' => $teamMembers, + 'projectProgresses' => $projectProgresses, + 'activeSprint' => $activeSprint, + ]; + } + + public function getChartData() + { + $months = collect(); + $taskCreationData = []; + $taskCompletionData = []; + + for ($i = 5; $i >= 0; $i--) { + $month = Carbon::now()->subMonths($i); + $monthName = $month->format('Y-m'); + $months->push($monthName); + + $taskCreationData[] = Task::whereYear('created_at', $month->year) + ->whereMonth('created_at', $month->month) + ->count(); + + $taskCompletionData[] = Task::where('status', 'done') + ->whereYear('updated_at', $month->year) + ->whereMonth('updated_at', $month->month) + ->count(); + } + + $monthlyTasks = []; + foreach ($months as $i => $month) { + $monthlyTasks[] = [ + 'month' => $month, + 'created' => $taskCreationData[$i], + 'completed' => $taskCompletionData[$i], + ]; + } + + return [ + 'labels' => $months->values(), + 'taskCreation' => $taskCreationData, + 'taskCompletion' => $taskCompletionData, + 'monthlyTasks' => $monthlyTasks, + 'monthly_tasks' => $monthlyTasks, + ]; + } +} diff --git a/backend/app/Services/NotificationService.php b/backend/app/Services/NotificationService.php new file mode 100644 index 0000000..2fe8e07 --- /dev/null +++ b/backend/app/Services/NotificationService.php @@ -0,0 +1,25 @@ + $userId, + 'type' => $type, + 'title' => $message, + 'body' => is_array($data) ? null : $data, + 'data' => $payload, + 'notifiable_type' => $payload['notifiable_type'] ?? null, + 'notifiable_id' => $payload['notifiable_id'] ?? null, + 'is_read' => false, + 'read_at' => null, + ]); + } +} diff --git a/backend/app/Services/ProjectProgressService.php b/backend/app/Services/ProjectProgressService.php new file mode 100644 index 0000000..41014ef --- /dev/null +++ b/backend/app/Services/ProjectProgressService.php @@ -0,0 +1,27 @@ +count(); + + if ($totalTasks === 0) { + $project->update(['progress' => 0]); + return 0; + } + + $completedTasks = Task::where('project_id', $projectId)->where('status', 'done')->count(); + $progress = round(($completedTasks / $totalTasks) * 100, 2); + + $project->update(['progress' => $progress]); + + return $progress; + } +} diff --git a/backend/app/Services/ReportService.php b/backend/app/Services/ReportService.php new file mode 100644 index 0000000..38ad7f0 --- /dev/null +++ b/backend/app/Services/ReportService.php @@ -0,0 +1,247 @@ +where($dateField, '>=', $filters['date_from']); + } + if (!empty($filters['date_to'])) { + $query->where($dateField, '<=', $filters['date_to']); + } + return $query; + } + + public function projectStatus($filters = []) + { + $query = Project::query(); + + if (!empty($filters['status'])) { + $query->where('status', $filters['status']); + } + if (!empty($filters['project_id'])) { + $query->where('id', $filters['project_id']); + } + + $projects = $query->get(); + $grouped = $projects->groupBy('status'); + + return $grouped->map(fn($items, $status) => [ + 'status' => $status === 'planning' ? 'برنامه‌ریزی' : ($status === 'in_progress' ? 'در حال انجام' : ($status === 'done' ? 'تکمیل شده' : ($status === 'on_hold' ? 'متوقف' : $status))), + 'count' => $items->count(), + 'label' => $status, + 'value' => $items->count(), + ])->values(); + } + + public function delayedTasks($filters = []) + { + $query = Task::with(['project:id,title', 'assignee:id,name']) + ->whereDate('due_date', '<', Carbon::today()) + ->where('status', '!=', 'done'); + + $query = $this->applyDateFilters($query, $filters, 'due_date'); + + if (!empty($filters['project_id'])) { + $query->where('project_id', $filters['project_id']); + } + if (!empty($filters['user_id'])) { + $query->where('assignee_id', $filters['user_id']); + } + if (!empty($filters['status'])) { + $query->where('status', $filters['status']); + } + + return $query->orderBy('due_date')->get()->map(fn($t) => [ + 'id' => $t->id, + 'title' => $t->title, + 'project' => ['title' => $t->project?->title], + 'project_name' => $t->project?->title, + 'assignee' => ['name' => $t->assignee?->name], + 'assignee_name' => $t->assignee?->name, + 'due_date' => $t->due_date?->format('Y-m-d'), + 'delay_days' => abs(Carbon::today()->diffInDays($t->due_date, false)), + 'days_delayed' => abs(Carbon::today()->diffInDays($t->due_date, false)), + 'priority' => $t->priority, + ]); + } + + public function teamPerformance($filters = []) + { + $query = User::with(['tasks' => function ($q) use ($filters) { + if (!empty($filters['date_from'])) { + $q->where('created_at', '>=', $filters['date_from']); + } + if (!empty($filters['date_to'])) { + $q->where('created_at', '<=', $filters['date_to']); + } + }]); + + if (!empty($filters['user_id'])) { + $query->where('id', $filters['user_id']); + } + + $users = $query->get(); + + return $users->map(function ($user) { + $totalTasks = $user->tasks->count(); + $completedTasks = $user->tasks->where('status', 'done')->count(); + $delayedTasks = $user->tasks->where('due_date', '<', Carbon::now())->where('status', '!=', 'done')->count(); + $inProgress = $user->tasks->whereNotIn('status', ['done', 'canceled'])->count(); + return [ + 'name' => $user->name, + 'completed' => $completedTasks, + 'in_progress' => $inProgress, + 'delayed' => $delayedTasks, + 'total' => $totalTasks, + ]; + }); + } + + public function workload($filters = []) + { + $query = User::query(); + + if (!empty($filters['user_id'])) { + $query->where('id', $filters['user_id']); + } + + $users = $query->get(); + + $allActiveTasks = Task::where('status', '!=', 'done')->count(); + $maxTasks = max($allActiveTasks, 1); + + return $users->map(function ($user) use ($maxTasks) { + $activeTasks = Task::where('assignee_id', $user->id)->where('status', '!=', 'done')->count(); + $loadPercent = min(round(($activeTasks / $maxTasks) * 100), 100); + + return [ + 'user_id' => $user->id, + 'name' => $user->name, + 'tasks_count' => $activeTasks, + 'total' => $activeTasks, + 'load_percent' => $loadPercent, + 'load' => $loadPercent, + ]; + }); + } + + public function sprintProgress($filters = []) + { + $query = Sprint::with(['project:id,title', 'tasks']); + + if (!empty($filters['project_id'])) { + $query->where('project_id', $filters['project_id']); + } + if (!empty($filters['status'])) { + $query->where('status', $filters['status']); + } + + $sprints = $query->get(); + + return $sprints->map(function ($sprint) { + $totalTasks = $sprint->tasks->count(); + $completedTasks = $sprint->tasks->where('status', 'done')->count(); + return [ + 'id' => $sprint->id, + 'title' => $sprint->title, + 'project' => $sprint->project?->title, + 'start_date' => $sprint->start_date, + 'end_date' => $sprint->end_date, + 'status' => $sprint->status, + 'total_tasks' => $totalTasks, + 'completed_tasks' => $completedTasks, + 'progress' => $totalTasks > 0 ? round(($completedTasks / $totalTasks) * 100, 2) : 0, + ]; + }); + } + + public function timeEstimate($filters = []) + { + $query = Task::with('project'); + $query = $this->applyDateFilters($query, $filters); + + if (!empty($filters['project_id'])) { + $query->where('project_id', $filters['project_id']); + } + if (!empty($filters['user_id'])) { + $query->where('assignee_id', $filters['user_id']); + } + if (!empty($filters['status'])) { + $query->where('status', $filters['status']); + } + + $tasks = $query->get(); + + return $tasks->map(function ($task) { + $diff = ($task->estimated_time ?? 0) - ($task->actual_time ?? 0); + return [ + 'id' => $task->id, + 'title' => $task->title, + 'project' => ['title' => $task->project?->title ?? '—'], + 'estimated' => $task->estimated_time, + 'estimated_time' => $task->estimated_time, + 'actual' => $task->actual_time, + 'actual_time' => $task->actual_time, + 'diff' => $diff, + 'difference' => $diff, + 'status' => $task->status, + ]; + }); + } + + public function recentActivities($filters = []) + { + $query = ActivityLog::with('user'); + $query = $this->applyDateFilters($query, $filters); + + if (!empty($filters['project_id'])) { + $query->where('project_id', $filters['project_id']); + } + if (!empty($filters['user_id'])) { + $query->where('user_id', $filters['user_id']); + } + if (!empty($filters['action'])) { + $query->where('action', $filters['action']); + } + + return $query->orderBy('created_at', 'desc')->limit(50)->get()->map(fn($log) => [ + 'id' => $log->id, + 'description' => $log->description, + 'user' => $log->user?->name ?? '?', + 'user_name' => $log->user?->name ?? '?', + 'created_at' => $log->created_at?->toDateTimeString(), + 'time_ago' => $log->created_at?->diffForHumans(), + ]); + } + + public function riskyProjects($filters = []) + { + $query = Project::whereIn('risk_level', ['high', 'critical'])->where('is_archived', false); + + if (!empty($filters['status'])) { + $query->where('status', $filters['status']); + } + if (!empty($filters['project_id'])) { + $query->where('id', $filters['project_id']); + } + + return $query->with('projectManager:id,name')->get()->map(fn($p) => [ + 'id' => $p->id, + 'title' => $p->title, + 'risk_level' => $p->risk_level, + 'progress' => $p->progress, + 'delayed_tasks' => Task::where('project_id', $p->id)->where('due_date', '<', Carbon::now())->where('status', '!=', 'done')->count(), + ]); + } +} diff --git a/backend/app/Services/WorkloadService.php b/backend/app/Services/WorkloadService.php new file mode 100644 index 0000000..4ae10cd --- /dev/null +++ b/backend/app/Services/WorkloadService.php @@ -0,0 +1,35 @@ +map(function ($user) { + $activeTasks = Task::where('assignee_id', $user->id)->where('status', '!=', 'done')->count(); + $delayedTasks = Task::where('assignee_id', $user->id) + ->where('due_date', '<', Carbon::now()) + ->where('status', '!=', 'done') + ->count(); + $estimatedHours = Task::where('assignee_id', $user->id)->sum('estimated_time'); + $actualHours = Task::where('assignee_id', $user->id)->sum('actual_time'); + + return [ + 'user_id' => $user->id, + 'user_name' => $user->name, + 'active_tasks' => $activeTasks, + 'delayed_tasks' => $delayedTasks, + 'estimated_hours' => (float) $estimatedHours, + 'actual_hours' => (float) $actualHours, + 'workload_percentage' => $estimatedHours > 0 ? round(($actualHours / $estimatedHours) * 100, 2) : 0, + ]; + }); + } +} diff --git a/backend/artisan b/backend/artisan new file mode 100644 index 0000000..c35e31d --- /dev/null +++ b/backend/artisan @@ -0,0 +1,18 @@ +#!/usr/bin/env php +handleCommand(new ArgvInput); + +exit($status); diff --git a/backend/bootstrap/app.php b/backend/bootstrap/app.php new file mode 100644 index 0000000..4a38840 --- /dev/null +++ b/backend/bootstrap/app.php @@ -0,0 +1,35 @@ +withRouting( + web: __DIR__.'/../routes/web.php', + api: __DIR__.'/../routes/api.php', + commands: __DIR__.'/../routes/console.php', + health: '/up', + ) + ->withMiddleware(function (Middleware $middleware): void { + $middleware->append(SecurityHeaders::class); + $middleware->alias([ + 'permission' => EnsureUserHasPermission::class, + ]); + }) + ->withExceptions(function (Exceptions $exceptions): void { + $exceptions->render(function (AuthenticationException $e, Request $request) { + if ($request->is('api/*') || $request->expectsJson()) { + return response()->json([ + 'success' => false, + 'message' => 'Unauthenticated.', + ], 401); + } + + return null; + }); + })->create(); diff --git a/backend/bootstrap/cache/.gitignore b/backend/bootstrap/cache/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/backend/bootstrap/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/backend/bootstrap/providers.php b/backend/bootstrap/providers.php new file mode 100644 index 0000000..fc94ae6 --- /dev/null +++ b/backend/bootstrap/providers.php @@ -0,0 +1,7 @@ +=5.0.0" + }, + "require-dev": { + "doctrine/dbal": "^4.0.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2024-02-09T16:56:22+00:00" + }, + { + "name": "dflydev/dot-access-data", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/a23a2bf4f31d3518f3ecb38660c95715dfead60f", + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.42", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", + "scrutinizer/ocular": "1.6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Dflydev\\DotAccessData\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + }, + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "support": { + "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.3" + }, + "time": "2024-07-08T12:26:09+00:00" + }, + { + "name": "doctrine/inflector", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "6d6c96277ea252fc1304627204c3d5e6e15faa3b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/6d6c96277ea252fc1304627204c3d5e6e15faa3b", + "reference": "6d6c96277ea252fc1304627204c3d5e6e15faa3b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^12.0 || ^13.0", + "phpstan/phpstan": "^1.12 || ^2.0", + "phpstan/phpstan-phpunit": "^1.4 || ^2.0", + "phpstan/phpstan-strict-rules": "^1.6 || ^2.0", + "phpunit/phpunit": "^8.5 || ^12.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.1.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2025-08-10T19:31:58+00:00" + }, + { + "name": "doctrine/lexer", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.21" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/3.0.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2024-02-05T11:56:58+00:00" + }, + { + "name": "dragonmantank/cron-expression", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/dragonmantank/cron-expression.git", + "reference": "d61a8a9604ec1f8c3d150d09db6ce98b32675013" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/d61a8a9604ec1f8c3d150d09db6ce98b32675013", + "reference": "d61a8a9604ec1f8c3d150d09db6ce98b32675013", + "shasum": "" + }, + "require": { + "php": "^8.2|^8.3|^8.4|^8.5" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.32|^2.1.31", + "phpunit/phpunit": "^8.5.48|^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Tankersley", + "email": "chris@ctankersley.com", + "homepage": "https://github.com/dragonmantank" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "support": { + "issues": "https://github.com/dragonmantank/cron-expression/issues", + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://github.com/dragonmantank", + "type": "github" + } + ], + "time": "2025-10-31T18:51:33+00:00" + }, + { + "name": "egulias/email-validator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^2.0 || ^3.0", + "php": ">=8.1", + "symfony/polyfill-intl-idn": "^1.26" + }, + "require-dev": { + "phpunit/phpunit": "^10.2", + "vimeo/psalm": "^5.12" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], + "time": "2025-03-06T22:45:56+00:00" + }, + { + "name": "fruitcake/php-cors", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/fruitcake/php-cors.git", + "reference": "38aaa6c3fd4c157ffe2a4d10aa8b9b16ba8de379" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/38aaa6c3fd4c157ffe2a4d10aa8b9b16ba8de379", + "reference": "38aaa6c3fd4c157ffe2a4d10aa8b9b16ba8de379", + "shasum": "" + }, + "require": { + "php": "^8.1", + "symfony/http-foundation": "^5.4|^6.4|^7.3|^8" + }, + "require-dev": { + "phpstan/phpstan": "^2", + "phpunit/phpunit": "^9", + "squizlabs/php_codesniffer": "^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Fruitcake\\Cors\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fruitcake", + "homepage": "https://fruitcake.nl" + }, + { + "name": "Barryvdh", + "email": "barryvdh@gmail.com" + } + ], + "description": "Cross-origin resource sharing library for the Symfony HttpFoundation", + "homepage": "https://github.com/fruitcake/php-cors", + "keywords": [ + "cors", + "laravel", + "symfony" + ], + "support": { + "issues": "https://github.com/fruitcake/php-cors/issues", + "source": "https://github.com/fruitcake/php-cors/tree/v1.4.0" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2025-12-03T09:33:47+00:00" + }, + { + "name": "graham-campbell/result-type", + "version": "v1.1.4", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "e01f4a821471308ba86aa202fed6698b6b695e3b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/e01f4a821471308ba86aa202fed6698b6b695e3b", + "reference": "e01f4a821471308ba86aa202fed6698b6b695e3b", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.5" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.41 || ^9.6.22 || ^10.5.45 || ^11.5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.4" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2025-12-27T19:43:20+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.12.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "9aa17bcdd777ee31df9fc83c337ca4ca2340def3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9aa17bcdd777ee31df9fc83c337ca4ca2340def3", + "reference": "9aa17bcdd777ee31df9fc83c337ca4ca2340def3", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^2.5", + "guzzlehttp/psr7": "^2.12.3", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0", + "symfony/polyfill-php80": "^1.25" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "guzzlehttp/test-server": "^0.5.1", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.52 || ^9.6.34", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.12.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2026-06-23T15:29:02+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "4360e982f87f5f258bf872d094647791db2f4c8e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/4360e982f87f5f258bf872d094647791db2f4c8e", + "reference": "4360e982f87f5f258bf872d094647791db2f4c8e", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.52 || ^9.6.34" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.5.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2026-06-02T12:23:43+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.12.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "7ec62dc3f44aa218487dbed81a9bf9bc647be55d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/7ec62dc3f44aa218487dbed81a9bf9bc647be55d", + "reference": "7ec62dc3f44aa218487dbed81a9bf9bc647be55d", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0", + "symfony/polyfill-php80": "^1.25" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "1.1.0", + "jshttp/mime-db": "1.54.0.1", + "phpunit/phpunit": "^8.5.52 || ^9.6.34" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.12.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2026-06-23T15:21:08+00:00" + }, + { + "name": "guzzlehttp/uri-template", + "version": "v1.0.8", + "source": { + "type": "git", + "url": "https://github.com/guzzle/uri-template.git", + "reference": "9c19128923b05a5d7355e5d2318d7808b7e33bbd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/uri-template/zipball/9c19128923b05a5d7355e5d2318d7808b7e33bbd", + "reference": "9c19128923b05a5d7355e5d2318d7808b7e33bbd", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/polyfill-php80": "^1.25" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.52 || ^9.6.34", + "uri-template/tests": "1.0.0" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\UriTemplate\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + } + ], + "description": "A polyfill class for uri_template of PHP", + "keywords": [ + "guzzlehttp", + "uri-template" + ], + "support": { + "issues": "https://github.com/guzzle/uri-template/issues", + "source": "https://github.com/guzzle/uri-template/tree/v1.0.8" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/uri-template", + "type": "tidelift" + } + ], + "time": "2026-06-23T13:02:23+00:00" + }, + { + "name": "laravel/framework", + "version": "v12.62.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "f7e61eb1e0e06a38996802b769bce9127aec227c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/f7e61eb1e0e06a38996802b769bce9127aec227c", + "reference": "f7e61eb1e0e06a38996802b769bce9127aec227c", + "shasum": "" + }, + "require": { + "brick/math": "^0.11|^0.12|^0.13|^0.14", + "composer-runtime-api": "^2.2", + "doctrine/inflector": "^2.0.5", + "dragonmantank/cron-expression": "^3.4", + "egulias/email-validator": "^3.2.1|^4.0", + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-session": "*", + "ext-tokenizer": "*", + "fruitcake/php-cors": "^1.3", + "guzzlehttp/guzzle": "^7.8.2", + "guzzlehttp/uri-template": "^1.0", + "laravel/prompts": "^0.3.0", + "laravel/serializable-closure": "^1.3|^2.0", + "league/commonmark": "^2.8.1", + "league/flysystem": "^3.25.1", + "league/flysystem-local": "^3.25.1", + "league/uri": "^7.5.1", + "monolog/monolog": "^3.0", + "nesbot/carbon": "^3.8.4", + "nunomaduro/termwind": "^2.0", + "php": "^8.2", + "psr/container": "^1.1.1|^2.0.1", + "psr/log": "^1.0|^2.0|^3.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "ramsey/uuid": "^4.7", + "symfony/console": "^7.2.0", + "symfony/error-handler": "^7.2.0", + "symfony/finder": "^7.2.0", + "symfony/http-foundation": "^7.2.0", + "symfony/http-kernel": "^7.2.0", + "symfony/mailer": "^7.2.0", + "symfony/mime": "^7.2.0", + "symfony/polyfill-php83": "^1.33", + "symfony/polyfill-php84": "^1.34", + "symfony/polyfill-php85": "^1.34", + "symfony/process": "^7.2.0", + "symfony/routing": "^7.2.0", + "symfony/uid": "^7.2.0", + "symfony/var-dumper": "^7.2.0", + "tijsverkoyen/css-to-inline-styles": "^2.2.5", + "vlucas/phpdotenv": "^5.6.1", + "voku/portable-ascii": "^2.0.2" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "psr/log-implementation": "1.0|2.0|3.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/collections": "self.version", + "illuminate/concurrency": "self.version", + "illuminate/conditionable": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/json-schema": "self.version", + "illuminate/log": "self.version", + "illuminate/macroable": "self.version", + "illuminate/mail": "self.version", + "illuminate/notifications": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/process": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/reflection": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/testing": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version", + "spatie/once": "*" + }, + "require-dev": { + "ably/ably-php": "^1.0", + "aws/aws-sdk-php": "^3.322.9", + "ext-gmp": "*", + "fakerphp/faker": "^1.24", + "guzzlehttp/promises": "^2.0.3", + "guzzlehttp/psr7": "^2.4", + "laravel/pint": "^1.18", + "league/flysystem-aws-s3-v3": "^3.25.1", + "league/flysystem-ftp": "^3.25.1", + "league/flysystem-path-prefixing": "^3.25.1", + "league/flysystem-read-only": "^3.25.1", + "league/flysystem-sftp-v3": "^3.25.1", + "mockery/mockery": "^1.6.10", + "opis/json-schema": "^2.4.1", + "orchestra/testbench-core": "^10.9.0", + "pda/pheanstalk": "^5.0.6|^7.0.0", + "php-http/discovery": "^1.15", + "phpstan/phpstan": "^2.1.41", + "phpunit/phpunit": "^10.5.35|^11.5.3|^12.0.1", + "predis/predis": "^2.3|^3.0", + "resend/resend-php": "^0.10.0|^1.0", + "symfony/cache": "^7.2.0", + "symfony/http-client": "^7.2.0", + "symfony/psr-http-message-bridge": "^7.2.0", + "symfony/translation": "^7.2.0" + }, + "suggest": { + "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.322.9).", + "brianium/paratest": "Required to run tests in parallel (^7.0|^8.0).", + "ext-apcu": "Required to use the APC cache driver.", + "ext-fileinfo": "Required to use the Filesystem class.", + "ext-ftp": "Required to use the Flysystem FTP driver.", + "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", + "ext-memcached": "Required to use the memcache cache driver.", + "ext-pcntl": "Required to use all features of the queue worker and console signal trapping.", + "ext-pdo": "Required to use all database features.", + "ext-posix": "Required to use all features of the queue worker.", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0|^6.0).", + "fakerphp/faker": "Required to generate fake data using the fake() helper (^1.23).", + "filp/whoops": "Required for friendly error pages in development (^2.14.3).", + "laravel/tinker": "Required to use the tinker console command (^2.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.25.1).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.25.1).", + "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.25.1).", + "league/flysystem-read-only": "Required to use read-only disks (^3.25.1)", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.25.1).", + "mockery/mockery": "Required to use mocking (^1.6).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).", + "php-http/discovery": "Required to use PSR-7 bridging features (^1.15).", + "phpunit/phpunit": "Required to use assertions and run tests (^10.5.35|^11.5.3|^12.0.1).", + "predis/predis": "Required to use the predis connector (^2.3|^3.0).", + "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", + "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0|^1.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^7.2).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^7.2).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^7.2).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^7.2).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^7.2).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^7.2)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "12.x-dev" + } + }, + "autoload": { + "files": [ + "src/Illuminate/Collections/functions.php", + "src/Illuminate/Collections/helpers.php", + "src/Illuminate/Events/functions.php", + "src/Illuminate/Filesystem/functions.php", + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Log/functions.php", + "src/Illuminate/Reflection/helpers.php", + "src/Illuminate/Support/functions.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/", + "Illuminate\\Support\\": [ + "src/Illuminate/Macroable/", + "src/Illuminate/Collections/", + "src/Illuminate/Conditionable/", + "src/Illuminate/Reflection/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "https://laravel.com", + "keywords": [ + "framework", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2026-06-09T13:50:13+00:00" + }, + { + "name": "laravel/prompts", + "version": "v0.3.21", + "source": { + "type": "git", + "url": "https://github.com/laravel/prompts.git", + "reference": "7753c65c281c2550c7c183f14e18062073b7d821" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/prompts/zipball/7753c65c281c2550c7c183f14e18062073b7d821", + "reference": "7753c65c281c2550c7c183f14e18062073b7d821", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.2", + "ext-mbstring": "*", + "php": "^8.1", + "symfony/console": "^6.2|^7.0|^8.0" + }, + "conflict": { + "illuminate/console": ">=10.17.0 <10.25.0", + "laravel/framework": ">=10.17.0 <10.25.0" + }, + "require-dev": { + "illuminate/collections": "^10.0|^11.0|^12.0|^13.0", + "mockery/mockery": "^1.5", + "pestphp/pest": "^2.3|^3.4|^4.0", + "phpstan/phpstan": "^1.12.28", + "phpstan/phpstan-mockery": "^1.1.3" + }, + "suggest": { + "ext-pcntl": "Required for the spinner to be animated." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.3.x-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Laravel\\Prompts\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Add beautiful and user-friendly forms to your command-line applications.", + "support": { + "issues": "https://github.com/laravel/prompts/issues", + "source": "https://github.com/laravel/prompts/tree/v0.3.21" + }, + "time": "2026-06-26T00:11:25+00:00" + }, + { + "name": "laravel/sanctum", + "version": "v4.3.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/sanctum.git", + "reference": "2a9bccc18e9907808e0018dd15fa643937886b1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/2a9bccc18e9907808e0018dd15fa643937886b1e", + "reference": "2a9bccc18e9907808e0018dd15fa643937886b1e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/console": "^11.0|^12.0|^13.0", + "illuminate/contracts": "^11.0|^12.0|^13.0", + "illuminate/database": "^11.0|^12.0|^13.0", + "illuminate/support": "^11.0|^12.0|^13.0", + "php": "^8.2", + "symfony/console": "^7.0|^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.6", + "orchestra/testbench": "^9.15|^10.8|^11.0", + "phpstan/phpstan": "^1.10" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Sanctum\\SanctumServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sanctum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.", + "keywords": [ + "auth", + "laravel", + "sanctum" + ], + "support": { + "issues": "https://github.com/laravel/sanctum/issues", + "source": "https://github.com/laravel/sanctum" + }, + "time": "2026-04-30T11:46:25+00:00" + }, + { + "name": "laravel/serializable-closure", + "version": "v2.0.13", + "source": { + "type": "git", + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "b566ee0dd251f3c4078bed003a7ce015f5ea6dce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/b566ee0dd251f3c4078bed003a7ce015f5ea6dce", + "reference": "b566ee0dd251f3c4078bed003a7ce015f5ea6dce", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "illuminate/support": "^10.0|^11.0|^12.0|^13.0", + "nesbot/carbon": "^2.67|^3.0", + "pestphp/pest": "^2.36|^3.0|^4.0", + "phpstan/phpstan": "^2.0", + "symfony/var-dumper": "^6.2.0|^7.0.0|^8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" + }, + "time": "2026-04-16T14:03:50+00:00" + }, + { + "name": "laravel/tinker", + "version": "v2.11.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/tinker.git", + "reference": "c9f80cc835649b5c1842898fb043f8cc098dd741" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/tinker/zipball/c9f80cc835649b5c1842898fb043f8cc098dd741", + "reference": "c9f80cc835649b5c1842898fb043f8cc098dd741", + "shasum": "" + }, + "require": { + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "php": "^7.2.5|^8.0", + "psy/psysh": "^0.11.1|^0.12.0", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0|^8.0" + }, + "require-dev": { + "mockery/mockery": "~1.3.3|^1.4.2", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8.5.8|^9.3.3|^10.0" + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0)." + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Tinker\\TinkerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Tinker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Powerful REPL for the Laravel framework.", + "keywords": [ + "REPL", + "Tinker", + "laravel", + "psysh" + ], + "support": { + "issues": "https://github.com/laravel/tinker/issues", + "source": "https://github.com/laravel/tinker/tree/v2.11.1" + }, + "time": "2026-02-06T14:12:35+00:00" + }, + { + "name": "league/commonmark", + "version": "2.8.2", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "59fb075d2101740c337c7216e3f32b36c204218b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/59fb075d2101740c337c7216e3f32b36c204218b", + "reference": "59fb075d2101740c337c7216e3f32b36c204218b", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "league/config": "^1.1.1", + "php": "^7.4 || ^8.0", + "psr/event-dispatcher": "^1.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/polyfill-php80": "^1.16" + }, + "require-dev": { + "cebe/markdown": "^1.0", + "commonmark/cmark": "0.31.1", + "commonmark/commonmark.js": "0.31.1", + "composer/package-versions-deprecated": "^1.8", + "embed/embed": "^4.4", + "erusev/parsedown": "^1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "^1.4 || ^2.0", + "nyholm/psr7": "^1.5", + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0", + "scrutinizer/ocular": "^1.8.1", + "symfony/finder": "^5.3 | ^6.0 | ^7.0 || ^8.0", + "symfony/process": "^5.4 | ^6.0 | ^7.0 || ^8.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0 || ^8.0", + "unleashedtech/php-coding-standard": "^3.1.1", + "vimeo/psalm": "^4.24.0 || ^5.0.0 || ^6.0.0" + }, + "suggest": { + "symfony/yaml": "v2.3+ required if using the Front Matter extension" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.9-dev" + } + }, + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "support": { + "docs": "https://commonmark.thephpleague.com/", + "forum": "https://github.com/thephpleague/commonmark/discussions", + "issues": "https://github.com/thephpleague/commonmark/issues", + "rss": "https://github.com/thephpleague/commonmark/releases.atom", + "source": "https://github.com/thephpleague/commonmark" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/commonmark", + "type": "tidelift" + } + ], + "time": "2026-03-19T13:16:38+00:00" + }, + { + "name": "league/config", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/config.git", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^3.0.1", + "nette/schema": "^1.2", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Config\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Define configuration arrays with strict schemas and access values with dot notation", + "homepage": "https://config.thephpleague.com", + "keywords": [ + "array", + "config", + "configuration", + "dot", + "dot-access", + "nested", + "schema" + ], + "support": { + "docs": "https://config.thephpleague.com/", + "issues": "https://github.com/thephpleague/config/issues", + "rss": "https://github.com/thephpleague/config/releases.atom", + "source": "https://github.com/thephpleague/config" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + } + ], + "time": "2022-12-11T20:36:23+00:00" + }, + { + "name": "league/flysystem", + "version": "3.35.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "f23af6c5aafd958a7593029a271d77baf5ed793c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f23af6c5aafd958a7593029a271d77baf5ed793c", + "reference": "f23af6c5aafd958a7593029a271d77baf5ed793c", + "shasum": "" + }, + "require": { + "league/flysystem-local": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "conflict": { + "async-aws/core": "<1.19.0", + "async-aws/s3": "<1.14.0", + "aws/aws-sdk-php": "3.209.31 || 3.210.0", + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1", + "phpseclib/phpseclib": "3.0.15", + "symfony/http-client": "<5.2" + }, + "require-dev": { + "async-aws/s3": "^1.5 || ^2.0", + "async-aws/simple-s3": "^1.1 || ^2.0", + "aws/aws-sdk-php": "^3.295.10", + "composer/semver": "^3.0", + "ext-fileinfo": "*", + "ext-ftp": "*", + "ext-mongodb": "^1.3|^2", + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.5", + "google/cloud-storage": "^1.23", + "guzzlehttp/psr7": "^2.6", + "microsoft/azure-storage-blob": "^1.1", + "mongodb/mongodb": "^1.2|^2", + "phpseclib/phpseclib": "^3.0.36", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.5.11|^10.0", + "sabre/dav": "^4.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "File storage abstraction for PHP", + "keywords": [ + "WebDAV", + "aws", + "cloud", + "file", + "files", + "filesystem", + "filesystems", + "ftp", + "s3", + "sftp", + "storage" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/3.35.1" + }, + "time": "2026-06-25T06:52:23+00:00" + }, + { + "name": "league/flysystem-local", + "version": "3.31.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-local.git", + "reference": "2f669db18a4c20c755c2bb7d3a7b0b2340488079" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/2f669db18a4c20c755c2bb7d3a7b0b2340488079", + "reference": "2f669db18a4c20c755c2bb7d3a7b0b2340488079", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/flysystem": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\Local\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Local filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "file", + "files", + "filesystem", + "local" + ], + "support": { + "source": "https://github.com/thephpleague/flysystem-local/tree/3.31.0" + }, + "time": "2026-01-23T15:30:45+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.16.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/2d6702ff215bf922936ccc1ad31007edc76451b9", + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.16.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2024-09-21T08:32:55+00:00" + }, + { + "name": "league/uri", + "version": "7.8.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "08cf38e3924d4f56238125547b5720496fac8fd4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/08cf38e3924d4f56238125547b5720496fac8fd4", + "reference": "08cf38e3924d4f56238125547b5720496fac8fd4", + "shasum": "" + }, + "require": { + "league/uri-interfaces": "^7.8.1", + "php": "^8.1", + "psr/http-factory": "^1" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-dom": "to convert the URI into an HTML anchor tag", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "ext-uri": "to use the PHP native URI class", + "jeremykendall/php-domain-parser": "to further parse the URI host and resolve its Public Suffix and Top Level Domain", + "league/uri-components": "to provide additional tools to manipulate URI objects components", + "league/uri-polyfill": "to backport the PHP URI extension for older versions of PHP", + "php-64bit": "to improve IPV4 host parsing", + "rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "URN", + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc2141", + "rfc3986", + "rfc3987", + "rfc6570", + "rfc8141", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.8.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2026-03-15T20:22:25+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "7.8.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "85d5c77c5d6d3af6c54db4a78246364908f3c928" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/85d5c77c5d6d3af6c54db4a78246364908f3c928", + "reference": "85d5c77c5d6d3af6c54db4a78246364908f3c928", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^8.1", + "psr/http-message": "^1.1 || ^2.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common tools for parsing and resolving RFC3987/RFC3986 URI", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.8.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2026-03-08T20:05:35+00:00" + }, + { + "name": "monolog/monolog", + "version": "3.10.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/b321dd6749f0bf7189444158a3ce785cc16d69b0", + "reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^2.0 || ^3.0" + }, + "provide": { + "psr/log-implementation": "3.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2 || ^2.0", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.2", + "mongodb/mongodb": "^1.8 || ^2.0", + "php-amqplib/php-amqplib": "~2.4 || ^3", + "php-console/php-console": "^3.1.8", + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.17 || ^11.0.7", + "predis/predis": "^1.1 || ^2", + "rollbar/rollbar": "^4.0", + "ruflin/elastica": "^7 || ^8", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/3.10.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2026-01-02T08:56:05+00:00" + }, + { + "name": "nesbot/carbon", + "version": "3.13.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon.git", + "reference": "40f6618f052df16b545f626fbf9a878e6497d16a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/40f6618f052df16b545f626fbf9a878e6497d16a", + "reference": "40f6618f052df16b545f626fbf9a878e6497d16a", + "shasum": "" + }, + "require": { + "carbonphp/carbon-doctrine-types": "<100.0", + "ext-json": "*", + "php": "^8.1", + "psr/clock": "^1.0", + "symfony/clock": "^6.3.12 || ^7.0 || ^8.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/translation": "^4.4.18 || ^5.2.1 || ^6.0 || ^7.0 || ^8.0" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "require-dev": { + "doctrine/dbal": "^3.6.3 || ^4.0", + "doctrine/orm": "^2.15.2 || ^3.0", + "friendsofphp/php-cs-fixer": "^v3.87.1", + "kylekatarnls/multi-tester": "^2.5.3", + "phpmd/phpmd": "^2.15.0", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^2.1.22", + "phpunit/phpunit": "^10.5.53", + "squizlabs/php_codesniffer": "^3.13.4 || ^4.0.0" + }, + "bin": [ + "bin/carbon" + ], + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev", + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "https://markido.com" + }, + { + "name": "kylekatarnls", + "homepage": "https://github.com/kylekatarnls" + } + ], + "description": "An API extension for DateTime that supports 281 different languages.", + "homepage": "https://carbonphp.github.io/carbon/", + "keywords": [ + "date", + "datetime", + "time" + ], + "support": { + "docs": "https://carbonphp.github.io/carbon/guide/getting-started/introduction.html", + "issues": "https://github.com/CarbonPHP/carbon/issues", + "source": "https://github.com/CarbonPHP/carbon" + }, + "funding": [ + { + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", + "type": "tidelift" + } + ], + "time": "2026-06-18T13:49:15+00:00" + }, + { + "name": "nette/schema", + "version": "v1.3.5", + "source": { + "type": "git", + "url": "https://github.com/nette/schema.git", + "reference": "f0ab1a3cda782dbc5da270d28545236aa80c4002" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/schema/zipball/f0ab1a3cda782dbc5da270d28545236aa80c4002", + "reference": "f0ab1a3cda782dbc5da270d28545236aa80c4002", + "shasum": "" + }, + "require": { + "nette/utils": "^4.0", + "php": "8.1 - 8.5" + }, + "require-dev": { + "nette/phpstan-rules": "^1.0", + "nette/tester": "^2.6", + "phpstan/extension-installer": "^1.4@stable", + "phpstan/phpstan": "^2.1.39@stable", + "tracy/tracy": "^2.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Nette\\": "src" + }, + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "📐 Nette Schema: validating data structures against a given Schema.", + "homepage": "https://nette.org", + "keywords": [ + "config", + "nette" + ], + "support": { + "issues": "https://github.com/nette/schema/issues", + "source": "https://github.com/nette/schema/tree/v1.3.5" + }, + "time": "2026-02-23T03:47:12+00:00" + }, + { + "name": "nette/utils", + "version": "v4.1.4", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "7da6c396d7ebe142bc857c20479d5e70a5e1aac7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/7da6c396d7ebe142bc857c20479d5e70a5e1aac7", + "reference": "7da6c396d7ebe142bc857c20479d5e70a5e1aac7", + "shasum": "" + }, + "require": { + "php": "8.2 - 8.5" + }, + "conflict": { + "nette/finder": "<3", + "nette/schema": "<1.2.2" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "^1.2", + "nette/phpstan-rules": "^1.0", + "nette/tester": "^2.5", + "phpstan/extension-installer": "^1.4@stable", + "phpstan/phpstan": "^2.1@stable", + "tracy/tracy": "^2.9" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Nette\\": "src" + }, + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "support": { + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v4.1.4" + }, + "time": "2026-05-11T20:49:54+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.7.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" + }, + "time": "2025-12-06T11:56:16+00:00" + }, + { + "name": "nunomaduro/termwind", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/termwind.git", + "reference": "712a31b768f5daea284c2169a7d227031001b9a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/712a31b768f5daea284c2169a7d227031001b9a8", + "reference": "712a31b768f5daea284c2169a7d227031001b9a8", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^8.2", + "symfony/console": "^7.4.4 || ^8.0.4" + }, + "require-dev": { + "illuminate/console": "^11.47.0", + "laravel/pint": "^1.27.1", + "mockery/mockery": "^1.6.12", + "pestphp/pest": "^2.36.0 || ^3.8.4 || ^4.3.2", + "phpstan/phpstan": "^1.12.32", + "phpstan/phpstan-strict-rules": "^1.6.2", + "symfony/var-dumper": "^7.3.5 || ^8.0.4", + "thecodingmachine/phpstan-strict-rules": "^1.0.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Termwind\\Laravel\\TermwindServiceProvider" + ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Termwind\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "It's like Tailwind CSS, but for the console.", + "keywords": [ + "cli", + "console", + "css", + "package", + "php", + "style" + ], + "support": { + "issues": "https://github.com/nunomaduro/termwind/issues", + "source": "https://github.com/nunomaduro/termwind/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://github.com/xiCO2k", + "type": "github" + } + ], + "time": "2026-02-16T23:10:27+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.9.5", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "75365b91986c2405cf5e1e012c5595cd487a98be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/75365b91986c2405cf5e1e012c5595cd487a98be", + "reference": "75365b91986c2405cf5e1e012c5595cd487a98be", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.44 || ^9.6.25 || ^10.5.53 || ^11.5.34" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.5" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2025-12-27T19:41:33+00:00" + }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "psr/log", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.2" + }, + "time": "2024-09-11T13:17:53+00:00" + }, + { + "name": "psr/simple-cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" + }, + "time": "2021-10-29T13:26:27+00:00" + }, + { + "name": "psy/psysh", + "version": "v0.12.23", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "4dcc0f08047d52bbde475eda481146fd8e27e1a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4dcc0f08047d52bbde475eda481146fd8e27e1a4", + "reference": "4dcc0f08047d52bbde475eda481146fd8e27e1a4", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "nikic/php-parser": "^5.0 || ^4.0", + "php": "^8.0 || ^7.4", + "symfony/console": "^8.0 || ^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^8.0 || ^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" + }, + "conflict": { + "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2", + "composer/class-map-generator": "^1.6" + }, + "suggest": { + "composer/class-map-generator": "Improved tab completion performance with better class discovery.", + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": false, + "forward-command": false + }, + "branch-alias": { + "dev-main": "0.12.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Psy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "https://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "support": { + "issues": "https://github.com/bobthecow/psysh/issues", + "source": "https://github.com/bobthecow/psysh/tree/v0.12.23" + }, + "time": "2026-05-23T13:41:31+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "ramsey/collection", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/ramsey/collection.git", + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2", + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.45", + "fakerphp/faker": "^1.24", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^2.1", + "mockery/mockery": "^1.6", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4", + "phpspec/prophecy-phpunit": "^2.3", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-mockery": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^10.5", + "ramsey/coding-standard": "^2.3", + "ramsey/conventional-commits": "^1.6", + "roave/security-advisories": "dev-latest" + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "A PHP library for representing and manipulating collections.", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "support": { + "issues": "https://github.com/ramsey/collection/issues", + "source": "https://github.com/ramsey/collection/tree/2.1.1" + }, + "time": "2025-03-22T05:38:12+00:00" + }, + { + "name": "ramsey/uuid", + "version": "4.9.3", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "1df15849d00943a67d677dc9cfd80795f038c9f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/1df15849d00943a67d677dc9cfd80795f038c9f8", + "reference": "1df15849d00943a67d677dc9cfd80795f038c9f8", + "shasum": "" + }, + "require": { + "brick/math": ">=0.8.16 <=0.18", + "php": "^8.0", + "ramsey/collection": "^1.2 || ^2.0" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "captainhook/captainhook": "^5.25", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "ergebnis/composer-normalize": "^2.47", + "mockery/mockery": "^1.6", + "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.6", + "php-mock/php-mock-mockery": "^1.5", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpbench/phpbench": "^1.2.14", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-mockery": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^9.6", + "slevomat/coding-standard": "^8.18", + "squizlabs/php_codesniffer": "^3.13" + }, + "suggest": { + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "support": { + "issues": "https://github.com/ramsey/uuid/issues", + "source": "https://github.com/ramsey/uuid/tree/4.9.3" + }, + "time": "2026-06-18T03:57:49+00:00" + }, + { + "name": "symfony/clock", + "version": "v7.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/clock.git", + "reference": "674fa3b98e21531dd040e613479f5f6fa8f32111" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/clock/zipball/674fa3b98e21531dd040e613479f5f6fa8f32111", + "reference": "674fa3b98e21531dd040e613479f5f6fa8f32111", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/clock": "^1.0", + "symfony/polyfill-php83": "^1.28" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/now.php" + ], + "psr-4": { + "Symfony\\Component\\Clock\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Decouples applications from the system clock", + "homepage": "https://symfony.com", + "keywords": [ + "clock", + "psr20", + "time" + ], + "support": { + "source": "https://github.com/symfony/clock/tree/v7.4.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-24T13:12:05+00:00" + }, + { + "name": "symfony/console", + "version": "v7.4.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "92f58bc4bf97a92ed1b9f367f0cd44f20bde0e87" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/92f58bc4bf97a92ed1b9f367f0cd44f20bde0e87", + "reference": "92f58bc4bf97a92ed1b9f367f0cd44f20bde0e87", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^7.2|^8.0" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/lock": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v7.4.14" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-06-16T11:50:14+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v7.4.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "b75663ed96cf4756e28e3105476f220f92886cc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/b75663ed96cf4756e28e3105476f220f92886cc4", + "reference": "b75663ed96cf4756e28e3105476f220f92886cc4", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Converts CSS selectors to XPath expressions", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/css-selector/tree/v7.4.9" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-04-18T13:18:21+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/50f59d1f3ca46d41ac911f97a78626b6756af35b", + "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.7-dev" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-04-13T15:52:40+00:00" + }, + { + "name": "symfony/error-handler", + "version": "v7.4.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/error-handler.git", + "reference": "4e1a093b481f323e6e326451f9760c3868430673" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/4e1a093b481f323e6e326451f9760c3868430673", + "reference": "4e1a093b481f323e6e326451f9760c3868430673", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/log": "^1|^2|^3", + "symfony/polyfill-php85": "^1.32", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "conflict": { + "symfony/deprecation-contracts": "<2.5", + "symfony/http-kernel": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4|^7.0|^8.0", + "symfony/webpack-encore-bundle": "^1.0|^2.0" + }, + "bin": [ + "Resources/bin/patch-type-declarations" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\ErrorHandler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to manage errors and ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/error-handler/tree/v7.4.14" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-06-05T06:22:21+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v7.4.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "51fe3d170227be8d1772214b82ae506e15ed78ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/51fe3d170227be8d1772214b82ae506e15ed78ff", + "reference": "51fe3d170227be8d1772214b82ae506e15ed78ff", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/error-handler": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/framework-bundle": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v7.4.14" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-06-06T11:10:32+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "ccba7060602b7fed0b03c85bf025257f76d9ef32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/ccba7060602b7fed0b03c85bf025257f76d9ef32", + "reference": "ccba7060602b7fed0b03c85bf025257f76d9ef32", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-01-05T13:30:16+00:00" + }, + { + "name": "symfony/finder", + "version": "v7.4.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "13b38720174286f55d1761152b575a8d1436fc25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/13b38720174286f55d1761152b575a8d1436fc25", + "reference": "13b38720174286f55d1761152b575a8d1436fc25", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "symfony/filesystem": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v7.4.14" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-06-27T08:31:18+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v7.4.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "06db5ae1552177bf8572f8908839f12e3c06aed3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/06db5ae1552177bf8572f8908839f12e3c06aed3", + "reference": "06db5ae1552177bf8572f8908839f12e3c06aed3", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "^1.1" + }, + "conflict": { + "doctrine/dbal": "<3.6", + "symfony/cache": "<6.4.12|>=7.0,<7.1.5" + }, + "require-dev": { + "doctrine/dbal": "^3.6|^4", + "predis/predis": "^1.1|^2.0", + "symfony/cache": "^6.4.12|^7.1.5|^8.0", + "symfony/clock": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/mime": "^6.4|^7.0|^8.0", + "symfony/rate-limiter": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Defines an object-oriented layer for the HTTP specification", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v7.4.14" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-06-11T07:31:44+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v7.4.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "e99af79b1e776646eda0e1c23b7b45c184ff99be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/e99af79b1e776646eda0e1c23b7b45c184ff99be", + "reference": "e99af79b1e776646eda0e1c23b7b45c184ff99be", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/error-handler": "^6.4|^7.0|^8.0", + "symfony/event-dispatcher": "^7.3|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/browser-kit": "<6.4", + "symfony/cache": "<6.4", + "symfony/config": "<6.4", + "symfony/console": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/doctrine-bridge": "<6.4", + "symfony/flex": "<2.10", + "symfony/form": "<6.4", + "symfony/http-client": "<6.4", + "symfony/http-client-contracts": "<2.5", + "symfony/mailer": "<6.4", + "symfony/messenger": "<6.4", + "symfony/translation": "<6.4", + "symfony/translation-contracts": "<2.5", + "symfony/twig-bridge": "<6.4", + "symfony/validator": "<6.4", + "symfony/var-dumper": "<6.4", + "twig/twig": "<3.12" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/browser-kit": "^6.4|^7.0|^8.0", + "symfony/clock": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/css-selector": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4.1|^7.0.1|^8.0", + "symfony/dom-crawler": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/http-client-contracts": "^2.5|^3", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/property-access": "^7.1|^8.0", + "symfony/routing": "^6.4|^7.0|^8.0", + "symfony/serializer": "^7.1|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/translation": "^6.4|^7.0|^8.0", + "symfony/translation-contracts": "^2.5|^3", + "symfony/uid": "^6.4|^7.0|^8.0", + "symfony/validator": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0", + "symfony/var-exporter": "^6.4|^7.0|^8.0", + "twig/twig": "^3.12" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a structured process for converting a Request into a Response", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v7.4.14" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-06-27T09:14:35+00:00" + }, + { + "name": "symfony/mailer", + "version": "v7.4.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/mailer.git", + "reference": "f88ce03ae73e3edb5c176ce1f337709996e88495" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mailer/zipball/f88ce03ae73e3edb5c176ce1f337709996e88495", + "reference": "f88ce03ae73e3edb5c176ce1f337709996e88495", + "shasum": "" + }, + "require": { + "egulias/email-validator": "^2.1.10|^3|^4", + "php": ">=8.2", + "psr/event-dispatcher": "^1", + "psr/log": "^1|^2|^3", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/mime": "^7.2|^8.0", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/http-client-contracts": "<2.5", + "symfony/http-kernel": "<6.4", + "symfony/messenger": "<6.4", + "symfony/mime": "<6.4", + "symfony/twig-bridge": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/twig-bridge": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mailer\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps sending emails", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/mailer/tree/v7.4.14" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-06-13T08:51:35+00:00" + }, + { + "name": "symfony/mime", + "version": "v7.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/mime.git", + "reference": "a845722765c4f6b2ce88beaf4f4479975b186770" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mime/zipball/a845722765c4f6b2ce88beaf4f4479975b186770", + "reference": "a845722765c4f6b2ce88beaf4f4479975b186770", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "conflict": { + "egulias/email-validator": "~3.0.0", + "phpdocumentor/reflection-docblock": "<5.2|>=7", + "phpdocumentor/type-resolver": "<1.5.1", + "symfony/mailer": "<6.4", + "symfony/serializer": "<6.4.3|>7.0,<7.0.3" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10|^3.1|^4", + "league/html-to-markdown": "^5.0", + "phpdocumentor/reflection-docblock": "^5.2|^6.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/property-info": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4.3|^7.0.3|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mime\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows manipulating MIME messages", + "homepage": "https://symfony.com", + "keywords": [ + "mime", + "mime-type" + ], + "support": { + "source": "https://github.com/symfony/mime/tree/v7.4.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-23T16:22:37+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.37.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "141046a8f9477948ff284fa65be2095baafb94f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2", + "reference": "141046a8f9477948ff284fa65be2095baafb94f2", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.37.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-04-10T16:19:22+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.38.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "e9247d281d694a5120554d9afaf54e070e88a603" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/e9247d281d694a5120554d9afaf54e070e88a603", + "reference": "e9247d281d694a5120554d9afaf54e070e88a603", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.38.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-26T05:58:03+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.38.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "dc21118016c039a66235cf93d96b435ffb282412" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/dc21118016c039a66235cf93d96b435ffb282412", + "reference": "dc21118016c039a66235cf93d96b435ffb282412", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "symfony/polyfill-intl-normalizer": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.38.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-25T15:22:23+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.38.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/2d446c214bdbe5b71bde5011b060a05fece3ae6b", + "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.38.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-25T13:48:31+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.38.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6", + "reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.38.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-27T06:59:30+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.37.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dfb55726c3a76ea3b6459fcfda1ec2d80a682411", + "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.37.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-04-10T16:19:22+00:00" + }, + { + "name": "symfony/polyfill-php83", + "version": "v1.38.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "796a26abb75ce49f3a84433cd81bf1009d73d5f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/796a26abb75ce49f3a84433cd81bf1009d73d5f8", + "reference": "796a26abb75ce49f3a84433cd81bf1009d73d5f8", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.38.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-27T06:51:48+00:00" + }, + { + "name": "symfony/polyfill-php84", + "version": "v1.38.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php84.git", + "reference": "f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa", + "reference": "f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php84\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.4+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php84/tree/v1.38.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-26T12:51:13+00:00" + }, + { + "name": "symfony/polyfill-php85", + "version": "v1.38.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php85.git", + "reference": "ba2ba04f3352cfa2dcbbcb90aee13ed967f505b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/ba2ba04f3352cfa2dcbbcb90aee13ed967f505b1", + "reference": "ba2ba04f3352cfa2dcbbcb90aee13ed967f505b1", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php85\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.5+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php85/tree/v1.38.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-26T02:25:22+00:00" + }, + { + "name": "symfony/polyfill-uuid", + "version": "v1.37.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-uuid.git", + "reference": "26dfec253c4cf3e51b541b52ddf7e42cb0908e94" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/26dfec253c4cf3e51b541b52ddf7e42cb0908e94", + "reference": "26dfec253c4cf3e51b541b52ddf7e42cb0908e94", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-uuid": "*" + }, + "suggest": { + "ext-uuid": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Uuid\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Grégoire Pineau", + "email": "lyrixx@lyrixx.info" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for uuid functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "uuid" + ], + "support": { + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.37.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-04-10T16:19:22+00:00" + }, + { + "name": "symfony/process", + "version": "v7.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "f5804be144caceb570f6747519999636b664f24c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/f5804be144caceb570f6747519999636b664f24c", + "reference": "f5804be144caceb570f6747519999636b664f24c", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v7.4.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-23T16:05:06+00:00" + }, + { + "name": "symfony/routing", + "version": "v7.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "3a162171bb008e5e0f15dce6581373a4c0e8390d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/3a162171bb008e5e0f15dce6581373a4c0e8390d", + "reference": "3a162171bb008e5e0f15dce6581373a4c0e8390d", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/config": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/yaml": "<6.4" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v7.4.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-24T11:20:33+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d25d82433a80eba6aa0e6c24b61d7370d99e444a", + "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-28T09:44:51+00:00" + }, + { + "name": "symfony/string", + "version": "v7.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "961683010db3b27ec6ebcd7308e6e1ee8fa7ffde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/961683010db3b27ec6ebcd7308e6e1ee8fa7ffde", + "reference": "961683010db3b27ec6ebcd7308e6e1ee8fa7ffde", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3.0", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.33", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/emoji": "^7.1|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/intl": "^6.4|^7.0|^8.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v7.4.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-23T15:23:29+00:00" + }, + { + "name": "symfony/translation", + "version": "v7.4.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "a1af4dacb24eb7ef4f1ca71b94da8ddbce572281" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/a1af4dacb24eb7ef4f1ca71b94da8ddbce572281", + "reference": "a1af4dacb24eb7ef4f1ca71b94da8ddbce572281", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation-contracts": "^2.5.3|^3.3" + }, + "conflict": { + "nikic/php-parser": "<5.0", + "symfony/config": "<6.4", + "symfony/console": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/http-client-contracts": "<2.5", + "symfony/http-kernel": "<6.4", + "symfony/service-contracts": "<2.5", + "symfony/twig-bundle": "<6.4", + "symfony/yaml": "<6.4" + }, + "provide": { + "symfony/translation-implementation": "2.3|3.0" + }, + "require-dev": { + "nikic/php-parser": "^5.0", + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/http-client-contracts": "^2.5|^3.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/intl": "^6.4|^7.0|^8.0", + "symfony/polyfill-intl-icu": "^1.21", + "symfony/routing": "^6.4|^7.0|^8.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to internationalize your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/translation/tree/v7.4.14" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-06-06T09:33:19+00:00" + }, + { + "name": "symfony/translation-contracts", + "version": "v3.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "0ab302977a952b42fd51475c4ebac81f8da0a95d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/0ab302977a952b42fd51475c4ebac81f8da0a95d", + "reference": "0ab302977a952b42fd51475c4ebac81f8da0a95d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-01-05T13:30:16+00:00" + }, + { + "name": "symfony/uid", + "version": "v7.4.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/uid.git", + "reference": "2676b524340abcfe4d6151ec698463cebafee439" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/uid/zipball/2676b524340abcfe4d6151ec698463cebafee439", + "reference": "2676b524340abcfe4d6151ec698463cebafee439", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-uuid": "^1.15" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Uid\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Grégoire Pineau", + "email": "lyrixx@lyrixx.info" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to generate and represent UIDs", + "homepage": "https://symfony.com", + "keywords": [ + "UID", + "ulid", + "uuid" + ], + "support": { + "source": "https://github.com/symfony/uid/tree/v7.4.9" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-04-30T15:19:22+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v7.4.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "9a3a56a4a1e65a5cb4f8d13801fe8ab0a170e358" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9a3a56a4a1e65a5cb4f8d13801fe8ab0a170e358", + "reference": "9a3a56a4a1e65a5cb4f8d13801fe8ab0a170e358", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/console": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/uid": "^6.4|^7.0|^8.0", + "twig/twig": "^3.12" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v7.4.14" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-06-08T20:24:16+00:00" + }, + { + "name": "tijsverkoyen/css-to-inline-styles", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", + "reference": "f0292ccf0ec75843d65027214426b6b163b48b41" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/f0292ccf0ec75843d65027214426b6b163b48b41", + "reference": "f0292ccf0ec75843d65027214426b6b163b48b41", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": "^7.4 || ^8.0", + "symfony/css-selector": "^5.4 || ^6.0 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^8.5.21 || ^9.5.10" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "TijsVerkoyen\\CssToInlineStyles\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Tijs Verkoyen", + "email": "css_to_inline_styles@verkoyen.eu", + "role": "Developer" + } + ], + "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", + "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", + "support": { + "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.4.0" + }, + "time": "2025-12-02T11:56:42+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v5.6.3", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "955e7815d677a3eaa7075231212f2110983adecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/955e7815d677a3eaa7075231212f2110983adecc", + "reference": "955e7815d677a3eaa7075231212f2110983adecc", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "graham-campbell/result-type": "^1.1.4", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.5", + "symfony/polyfill-ctype": "^1.26", + "symfony/polyfill-mbstring": "^1.26", + "symfony/polyfill-php80": "^1.26" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-filter": "*", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2025-12-27T19:49:13+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "8e1051fe39379367aecf014f41744ce7539a856f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/8e1051fe39379367aecf014f41744ce7539a856f", + "reference": "8e1051fe39379367aecf014f41744ce7539a856f", + "shasum": "" + }, + "require": { + "php": ">=7.1.0" + }, + "require-dev": { + "phpunit/phpunit": "~8.5 || ~9.6 || ~10.5 || ~11.5" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "type": "library", + "autoload": { + "psr-4": { + "voku\\": "src/voku/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "https://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "support": { + "issues": "https://github.com/voku/portable-ascii/issues", + "source": "https://github.com/voku/portable-ascii/tree/2.1.1" + }, + "funding": [ + { + "url": "https://www.paypal.me/moelleken", + "type": "custom" + }, + { + "url": "https://github.com/voku", + "type": "github" + }, + { + "url": "https://opencollective.com/portable-ascii", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/voku", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", + "type": "tidelift" + } + ], + "time": "2026-04-26T05:33:54+00:00" + } + ], + "packages-dev": [ + { + "name": "fakerphp/faker", + "version": "v1.24.1", + "source": { + "type": "git", + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5", + "reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "conflict": { + "fzaninotto/faker": "*" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "doctrine/persistence": "^1.3 || ^2.0", + "ext-intl": "*", + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" + }, + "suggest": { + "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", + "ext-curl": "Required by Faker\\Provider\\Image to download images.", + "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", + "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", + "ext-mbstring": "Required for multibyte Unicode string functionality." + }, + "type": "library", + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "support": { + "issues": "https://github.com/FakerPHP/Faker/issues", + "source": "https://github.com/FakerPHP/Faker/tree/v1.24.1" + }, + "time": "2024-11-21T13:46:39+00:00" + }, + { + "name": "filp/whoops", + "version": "2.18.4", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "d2102955e48b9fd9ab24280a7ad12ed552752c4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/d2102955e48b9fd9ab24280a7ad12ed552752c4d", + "reference": "d2102955e48b9fd9ab24280a7ad12ed552752c4d", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^4.0 || ^5.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.18.4" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2025-08-08T12:00:00+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0 || ^3.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.1.1" + }, + "time": "2025-04-30T06:54:44+00:00" + }, + { + "name": "laravel/pail", + "version": "v1.2.7", + "source": { + "type": "git", + "url": "https://github.com/laravel/pail.git", + "reference": "2f7d27dada8effc48b8c424445a69cca7007daaa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pail/zipball/2f7d27dada8effc48b8c424445a69cca7007daaa", + "reference": "2f7d27dada8effc48b8c424445a69cca7007daaa", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "illuminate/console": "^10.24|^11.0|^12.0|^13.0", + "illuminate/contracts": "^10.24|^11.0|^12.0|^13.0", + "illuminate/log": "^10.24|^11.0|^12.0|^13.0", + "illuminate/process": "^10.24|^11.0|^12.0|^13.0", + "illuminate/support": "^10.24|^11.0|^12.0|^13.0", + "nunomaduro/termwind": "^1.15|^2.0", + "php": "^8.2", + "symfony/console": "^6.0|^7.0|^8.0" + }, + "require-dev": { + "laravel/framework": "^10.24|^11.0|^12.0|^13.0", + "laravel/pint": "^1.13", + "orchestra/testbench-core": "^8.13|^9.17|^10.8|^11.0", + "pestphp/pest": "^2.20|^3.0|^4.0", + "pestphp/pest-plugin-type-coverage": "^2.3|^3.0|^4.0", + "phpstan/phpstan": "^1.12.27", + "symfony/var-dumper": "^6.3|^7.0|^8.0", + "symfony/yaml": "^6.3|^7.0|^8.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Pail\\PailServiceProvider" + ] + }, + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\Pail\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Easily delve into your Laravel application's log files directly from the command line.", + "homepage": "https://github.com/laravel/pail", + "keywords": [ + "dev", + "laravel", + "logs", + "php", + "tail" + ], + "support": { + "issues": "https://github.com/laravel/pail/issues", + "source": "https://github.com/laravel/pail" + }, + "time": "2026-05-20T22:24:57+00:00" + }, + { + "name": "laravel/pint", + "version": "v1.29.3", + "source": { + "type": "git", + "url": "https://github.com/laravel/pint.git", + "reference": "da1d1111a6aa2e082d2a388b194afe1ba0a05d14" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pint/zipball/da1d1111a6aa2e082d2a388b194afe1ba0a05d14", + "reference": "da1d1111a6aa2e082d2a388b194afe1ba0a05d14", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "ext-tokenizer": "*", + "ext-xml": "*", + "php": "^8.2.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.95.8", + "illuminate/view": "^12.62.0", + "larastan/larastan": "^3.10.0", + "laravel-zero/framework": "^12.1.0", + "laravel/agent-detector": "^2.0.2", + "mockery/mockery": "^1.6.12", + "nunomaduro/termwind": "^2.4.0", + "pestphp/pest": "^3.8.6" + }, + "bin": [ + "builds/pint" + ], + "type": "project", + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Seeders\\": "database/seeders/", + "Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "An opinionated code formatter for PHP.", + "homepage": "https://laravel.com", + "keywords": [ + "dev", + "format", + "formatter", + "lint", + "linter", + "php" + ], + "support": { + "issues": "https://github.com/laravel/pint/issues", + "source": "https://github.com/laravel/pint" + }, + "time": "2026-06-16T15:34:04+00:00" + }, + { + "name": "laravel/sail", + "version": "v1.63.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/sail.git", + "reference": "51bbce3f803c1d386cabbb44e618c955a12ff5fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sail/zipball/51bbce3f803c1d386cabbb44e618c955a12ff5fc", + "reference": "51bbce3f803c1d386cabbb44e618c955a12ff5fc", + "shasum": "" + }, + "require": { + "illuminate/console": "^9.52.16|^10.0|^11.0|^12.0|^13.0", + "illuminate/contracts": "^9.52.16|^10.0|^11.0|^12.0|^13.0", + "illuminate/support": "^9.52.16|^10.0|^11.0|^12.0|^13.0", + "php": "^8.0", + "symfony/console": "^6.0|^7.0|^8.0", + "symfony/yaml": "^6.0|^7.0|^8.0" + }, + "require-dev": { + "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0|^11.0", + "phpstan/phpstan": "^2.0" + }, + "bin": [ + "bin/sail" + ], + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Sail\\SailServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sail\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Docker files for running a basic Laravel application.", + "keywords": [ + "docker", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/sail/issues", + "source": "https://github.com/laravel/sail" + }, + "time": "2026-06-18T08:54:14+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.6.12", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": ">=7.3" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" + }, + "type": "library", + "autoload": { + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "https://github.com/padraic", + "role": "Author" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "docs": "https://docs.mockery.io/", + "issues": "https://github.com/mockery/mockery/issues", + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" + }, + "time": "2024-05-16T03:13:13+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.13.4", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2025-08-01T08:46:24+00:00" + }, + { + "name": "nunomaduro/collision", + "version": "v8.9.4", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/collision.git", + "reference": "716af8f95a470e9094cfca09ed897b023be191a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/716af8f95a470e9094cfca09ed897b023be191a5", + "reference": "716af8f95a470e9094cfca09ed897b023be191a5", + "shasum": "" + }, + "require": { + "filp/whoops": "^2.18.4", + "nunomaduro/termwind": "^2.4.0", + "php": "^8.2.0", + "symfony/console": "^7.4.8 || ^8.0.8" + }, + "conflict": { + "laravel/framework": "<11.48.0 || >=14.0.0", + "phpunit/phpunit": "<11.5.50 || >=14.0.0" + }, + "require-dev": { + "brianium/paratest": "^7.8.5", + "larastan/larastan": "^3.9.6", + "laravel/framework": "^11.48.0 || ^12.56.0 || ^13.5.0", + "laravel/pint": "^1.29.1", + "orchestra/testbench-core": "^9.12.0 || ^10.12.1 || ^11.2.1", + "pestphp/pest": "^3.8.5 || ^4.4.3 || ^5.0.0", + "sebastian/environment": "^7.2.1 || ^8.0.4 || ^9.3.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" + ] + }, + "branch-alias": { + "dev-8.x": "8.x-dev" + } + }, + "autoload": { + "files": [ + "./src/Adapters/Phpunit/Autoload.php" + ], + "psr-4": { + "NunoMaduro\\Collision\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Cli error handling for console/command-line PHP applications.", + "keywords": [ + "artisan", + "cli", + "command-line", + "console", + "dev", + "error", + "handling", + "laravel", + "laravel-zero", + "php", + "symfony" + ], + "support": { + "issues": "https://github.com/nunomaduro/collision/issues", + "source": "https://github.com/nunomaduro/collision" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2026-04-21T14:04:20+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "11.0.12", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "2c1ed04922802c15e1de5d7447b4856de949cf56" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2c1ed04922802c15e1de5d7447b4856de949cf56", + "reference": "2c1ed04922802c15e1de5d7447b4856de949cf56", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^5.7.0", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.1", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", + "theseer/tokenizer": "^1.3.1" + }, + "require-dev": { + "phpunit/phpunit": "^11.5.46" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.12" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", + "type": "tidelift" + } + ], + "time": "2025-12-24T07:01:01+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "5.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "2f3a64888c814fc235386b7387dd5b5ed92ad903" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/2f3a64888c814fc235386b7387dd5b5ed92ad903", + "reference": "2f3a64888c814fc235386b7387dd5b5ed92ad903", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-file-iterator", + "type": "tidelift" + } + ], + "time": "2026-02-02T13:52:54+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "5.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^11.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:07:44+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:08:43+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "7.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:09:35+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "11.5.55", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "adc7262fccc12de2b30f12a8aa0b33775d814f00" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/adc7262fccc12de2b30f12a8aa0b33775d814f00", + "reference": "adc7262fccc12de2b30f12a8aa0b33775d814f00", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.13.4", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.12", + "phpunit/php-file-iterator": "^5.1.1", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.3", + "sebastian/comparator": "^6.3.3", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.1", + "sebastian/exporter": "^6.3.2", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/recursion-context": "^6.0.3", + "sebastian/type": "^5.1.3", + "sebastian/version": "^5.0.2", + "staabm/side-effects-detector": "^1.0.5" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.55" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2026-02-18T12:37:06+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:41:36+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2025-03-19T07:56:08+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:45:54+00:00" + }, + { + "name": "sebastian/comparator", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2c95e1e86cb8dd41beb8d502057d1081ccc8eca9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2c95e1e86cb8dd41beb8d502057d1081ccc8eca9", + "reference": "2c95e1e86cb8dd41beb8d502057d1081ccc8eca9", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.4" + }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" + } + ], + "time": "2026-01-24T09:26:40+00:00" + }, + { + "name": "sebastian/complexity", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:49:50+00:00" + }, + { + "name": "sebastian/diff", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:53:05+00:00" + }, + { + "name": "sebastian/environment", + "version": "7.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/a5c75038693ad2e8d4b6c15ba2403532647830c4", + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "https://github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", + "type": "tidelift" + } + ], + "time": "2025-05-21T11:55:47+00:00" + }, + { + "name": "sebastian/exporter", + "version": "6.3.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "70a298763b40b213ec087c51c739efcaa90bcd74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/70a298763b40b213ec087c51c739efcaa90bcd74", + "reference": "70a298763b40b213ec087c51c739efcaa90bcd74", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" + } + ], + "time": "2025-09-24T06:12:51+00:00" + }, + { + "name": "sebastian/global-state", + "version": "7.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:57:36+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:58:38+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "6.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:00:13+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:01:32+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "6.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/f6458abbf32a6c8174f8f26261475dc133b3d9dc", + "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", + "type": "tidelift" + } + ], + "time": "2025-08-13T04:42:22+00:00" + }, + { + "name": "sebastian/type", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "f77d2d4e78738c98d9a68d2596fe5e8fa380f449" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/f77d2d4e78738c98d9a68d2596fe5e8fa380f449", + "reference": "f77d2d4e78738c98d9a68d2596fe5e8fa380f449", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/type", + "type": "tidelift" + } + ], + "time": "2025-08-09T06:55:48+00:00" + }, + { + "name": "sebastian/version", + "version": "5.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-10-09T05:16:32+00:00" + }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" + }, + { + "name": "symfony/yaml", + "version": "v7.4.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "f8f328665ace2370d1e10645b807ba1646dc7dcc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/f8f328665ace2370d1e10645b807ba1646dc7dcc", + "reference": "f8f328665ace2370d1e10645b807ba1646dc7dcc", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v7.4.14" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-06-08T20:24:16+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.3.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2025-11-17T20:03:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": "^8.2" + }, + "platform-dev": {}, + "plugin-api-version": "2.9.0" +} diff --git a/backend/config/app.php b/backend/config/app.php new file mode 100644 index 0000000..423eed5 --- /dev/null +++ b/backend/config/app.php @@ -0,0 +1,126 @@ + env('APP_NAME', 'Laravel'), + + /* + |-------------------------------------------------------------------------- + | Application Environment + |-------------------------------------------------------------------------- + | + | This value determines the "environment" your application is currently + | running in. This may determine how you prefer to configure various + | services the application utilizes. Set this in your ".env" file. + | + */ + + 'env' => env('APP_ENV', 'production'), + + /* + |-------------------------------------------------------------------------- + | Application Debug Mode + |-------------------------------------------------------------------------- + | + | When your application is in debug mode, detailed error messages with + | stack traces will be shown on every error that occurs within your + | application. If disabled, a simple generic error page is shown. + | + */ + + 'debug' => (bool) env('APP_DEBUG', false), + + /* + |-------------------------------------------------------------------------- + | Application URL + |-------------------------------------------------------------------------- + | + | This URL is used by the console to properly generate URLs when using + | the Artisan command line tool. You should set this to the root of + | the application so that it's available within Artisan commands. + | + */ + + 'url' => env('APP_URL', 'http://localhost'), + + /* + |-------------------------------------------------------------------------- + | Application Timezone + |-------------------------------------------------------------------------- + | + | Here you may specify the default timezone for your application, which + | will be used by the PHP date and date-time functions. The timezone + | is set to "UTC" by default as it is suitable for most use cases. + | + */ + + 'timezone' => 'UTC', + + /* + |-------------------------------------------------------------------------- + | Application Locale Configuration + |-------------------------------------------------------------------------- + | + | The application locale determines the default locale that will be used + | by Laravel's translation / localization methods. This option can be + | set to any locale for which you plan to have translation strings. + | + */ + + 'locale' => env('APP_LOCALE', 'en'), + + 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), + + 'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'), + + /* + |-------------------------------------------------------------------------- + | Encryption Key + |-------------------------------------------------------------------------- + | + | This key is utilized by Laravel's encryption services and should be set + | to a random, 32 character string to ensure that all encrypted values + | are secure. You should do this prior to deploying the application. + | + */ + + 'cipher' => 'AES-256-CBC', + + 'key' => env('APP_KEY'), + + 'previous_keys' => [ + ...array_filter( + explode(',', (string) env('APP_PREVIOUS_KEYS', '')) + ), + ], + + /* + |-------------------------------------------------------------------------- + | Maintenance Mode Driver + |-------------------------------------------------------------------------- + | + | These configuration options determine the driver used to determine and + | manage Laravel's "maintenance mode" status. The "cache" driver will + | allow maintenance mode to be controlled across multiple machines. + | + | Supported drivers: "file", "cache" + | + */ + + 'maintenance' => [ + 'driver' => env('APP_MAINTENANCE_DRIVER', 'file'), + 'store' => env('APP_MAINTENANCE_STORE', 'database'), + ], + +]; diff --git a/backend/config/auth.php b/backend/config/auth.php new file mode 100644 index 0000000..d7568ff --- /dev/null +++ b/backend/config/auth.php @@ -0,0 +1,117 @@ + [ + 'guard' => env('AUTH_GUARD', 'web'), + 'passwords' => env('AUTH_PASSWORD_BROKER', 'users'), + ], + + /* + |-------------------------------------------------------------------------- + | Authentication Guards + |-------------------------------------------------------------------------- + | + | Next, you may define every authentication guard for your application. + | Of course, a great default configuration has been defined for you + | which utilizes session storage plus the Eloquent user provider. + | + | All authentication guards have a user provider, which defines how the + | users are actually retrieved out of your database or other storage + | system used by the application. Typically, Eloquent is utilized. + | + | Supported: "session" + | + */ + + 'guards' => [ + 'web' => [ + 'driver' => 'session', + 'provider' => 'users', + ], + ], + + /* + |-------------------------------------------------------------------------- + | User Providers + |-------------------------------------------------------------------------- + | + | All authentication guards have a user provider, which defines how the + | users are actually retrieved out of your database or other storage + | system used by the application. Typically, Eloquent is utilized. + | + | If you have multiple user tables or models you may configure multiple + | providers to represent the model / table. These providers may then + | be assigned to any extra authentication guards you have defined. + | + | Supported: "database", "eloquent" + | + */ + + 'providers' => [ + 'users' => [ + 'driver' => 'eloquent', + 'model' => env('AUTH_MODEL', User::class), + ], + + // 'users' => [ + // 'driver' => 'database', + // 'table' => 'users', + // ], + ], + + /* + |-------------------------------------------------------------------------- + | Resetting Passwords + |-------------------------------------------------------------------------- + | + | These configuration options specify the behavior of Laravel's password + | reset functionality, including the table utilized for token storage + | and the user provider that is invoked to actually retrieve users. + | + | The expiry time is the number of minutes that each reset token will be + | considered valid. This security feature keeps tokens short-lived so + | they have less time to be guessed. You may change this as needed. + | + | The throttle setting is the number of seconds a user must wait before + | generating more password reset tokens. This prevents the user from + | quickly generating a very large amount of password reset tokens. + | + */ + + 'passwords' => [ + 'users' => [ + 'provider' => 'users', + 'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'), + 'expire' => 60, + 'throttle' => 60, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Password Confirmation Timeout + |-------------------------------------------------------------------------- + | + | Here you may define the number of seconds before a password confirmation + | window expires and users are asked to re-enter their password via the + | confirmation screen. By default, the timeout lasts for three hours. + | + */ + + 'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800), + +]; diff --git a/backend/config/cache.php b/backend/config/cache.php new file mode 100644 index 0000000..b32aead --- /dev/null +++ b/backend/config/cache.php @@ -0,0 +1,117 @@ + env('CACHE_STORE', 'database'), + + /* + |-------------------------------------------------------------------------- + | Cache Stores + |-------------------------------------------------------------------------- + | + | Here you may define all of the cache "stores" for your application as + | well as their drivers. You may even define multiple stores for the + | same cache driver to group types of items stored in your caches. + | + | Supported drivers: "array", "database", "file", "memcached", + | "redis", "dynamodb", "octane", + | "failover", "null" + | + */ + + 'stores' => [ + + 'array' => [ + 'driver' => 'array', + 'serialize' => false, + ], + + 'database' => [ + 'driver' => 'database', + 'connection' => env('DB_CACHE_CONNECTION'), + 'table' => env('DB_CACHE_TABLE', 'cache'), + 'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'), + 'lock_table' => env('DB_CACHE_LOCK_TABLE'), + ], + + 'file' => [ + 'driver' => 'file', + 'path' => storage_path('framework/cache/data'), + 'lock_path' => storage_path('framework/cache/data'), + ], + + 'memcached' => [ + 'driver' => 'memcached', + 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), + 'sasl' => [ + env('MEMCACHED_USERNAME'), + env('MEMCACHED_PASSWORD'), + ], + 'options' => [ + // Memcached::OPT_CONNECT_TIMEOUT => 2000, + ], + 'servers' => [ + [ + 'host' => env('MEMCACHED_HOST', '127.0.0.1'), + 'port' => env('MEMCACHED_PORT', 11211), + 'weight' => 100, + ], + ], + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => env('REDIS_CACHE_CONNECTION', 'cache'), + 'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'), + ], + + 'dynamodb' => [ + 'driver' => 'dynamodb', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), + 'endpoint' => env('DYNAMODB_ENDPOINT'), + ], + + 'octane' => [ + 'driver' => 'octane', + ], + + 'failover' => [ + 'driver' => 'failover', + 'stores' => [ + 'database', + 'array', + ], + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Cache Key Prefix + |-------------------------------------------------------------------------- + | + | When utilizing the APC, database, memcached, Redis, and DynamoDB cache + | stores, there might be other applications using the same cache. For + | that reason, you may prefix every cache key to avoid collisions. + | + */ + + 'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-cache-'), + +]; diff --git a/backend/config/cors.php b/backend/config/cors.php new file mode 100644 index 0000000..36dd665 --- /dev/null +++ b/backend/config/cors.php @@ -0,0 +1,18 @@ + ['api/*', 'sanctum/csrf-cookie'], + 'allowed_methods' => ['*'], + 'allowed_origins' => array_values(array_filter([ + $frontendUrl, + env('APP_ENV') === 'local' ? 'http://localhost:4004' : null, + env('APP_ENV') === 'local' ? 'http://127.0.0.1:4004' : null, + ])), + 'allowed_origins_patterns' => [], + 'allowed_headers' => ['Content-Type', 'X-Requested-With', 'Authorization', 'Accept', 'Origin'], + 'exposed_headers' => [], + 'max_age' => 0, + 'supports_credentials' => true, +]; diff --git a/backend/config/database.php b/backend/config/database.php new file mode 100644 index 0000000..64709ce --- /dev/null +++ b/backend/config/database.php @@ -0,0 +1,184 @@ + env('DB_CONNECTION', 'sqlite'), + + /* + |-------------------------------------------------------------------------- + | Database Connections + |-------------------------------------------------------------------------- + | + | Below are all of the database connections defined for your application. + | An example configuration is provided for each database system which + | is supported by Laravel. You're free to add / remove connections. + | + */ + + 'connections' => [ + + 'sqlite' => [ + 'driver' => 'sqlite', + 'url' => env('DB_URL'), + 'database' => env('DB_DATABASE', database_path('database.sqlite')), + 'prefix' => '', + 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), + 'busy_timeout' => null, + 'journal_mode' => null, + 'synchronous' => null, + 'transaction_mode' => 'DEFERRED', + ], + + 'mysql' => [ + 'driver' => 'mysql', + 'url' => env('DB_URL'), + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '3306'), + 'database' => env('DB_DATABASE', 'laravel'), + 'username' => env('DB_USERNAME', 'root'), + 'password' => env('DB_PASSWORD', ''), + 'unix_socket' => env('DB_SOCKET', ''), + 'charset' => env('DB_CHARSET', 'utf8mb4'), + 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), + 'prefix' => '', + 'prefix_indexes' => true, + 'strict' => true, + 'engine' => null, + 'options' => extension_loaded('pdo_mysql') ? array_filter([ + (PHP_VERSION_ID >= 80500 ? Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'), + ]) : [], + ], + + 'mariadb' => [ + 'driver' => 'mariadb', + 'url' => env('DB_URL'), + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '3306'), + 'database' => env('DB_DATABASE', 'laravel'), + 'username' => env('DB_USERNAME', 'root'), + 'password' => env('DB_PASSWORD', ''), + 'unix_socket' => env('DB_SOCKET', ''), + 'charset' => env('DB_CHARSET', 'utf8mb4'), + 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), + 'prefix' => '', + 'prefix_indexes' => true, + 'strict' => true, + 'engine' => null, + 'options' => extension_loaded('pdo_mysql') ? array_filter([ + (PHP_VERSION_ID >= 80500 ? Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'), + ]) : [], + ], + + 'pgsql' => [ + 'driver' => 'pgsql', + 'url' => env('DB_URL'), + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '5432'), + 'database' => env('DB_DATABASE', 'laravel'), + 'username' => env('DB_USERNAME', 'root'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => env('DB_CHARSET', 'utf8'), + 'prefix' => '', + 'prefix_indexes' => true, + 'search_path' => 'public', + 'sslmode' => env('DB_SSLMODE', 'prefer'), + ], + + 'sqlsrv' => [ + 'driver' => 'sqlsrv', + 'url' => env('DB_URL'), + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', '1433'), + 'database' => env('DB_DATABASE', 'laravel'), + 'username' => env('DB_USERNAME', 'root'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => env('DB_CHARSET', 'utf8'), + 'prefix' => '', + 'prefix_indexes' => true, + // 'encrypt' => env('DB_ENCRYPT', 'yes'), + // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Migration Repository Table + |-------------------------------------------------------------------------- + | + | This table keeps track of all the migrations that have already run for + | your application. Using this information, we can determine which of + | the migrations on disk haven't actually been run on the database. + | + */ + + 'migrations' => [ + 'table' => 'migrations', + 'update_date_on_publish' => true, + ], + + /* + |-------------------------------------------------------------------------- + | Redis Databases + |-------------------------------------------------------------------------- + | + | Redis is an open source, fast, and advanced key-value store that also + | provides a richer body of commands than a typical key-value system + | such as Memcached. You may define your connection settings here. + | + */ + + 'redis' => [ + + 'client' => env('REDIS_CLIENT', 'phpredis'), + + 'options' => [ + 'cluster' => env('REDIS_CLUSTER', 'redis'), + 'prefix' => env('REDIS_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-database-'), + 'persistent' => env('REDIS_PERSISTENT', false), + ], + + 'default' => [ + 'url' => env('REDIS_URL'), + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'username' => env('REDIS_USERNAME'), + 'password' => env('REDIS_PASSWORD'), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_DB', '0'), + 'max_retries' => env('REDIS_MAX_RETRIES', 3), + 'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'), + 'backoff_base' => env('REDIS_BACKOFF_BASE', 100), + 'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000), + ], + + 'cache' => [ + 'url' => env('REDIS_URL'), + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'username' => env('REDIS_USERNAME'), + 'password' => env('REDIS_PASSWORD'), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_CACHE_DB', '1'), + 'max_retries' => env('REDIS_MAX_RETRIES', 3), + 'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'), + 'backoff_base' => env('REDIS_BACKOFF_BASE', 100), + 'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000), + ], + + ], + +]; diff --git a/backend/config/filesystems.php b/backend/config/filesystems.php new file mode 100644 index 0000000..37d8fca --- /dev/null +++ b/backend/config/filesystems.php @@ -0,0 +1,80 @@ + env('FILESYSTEM_DISK', 'local'), + + /* + |-------------------------------------------------------------------------- + | Filesystem Disks + |-------------------------------------------------------------------------- + | + | Below you may configure as many filesystem disks as necessary, and you + | may even configure multiple disks for the same driver. Examples for + | most supported storage drivers are configured here for reference. + | + | Supported drivers: "local", "ftp", "sftp", "s3" + | + */ + + 'disks' => [ + + 'local' => [ + 'driver' => 'local', + 'root' => storage_path('app/private'), + 'serve' => true, + 'throw' => false, + 'report' => false, + ], + + 'public' => [ + 'driver' => 'local', + 'root' => storage_path('app/public'), + 'url' => rtrim(env('APP_URL', 'http://localhost'), '/').'/storage', + 'visibility' => 'public', + 'throw' => false, + 'report' => false, + ], + + 's3' => [ + 'driver' => 's3', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION'), + 'bucket' => env('AWS_BUCKET'), + 'url' => env('AWS_URL'), + 'endpoint' => env('AWS_ENDPOINT'), + 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), + 'throw' => false, + 'report' => false, + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Symbolic Links + |-------------------------------------------------------------------------- + | + | Here you may configure the symbolic links that will be created when the + | `storage:link` Artisan command is executed. The array keys should be + | the locations of the links and the values should be their targets. + | + */ + + 'links' => [ + public_path('storage') => storage_path('app/public'), + ], + +]; diff --git a/backend/config/logging.php b/backend/config/logging.php new file mode 100644 index 0000000..b09cb25 --- /dev/null +++ b/backend/config/logging.php @@ -0,0 +1,132 @@ + env('LOG_CHANNEL', 'stack'), + + /* + |-------------------------------------------------------------------------- + | Deprecations Log Channel + |-------------------------------------------------------------------------- + | + | This option controls the log channel that should be used to log warnings + | regarding deprecated PHP and library features. This allows you to get + | your application ready for upcoming major versions of dependencies. + | + */ + + 'deprecations' => [ + 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + 'trace' => env('LOG_DEPRECATIONS_TRACE', false), + ], + + /* + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Laravel + | utilizes the Monolog PHP logging library, which includes a variety + | of powerful log handlers and formatters that you're free to use. + | + | Available drivers: "single", "daily", "slack", "syslog", + | "errorlog", "monolog", "custom", "stack" + | + */ + + 'channels' => [ + + 'stack' => [ + 'driver' => 'stack', + 'channels' => explode(',', (string) env('LOG_STACK', 'single')), + 'ignore_exceptions' => false, + ], + + 'single' => [ + 'driver' => 'single', + 'path' => storage_path('logs/laravel.log'), + 'level' => env('LOG_LEVEL', 'debug'), + 'replace_placeholders' => true, + ], + + 'daily' => [ + 'driver' => 'daily', + 'path' => storage_path('logs/laravel.log'), + 'level' => env('LOG_LEVEL', 'debug'), + 'days' => env('LOG_DAILY_DAYS', 14), + 'replace_placeholders' => true, + ], + + 'slack' => [ + 'driver' => 'slack', + 'url' => env('LOG_SLACK_WEBHOOK_URL'), + 'username' => env('LOG_SLACK_USERNAME', env('APP_NAME', 'Laravel')), + 'emoji' => env('LOG_SLACK_EMOJI', ':boom:'), + 'level' => env('LOG_LEVEL', 'critical'), + 'replace_placeholders' => true, + ], + + 'papertrail' => [ + 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), + 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), + 'handler_with' => [ + 'host' => env('PAPERTRAIL_URL'), + 'port' => env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), + ], + 'processors' => [PsrLogMessageProcessor::class], + ], + + 'stderr' => [ + 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), + 'handler' => StreamHandler::class, + 'handler_with' => [ + 'stream' => 'php://stderr', + ], + 'formatter' => env('LOG_STDERR_FORMATTER'), + 'processors' => [PsrLogMessageProcessor::class], + ], + + 'syslog' => [ + 'driver' => 'syslog', + 'level' => env('LOG_LEVEL', 'debug'), + 'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER), + 'replace_placeholders' => true, + ], + + 'errorlog' => [ + 'driver' => 'errorlog', + 'level' => env('LOG_LEVEL', 'debug'), + 'replace_placeholders' => true, + ], + + 'null' => [ + 'driver' => 'monolog', + 'handler' => NullHandler::class, + ], + + 'emergency' => [ + 'path' => storage_path('logs/laravel.log'), + ], + + ], + +]; diff --git a/backend/config/mail.php b/backend/config/mail.php new file mode 100644 index 0000000..e32e88d --- /dev/null +++ b/backend/config/mail.php @@ -0,0 +1,118 @@ + env('MAIL_MAILER', 'log'), + + /* + |-------------------------------------------------------------------------- + | Mailer Configurations + |-------------------------------------------------------------------------- + | + | Here you may configure all of the mailers used by your application plus + | their respective settings. Several examples have been configured for + | you and you are free to add your own as your application requires. + | + | Laravel supports a variety of mail "transport" drivers that can be used + | when delivering an email. You may specify which one you're using for + | your mailers below. You may also add additional mailers if needed. + | + | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", + | "postmark", "resend", "log", "array", + | "failover", "roundrobin" + | + */ + + 'mailers' => [ + + 'smtp' => [ + 'transport' => 'smtp', + 'scheme' => env('MAIL_SCHEME'), + 'url' => env('MAIL_URL'), + 'host' => env('MAIL_HOST', '127.0.0.1'), + 'port' => env('MAIL_PORT', 2525), + 'username' => env('MAIL_USERNAME'), + 'password' => env('MAIL_PASSWORD'), + 'timeout' => null, + 'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url((string) env('APP_URL', 'http://localhost'), PHP_URL_HOST)), + ], + + 'ses' => [ + 'transport' => 'ses', + ], + + 'postmark' => [ + 'transport' => 'postmark', + // 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'), + // 'client' => [ + // 'timeout' => 5, + // ], + ], + + 'resend' => [ + 'transport' => 'resend', + ], + + 'sendmail' => [ + 'transport' => 'sendmail', + 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), + ], + + 'log' => [ + 'transport' => 'log', + 'channel' => env('MAIL_LOG_CHANNEL'), + ], + + 'array' => [ + 'transport' => 'array', + ], + + 'failover' => [ + 'transport' => 'failover', + 'mailers' => [ + 'smtp', + 'log', + ], + 'retry_after' => 60, + ], + + 'roundrobin' => [ + 'transport' => 'roundrobin', + 'mailers' => [ + 'ses', + 'postmark', + ], + 'retry_after' => 60, + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Global "From" Address + |-------------------------------------------------------------------------- + | + | You may wish for all emails sent by your application to be sent from + | the same address. Here you may specify a name and address that is + | used globally for all emails that are sent by your application. + | + */ + + 'from' => [ + 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), + 'name' => env('MAIL_FROM_NAME', env('APP_NAME', 'Laravel')), + ], + +]; diff --git a/backend/config/queue.php b/backend/config/queue.php new file mode 100644 index 0000000..79c2c0a --- /dev/null +++ b/backend/config/queue.php @@ -0,0 +1,129 @@ + env('QUEUE_CONNECTION', 'database'), + + /* + |-------------------------------------------------------------------------- + | Queue Connections + |-------------------------------------------------------------------------- + | + | Here you may configure the connection options for every queue backend + | used by your application. An example configuration is provided for + | each backend supported by Laravel. You're also free to add more. + | + | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", + | "deferred", "background", "failover", "null" + | + */ + + 'connections' => [ + + 'sync' => [ + 'driver' => 'sync', + ], + + 'database' => [ + 'driver' => 'database', + 'connection' => env('DB_QUEUE_CONNECTION'), + 'table' => env('DB_QUEUE_TABLE', 'jobs'), + 'queue' => env('DB_QUEUE', 'default'), + 'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90), + 'after_commit' => false, + ], + + 'beanstalkd' => [ + 'driver' => 'beanstalkd', + 'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'), + 'queue' => env('BEANSTALKD_QUEUE', 'default'), + 'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90), + 'block_for' => 0, + 'after_commit' => false, + ], + + 'sqs' => [ + 'driver' => 'sqs', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), + 'queue' => env('SQS_QUEUE', 'default'), + 'suffix' => env('SQS_SUFFIX'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'after_commit' => false, + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => env('REDIS_QUEUE_CONNECTION', 'default'), + 'queue' => env('REDIS_QUEUE', 'default'), + 'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90), + 'block_for' => null, + 'after_commit' => false, + ], + + 'deferred' => [ + 'driver' => 'deferred', + ], + + 'background' => [ + 'driver' => 'background', + ], + + 'failover' => [ + 'driver' => 'failover', + 'connections' => [ + 'database', + 'deferred', + ], + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Job Batching + |-------------------------------------------------------------------------- + | + | The following options configure the database and table that store job + | batching information. These options can be updated to any database + | connection and table which has been defined by your application. + | + */ + + 'batching' => [ + 'database' => env('DB_CONNECTION', 'sqlite'), + 'table' => 'job_batches', + ], + + /* + |-------------------------------------------------------------------------- + | Failed Queue Jobs + |-------------------------------------------------------------------------- + | + | These options configure the behavior of failed queue job logging so you + | can control how and where failed jobs are stored. Laravel ships with + | support for storing failed jobs in a simple file or in a database. + | + | Supported drivers: "database-uuids", "dynamodb", "file", "null" + | + */ + + 'failed' => [ + 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), + 'database' => env('DB_CONNECTION', 'sqlite'), + 'table' => 'failed_jobs', + ], + +]; diff --git a/backend/config/sanctum.php b/backend/config/sanctum.php new file mode 100644 index 0000000..379cf8c --- /dev/null +++ b/backend/config/sanctum.php @@ -0,0 +1,28 @@ + explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( + '%s%s', + 'localhost,localhost:3000,localhost:5173,127.0.0.1,127.0.0.1:8000,::1', + Sanctum::currentApplicationUrlWithPort(), + ))), + + 'guard' => ['web'], + + 'expiration' => null, + + 'token_prefix' => env('SANCTUM_TOKEN_PREFIX', ''), + + 'middleware' => [ + 'authenticate_session' => AuthenticateSession::class, + 'encrypt_cookies' => EncryptCookies::class, + 'validate_csrf_token' => ValidateCsrfToken::class, + ], + +]; diff --git a/backend/config/services.php b/backend/config/services.php new file mode 100644 index 0000000..6a90eb8 --- /dev/null +++ b/backend/config/services.php @@ -0,0 +1,38 @@ + [ + 'key' => env('POSTMARK_API_KEY'), + ], + + 'resend' => [ + 'key' => env('RESEND_API_KEY'), + ], + + 'ses' => [ + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + ], + + 'slack' => [ + 'notifications' => [ + 'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'), + 'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'), + ], + ], + +]; diff --git a/backend/config/session.php b/backend/config/session.php new file mode 100644 index 0000000..5b541b7 --- /dev/null +++ b/backend/config/session.php @@ -0,0 +1,217 @@ + env('SESSION_DRIVER', 'database'), + + /* + |-------------------------------------------------------------------------- + | Session Lifetime + |-------------------------------------------------------------------------- + | + | Here you may specify the number of minutes that you wish the session + | to be allowed to remain idle before it expires. If you want them + | to expire immediately when the browser is closed then you may + | indicate that via the expire_on_close configuration option. + | + */ + + 'lifetime' => (int) env('SESSION_LIFETIME', 120), + + 'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false), + + /* + |-------------------------------------------------------------------------- + | Session Encryption + |-------------------------------------------------------------------------- + | + | This option allows you to easily specify that all of your session data + | should be encrypted before it's stored. All encryption is performed + | automatically by Laravel and you may use the session like normal. + | + */ + + 'encrypt' => env('SESSION_ENCRYPT', false), + + /* + |-------------------------------------------------------------------------- + | Session File Location + |-------------------------------------------------------------------------- + | + | When utilizing the "file" session driver, the session files are placed + | on disk. The default storage location is defined here; however, you + | are free to provide another location where they should be stored. + | + */ + + 'files' => storage_path('framework/sessions'), + + /* + |-------------------------------------------------------------------------- + | Session Database Connection + |-------------------------------------------------------------------------- + | + | When using the "database" or "redis" session drivers, you may specify a + | connection that should be used to manage these sessions. This should + | correspond to a connection in your database configuration options. + | + */ + + 'connection' => env('SESSION_CONNECTION'), + + /* + |-------------------------------------------------------------------------- + | Session Database Table + |-------------------------------------------------------------------------- + | + | When using the "database" session driver, you may specify the table to + | be used to store sessions. Of course, a sensible default is defined + | for you; however, you're welcome to change this to another table. + | + */ + + 'table' => env('SESSION_TABLE', 'sessions'), + + /* + |-------------------------------------------------------------------------- + | Session Cache Store + |-------------------------------------------------------------------------- + | + | When using one of the framework's cache driven session backends, you may + | define the cache store which should be used to store the session data + | between requests. This must match one of your defined cache stores. + | + | Affects: "dynamodb", "memcached", "redis" + | + */ + + 'store' => env('SESSION_STORE'), + + /* + |-------------------------------------------------------------------------- + | Session Sweeping Lottery + |-------------------------------------------------------------------------- + | + | Some session drivers must manually sweep their storage location to get + | rid of old sessions from storage. Here are the chances that it will + | happen on a given request. By default, the odds are 2 out of 100. + | + */ + + 'lottery' => [2, 100], + + /* + |-------------------------------------------------------------------------- + | Session Cookie Name + |-------------------------------------------------------------------------- + | + | Here you may change the name of the session cookie that is created by + | the framework. Typically, you should not need to change this value + | since doing so does not grant a meaningful security improvement. + | + */ + + 'cookie' => env( + 'SESSION_COOKIE', + Str::slug((string) env('APP_NAME', 'laravel')).'-session' + ), + + /* + |-------------------------------------------------------------------------- + | Session Cookie Path + |-------------------------------------------------------------------------- + | + | The session cookie path determines the path for which the cookie will + | be regarded as available. Typically, this will be the root path of + | your application, but you're free to change this when necessary. + | + */ + + 'path' => env('SESSION_PATH', '/'), + + /* + |-------------------------------------------------------------------------- + | Session Cookie Domain + |-------------------------------------------------------------------------- + | + | This value determines the domain and subdomains the session cookie is + | available to. By default, the cookie will be available to the root + | domain without subdomains. Typically, this shouldn't be changed. + | + */ + + 'domain' => env('SESSION_DOMAIN'), + + /* + |-------------------------------------------------------------------------- + | HTTPS Only Cookies + |-------------------------------------------------------------------------- + | + | By setting this option to true, session cookies will only be sent back + | to the server if the browser has a HTTPS connection. This will keep + | the cookie from being sent to you when it can't be done securely. + | + */ + + 'secure' => env('SESSION_SECURE_COOKIE'), + + /* + |-------------------------------------------------------------------------- + | HTTP Access Only + |-------------------------------------------------------------------------- + | + | Setting this value to true will prevent JavaScript from accessing the + | value of the cookie and the cookie will only be accessible through + | the HTTP protocol. It's unlikely you should disable this option. + | + */ + + 'http_only' => env('SESSION_HTTP_ONLY', true), + + /* + |-------------------------------------------------------------------------- + | Same-Site Cookies + |-------------------------------------------------------------------------- + | + | This option determines how your cookies behave when cross-site requests + | take place, and can be used to mitigate CSRF attacks. By default, we + | will set this value to "lax" to permit secure cross-site requests. + | + | See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value + | + | Supported: "lax", "strict", "none", null + | + */ + + 'same_site' => env('SESSION_SAME_SITE', 'lax'), + + /* + |-------------------------------------------------------------------------- + | Partitioned Cookies + |-------------------------------------------------------------------------- + | + | Setting this value to true will tie the cookie to the top-level site for + | a cross-site context. Partitioned cookies are accepted by the browser + | when flagged "secure" and the Same-Site attribute is set to "none". + | + */ + + 'partitioned' => env('SESSION_PARTITIONED_COOKIE', false), + +]; diff --git a/backend/database/.gitignore b/backend/database/.gitignore new file mode 100644 index 0000000..9b19b93 --- /dev/null +++ b/backend/database/.gitignore @@ -0,0 +1 @@ +*.sqlite* diff --git a/backend/database/factories/UserFactory.php b/backend/database/factories/UserFactory.php new file mode 100644 index 0000000..c4ceb07 --- /dev/null +++ b/backend/database/factories/UserFactory.php @@ -0,0 +1,45 @@ + + */ +class UserFactory extends Factory +{ + /** + * The current password being used by the factory. + */ + protected static ?string $password; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'name' => fake()->name(), + 'email' => fake()->unique()->safeEmail(), + 'email_verified_at' => now(), + 'password' => static::$password ??= Hash::make('password'), + 'remember_token' => Str::random(10), + ]; + } + + /** + * Indicate that the model's email address should be unverified. + */ + public function unverified(): static + { + return $this->state(fn (array $attributes) => [ + 'email_verified_at' => null, + ]); + } +} diff --git a/backend/database/migrations/0001_01_01_000000_create_users_table.php b/backend/database/migrations/0001_01_01_000000_create_users_table.php new file mode 100644 index 0000000..05fb5d9 --- /dev/null +++ b/backend/database/migrations/0001_01_01_000000_create_users_table.php @@ -0,0 +1,49 @@ +id(); + $table->string('name'); + $table->string('email')->unique(); + $table->timestamp('email_verified_at')->nullable(); + $table->string('password'); + $table->rememberToken(); + $table->timestamps(); + }); + + Schema::create('password_reset_tokens', function (Blueprint $table) { + $table->string('email')->primary(); + $table->string('token'); + $table->timestamp('created_at')->nullable(); + }); + + Schema::create('sessions', function (Blueprint $table) { + $table->string('id')->primary(); + $table->foreignId('user_id')->nullable()->index(); + $table->string('ip_address', 45)->nullable(); + $table->text('user_agent')->nullable(); + $table->longText('payload'); + $table->integer('last_activity')->index(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('users'); + Schema::dropIfExists('password_reset_tokens'); + Schema::dropIfExists('sessions'); + } +}; diff --git a/backend/database/migrations/0001_01_01_000001_create_cache_table.php b/backend/database/migrations/0001_01_01_000001_create_cache_table.php new file mode 100644 index 0000000..ed758bd --- /dev/null +++ b/backend/database/migrations/0001_01_01_000001_create_cache_table.php @@ -0,0 +1,35 @@ +string('key')->primary(); + $table->mediumText('value'); + $table->integer('expiration')->index(); + }); + + Schema::create('cache_locks', function (Blueprint $table) { + $table->string('key')->primary(); + $table->string('owner'); + $table->integer('expiration')->index(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('cache'); + Schema::dropIfExists('cache_locks'); + } +}; diff --git a/backend/database/migrations/0001_01_01_000002_create_jobs_table.php b/backend/database/migrations/0001_01_01_000002_create_jobs_table.php new file mode 100644 index 0000000..425e705 --- /dev/null +++ b/backend/database/migrations/0001_01_01_000002_create_jobs_table.php @@ -0,0 +1,57 @@ +id(); + $table->string('queue')->index(); + $table->longText('payload'); + $table->unsignedTinyInteger('attempts'); + $table->unsignedInteger('reserved_at')->nullable(); + $table->unsignedInteger('available_at'); + $table->unsignedInteger('created_at'); + }); + + Schema::create('job_batches', function (Blueprint $table) { + $table->string('id')->primary(); + $table->string('name'); + $table->integer('total_jobs'); + $table->integer('pending_jobs'); + $table->integer('failed_jobs'); + $table->longText('failed_job_ids'); + $table->mediumText('options')->nullable(); + $table->integer('cancelled_at')->nullable(); + $table->integer('created_at'); + $table->integer('finished_at')->nullable(); + }); + + Schema::create('failed_jobs', function (Blueprint $table) { + $table->id(); + $table->string('uuid')->unique(); + $table->text('connection'); + $table->text('queue'); + $table->longText('payload'); + $table->longText('exception'); + $table->timestamp('failed_at')->useCurrent(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('jobs'); + Schema::dropIfExists('job_batches'); + Schema::dropIfExists('failed_jobs'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000003_create_roles_table.php b/backend/database/migrations/2024_01_01_000003_create_roles_table.php new file mode 100644 index 0000000..1f00ac0 --- /dev/null +++ b/backend/database/migrations/2024_01_01_000003_create_roles_table.php @@ -0,0 +1,25 @@ +id(); + $table->string('name')->unique(); + $table->string('display_name'); + $table->text('description')->nullable(); + $table->string('guard_name')->default('web'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('roles'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000004_create_permissions_table.php b/backend/database/migrations/2024_01_01_000004_create_permissions_table.php new file mode 100644 index 0000000..2941ebe --- /dev/null +++ b/backend/database/migrations/2024_01_01_000004_create_permissions_table.php @@ -0,0 +1,25 @@ +id(); + $table->string('name')->unique(); + $table->string('display_name'); + $table->string('guard_name')->default('web'); + $table->string('module'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('permissions'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000005_create_role_user_table.php b/backend/database/migrations/2024_01_01_000005_create_role_user_table.php new file mode 100644 index 0000000..bb8804f --- /dev/null +++ b/backend/database/migrations/2024_01_01_000005_create_role_user_table.php @@ -0,0 +1,23 @@ +id(); + $table->foreignId('role_id')->constrained()->onDelete('cascade'); + $table->foreignId('user_id')->constrained()->onDelete('cascade'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('role_user'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000006_create_permission_role_table.php b/backend/database/migrations/2024_01_01_000006_create_permission_role_table.php new file mode 100644 index 0000000..0517ef3 --- /dev/null +++ b/backend/database/migrations/2024_01_01_000006_create_permission_role_table.php @@ -0,0 +1,23 @@ +id(); + $table->foreignId('permission_id')->constrained()->onDelete('cascade'); + $table->foreignId('role_id')->constrained()->onDelete('cascade'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('permission_role'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000007_add_role_fields_to_users_table.php b/backend/database/migrations/2024_01_01_000007_add_role_fields_to_users_table.php new file mode 100644 index 0000000..1c70834 --- /dev/null +++ b/backend/database/migrations/2024_01_01_000007_add_role_fields_to_users_table.php @@ -0,0 +1,32 @@ +foreignId('role_id')->nullable()->constrained()->onDelete('set null'); + $table->string('phone')->nullable(); + $table->string('job_title')->nullable(); + $table->string('department')->nullable(); + $table->string('status')->default('active'); + $table->json('skills')->nullable(); + $table->string('avatar')->nullable(); + }); + } + + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropForeign(['role_id']); + $table->dropColumn([ + 'role_id', 'phone', 'job_title', 'department', + 'status', 'skills', 'avatar', + ]); + }); + } +}; diff --git a/backend/database/migrations/2024_01_01_000008_create_projects_table.php b/backend/database/migrations/2024_01_01_000008_create_projects_table.php new file mode 100644 index 0000000..3f0cfba --- /dev/null +++ b/backend/database/migrations/2024_01_01_000008_create_projects_table.php @@ -0,0 +1,38 @@ +id(); + $table->string('title'); + $table->text('description')->nullable(); + $table->string('client')->nullable(); + $table->foreignId('project_manager_id')->constrained('users')->onDelete('cascade'); + $table->date('start_date')->nullable(); + $table->date('end_date')->nullable(); + $table->string('priority')->default('medium'); + $table->string('status')->default('planning'); + $table->integer('progress')->default(0); + $table->string('risk_level')->nullable(); + $table->decimal('budget', 12, 2)->nullable(); + $table->decimal('estimated_hours', 10, 2)->nullable(); + $table->decimal('actual_hours', 10, 2)->nullable(); + $table->json('tags')->nullable(); + $table->text('notes')->nullable(); + $table->boolean('is_archived')->default(false); + $table->foreignId('created_by')->constrained('users')->onDelete('cascade'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('projects'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000009_create_project_user_table.php b/backend/database/migrations/2024_01_01_000009_create_project_user_table.php new file mode 100644 index 0000000..195e669 --- /dev/null +++ b/backend/database/migrations/2024_01_01_000009_create_project_user_table.php @@ -0,0 +1,24 @@ +id(); + $table->foreignId('project_id')->constrained()->onDelete('cascade'); + $table->foreignId('user_id')->constrained()->onDelete('cascade'); + $table->string('role_in_project')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('project_user'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000010_create_tasks_table.php b/backend/database/migrations/2024_01_01_000010_create_tasks_table.php new file mode 100644 index 0000000..5284c24 --- /dev/null +++ b/backend/database/migrations/2024_01_01_000010_create_tasks_table.php @@ -0,0 +1,35 @@ +id(); + $table->string('title'); + $table->text('description')->nullable(); + $table->foreignId('project_id')->constrained()->onDelete('cascade'); + $table->foreignId('assignee_id')->nullable()->constrained('users')->onDelete('set null'); + $table->foreignId('reporter_id')->constrained('users')->onDelete('cascade'); + $table->string('priority')->default('medium'); + $table->string('status')->default('todo'); + $table->date('start_date')->nullable(); + $table->date('due_date')->nullable(); + $table->decimal('estimated_time', 10, 2)->nullable(); + $table->decimal('actual_time', 10, 2)->nullable(); + $table->json('tags')->nullable(); + $table->integer('sort_order')->default(0); + $table->foreignId('created_by')->constrained('users')->onDelete('cascade'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('tasks'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000011_create_checklists_table.php b/backend/database/migrations/2024_01_01_000011_create_checklists_table.php new file mode 100644 index 0000000..649421d --- /dev/null +++ b/backend/database/migrations/2024_01_01_000011_create_checklists_table.php @@ -0,0 +1,25 @@ +id(); + $table->foreignId('task_id')->constrained()->onDelete('cascade'); + $table->string('title'); + $table->boolean('is_completed')->default(false); + $table->integer('position')->default(0); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('checklists'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000012_create_subtasks_table.php b/backend/database/migrations/2024_01_01_000012_create_subtasks_table.php new file mode 100644 index 0000000..34a4baa --- /dev/null +++ b/backend/database/migrations/2024_01_01_000012_create_subtasks_table.php @@ -0,0 +1,28 @@ +id(); + $table->foreignId('task_id')->constrained()->onDelete('cascade'); + $table->string('title'); + $table->text('description')->nullable(); + $table->foreignId('assignee_id')->nullable()->constrained('users')->onDelete('set null'); + $table->string('status')->default('todo'); + $table->date('due_date')->nullable(); + $table->integer('position')->default(0); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('subtasks'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000013_create_sprints_table.php b/backend/database/migrations/2024_01_01_000013_create_sprints_table.php new file mode 100644 index 0000000..944e03b --- /dev/null +++ b/backend/database/migrations/2024_01_01_000013_create_sprints_table.php @@ -0,0 +1,28 @@ +id(); + $table->string('title'); + $table->foreignId('project_id')->constrained()->onDelete('cascade'); + $table->text('goal')->nullable(); + $table->date('start_date'); + $table->date('end_date'); + $table->string('status')->default('planning'); + $table->foreignId('created_by')->constrained('users')->onDelete('cascade'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('sprints'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000014_create_sprint_task_table.php b/backend/database/migrations/2024_01_01_000014_create_sprint_task_table.php new file mode 100644 index 0000000..d2470f0 --- /dev/null +++ b/backend/database/migrations/2024_01_01_000014_create_sprint_task_table.php @@ -0,0 +1,23 @@ +id(); + $table->foreignId('sprint_id')->constrained()->onDelete('cascade'); + $table->foreignId('task_id')->constrained()->onDelete('cascade'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('sprint_task'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000015_create_backlog_items_table.php b/backend/database/migrations/2024_01_01_000015_create_backlog_items_table.php new file mode 100644 index 0000000..e1688ff --- /dev/null +++ b/backend/database/migrations/2024_01_01_000015_create_backlog_items_table.php @@ -0,0 +1,30 @@ +id(); + $table->string('title'); + $table->text('description')->nullable(); + $table->string('type'); + $table->foreignId('project_id')->nullable()->constrained()->onDelete('cascade'); + $table->string('priority')->default('medium'); + $table->string('estimated_effort')->nullable(); + $table->string('status')->default('new'); + $table->foreignId('assigned_sprint_id')->nullable()->constrained('sprints')->onDelete('set null'); + $table->foreignId('created_by')->constrained('users')->onDelete('cascade'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('backlog_items'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000016_create_meetings_table.php b/backend/database/migrations/2024_01_01_000016_create_meetings_table.php new file mode 100644 index 0000000..5c48c4a --- /dev/null +++ b/backend/database/migrations/2024_01_01_000016_create_meetings_table.php @@ -0,0 +1,33 @@ +id(); + $table->string('title'); + $table->foreignId('project_id')->nullable()->constrained()->onDelete('cascade'); + $table->date('date'); + $table->time('start_time')->nullable(); + $table->time('end_time')->nullable(); + $table->string('location')->nullable(); + $table->string('meeting_link')->nullable(); + $table->string('meeting_type'); + $table->text('agenda')->nullable(); + $table->text('notes')->nullable(); + $table->text('decisions')->nullable(); + $table->foreignId('created_by')->constrained('users')->onDelete('cascade'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('meetings'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000017_create_meeting_user_table.php b/backend/database/migrations/2024_01_01_000017_create_meeting_user_table.php new file mode 100644 index 0000000..a282129 --- /dev/null +++ b/backend/database/migrations/2024_01_01_000017_create_meeting_user_table.php @@ -0,0 +1,23 @@ +id(); + $table->foreignId('meeting_id')->constrained()->onDelete('cascade'); + $table->foreignId('user_id')->constrained()->onDelete('cascade'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('meeting_user'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000018_create_meeting_action_items_table.php b/backend/database/migrations/2024_01_01_000018_create_meeting_action_items_table.php new file mode 100644 index 0000000..485d717 --- /dev/null +++ b/backend/database/migrations/2024_01_01_000018_create_meeting_action_items_table.php @@ -0,0 +1,27 @@ +id(); + $table->foreignId('meeting_id')->constrained()->onDelete('cascade'); + $table->string('title'); + $table->foreignId('assigned_to')->nullable()->constrained('users')->onDelete('set null'); + $table->date('due_date')->nullable(); + $table->boolean('is_completed')->default(false); + $table->foreignId('converted_to_task_id')->nullable()->constrained('tasks')->onDelete('set null'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('meeting_action_items'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000019_create_comments_table.php b/backend/database/migrations/2024_01_01_000019_create_comments_table.php new file mode 100644 index 0000000..a86c121 --- /dev/null +++ b/backend/database/migrations/2024_01_01_000019_create_comments_table.php @@ -0,0 +1,24 @@ +id(); + $table->text('body'); + $table->foreignId('user_id')->constrained()->onDelete('cascade'); + $table->morphs('commentable'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('comments'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000020_create_files_table.php b/backend/database/migrations/2024_01_01_000020_create_files_table.php new file mode 100644 index 0000000..2949b02 --- /dev/null +++ b/backend/database/migrations/2024_01_01_000020_create_files_table.php @@ -0,0 +1,28 @@ +id(); + $table->string('name'); + $table->string('original_name'); + $table->string('path'); + $table->string('mime_type'); + $table->integer('size'); + $table->nullableMorphs('fileable'); + $table->foreignId('user_id')->constrained()->onDelete('cascade'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('files'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000021_create_activity_logs_table.php b/backend/database/migrations/2024_01_01_000021_create_activity_logs_table.php new file mode 100644 index 0000000..08d21db --- /dev/null +++ b/backend/database/migrations/2024_01_01_000021_create_activity_logs_table.php @@ -0,0 +1,29 @@ +id(); + $table->foreignId('user_id')->nullable()->constrained()->onDelete('set null'); + $table->string('action'); + $table->text('description')->nullable(); + $table->string('subject_type')->nullable(); + $table->integer('subject_id')->nullable(); + $table->foreignId('project_id')->nullable()->constrained()->onDelete('cascade'); + $table->foreignId('task_id')->nullable()->constrained()->onDelete('cascade'); + $table->json('properties')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('activity_logs'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000022_create_settings_table.php b/backend/database/migrations/2024_01_01_000022_create_settings_table.php new file mode 100644 index 0000000..44f91a2 --- /dev/null +++ b/backend/database/migrations/2024_01_01_000022_create_settings_table.php @@ -0,0 +1,24 @@ +id(); + $table->string('key')->unique(); + $table->text('value')->nullable(); + $table->string('group')->default('general'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('settings'); + } +}; diff --git a/backend/database/migrations/2024_01_01_000023_create_notifications_table.php b/backend/database/migrations/2024_01_01_000023_create_notifications_table.php new file mode 100644 index 0000000..cbda66c --- /dev/null +++ b/backend/database/migrations/2024_01_01_000023_create_notifications_table.php @@ -0,0 +1,28 @@ +id(); + $table->foreignId('user_id')->constrained()->onDelete('cascade'); + $table->string('type'); + $table->string('title')->nullable(); + $table->text('body')->nullable(); + $table->json('data')->nullable(); + $table->boolean('is_read')->default(false); + $table->timestamp('read_at')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('notifications'); + } +}; diff --git a/backend/database/migrations/2026_06_27_170257_create_personal_access_tokens_table.php b/backend/database/migrations/2026_06_27_170257_create_personal_access_tokens_table.php new file mode 100644 index 0000000..40ff706 --- /dev/null +++ b/backend/database/migrations/2026_06_27_170257_create_personal_access_tokens_table.php @@ -0,0 +1,33 @@ +id(); + $table->morphs('tokenable'); + $table->text('name'); + $table->string('token', 64)->unique(); + $table->text('abilities')->nullable(); + $table->timestamp('last_used_at')->nullable(); + $table->timestamp('expires_at')->nullable()->index(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('personal_access_tokens'); + } +}; diff --git a/backend/database/migrations/2026_06_27_172544_make_project_manager_id_nullable_in_projects_table.php b/backend/database/migrations/2026_06_27_172544_make_project_manager_id_nullable_in_projects_table.php new file mode 100644 index 0000000..1aaffd9 --- /dev/null +++ b/backend/database/migrations/2026_06_27_172544_make_project_manager_id_nullable_in_projects_table.php @@ -0,0 +1,22 @@ +foreignId('project_manager_id')->nullable()->change(); + }); + } + + public function down(): void + { + Schema::table('projects', function (Blueprint $table) { + $table->foreignId('project_manager_id')->nullable(false)->change(); + }); + } +}; diff --git a/backend/database/migrations/2026_06_27_180000_create_departments_table.php b/backend/database/migrations/2026_06_27_180000_create_departments_table.php new file mode 100644 index 0000000..6fdcb0c --- /dev/null +++ b/backend/database/migrations/2026_06_27_180000_create_departments_table.php @@ -0,0 +1,31 @@ +id(); + $table->string('name'); + $table->string('description')->nullable(); + $table->unsignedBigInteger('parent_id')->nullable(); + $table->foreignId('manager_id')->nullable()->constrained('users')->onDelete('set null'); + $table->boolean('is_active')->default(true); + $table->integer('sort_order')->default(0); + $table->timestamps(); + }); + + Schema::table('departments', function (Blueprint $table) { + $table->foreign('parent_id')->references('id')->on('departments')->onDelete('set null'); + }); + } + + public function down(): void + { + Schema::dropIfExists('departments'); + } +}; diff --git a/backend/database/migrations/2026_06_27_180001_add_department_id_to_users_table.php b/backend/database/migrations/2026_06_27_180001_add_department_id_to_users_table.php new file mode 100644 index 0000000..4743ee4 --- /dev/null +++ b/backend/database/migrations/2026_06_27_180001_add_department_id_to_users_table.php @@ -0,0 +1,23 @@ +foreignId('department_id')->nullable()->constrained('departments')->nullOnDelete(); + }); + } + + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropForeign(['department_id']); + $table->dropColumn('department_id'); + }); + } +}; diff --git a/backend/database/migrations/2026_06_28_000000_sync_system_roles.php b/backend/database/migrations/2026_06_28_000000_sync_system_roles.php new file mode 100644 index 0000000..c8c3456 --- /dev/null +++ b/backend/database/migrations/2026_06_28_000000_sync_system_roles.php @@ -0,0 +1,70 @@ + 'admin', 'display_name' => 'ادمین', 'description' => 'دسترسی کامل به تمام بخش‌های سیستم'], + ['name' => 'project_manager', 'display_name' => 'مدیر پروژه', 'description' => 'مدیریت پروژه‌ها، وظایف و تیم‌ها'], + ['name' => 'product_manager', 'display_name' => 'مدیر محصول', 'description' => 'مدیریت بک‌لاگ، اولویت‌ها و گزارش محصول'], + ['name' => 'scrum_master', 'display_name' => 'اسکرام مستر', 'description' => 'مدیریت اسپرینت‌ها، جلسات و پیگیری تیم'], + ['name' => 'specialist', 'display_name' => 'کارشناس', 'description' => 'دسترسی پایه برای انجام وظایف محوله'], + ['name' => 'team_member', 'display_name' => 'کارشناس', 'description' => 'دسترسی پایه برای انجام وظایف محوله'], + ['name' => 'observer', 'display_name' => 'ناظر', 'description' => 'دسترسی مشاهده گزارشات و داشبورد'], + ['name' => 'ceo', 'display_name' => 'مدیر عامل', 'description' => 'دسترسی مشاهده سطح بالا برای مدیران ارشد'], + ]; + + foreach ($roles as $role) { + DB::table('roles')->updateOrInsert( + ['name' => $role['name']], + [ + 'display_name' => $role['display_name'], + 'description' => $role['description'], + 'guard_name' => 'web', + 'created_at' => $now, + 'updated_at' => $now, + ] + ); + } + + $roleIds = DB::table('roles')->pluck('id', 'name'); + $permissionIds = DB::table('permissions')->pluck('id', 'name'); + $syncRole = function (string $roleName, array $modules, array $actions) use ($roleIds, $permissionIds, $now) { + if (!$roleIds->has($roleName)) { + return; + } + + foreach ($permissionIds as $permissionName => $permissionId) { + [$module, $action] = explode('.', $permissionName); + if (!in_array($module, $modules, true) || !in_array($action, $actions, true)) { + continue; + } + + DB::table('permission_role')->updateOrInsert( + ['role_id' => $roleIds[$roleName], 'permission_id' => $permissionId], + ['created_at' => $now, 'updated_at' => $now] + ); + } + }; + + $syncRole('product_manager', ['projects', 'tasks', 'backlog', 'reports', 'comments', 'notifications'], ['view', 'create', 'edit', 'approve', 'reject', 'comment', 'report', 'export']); + $syncRole('scrum_master', ['projects', 'tasks', 'sprints', 'meetings', 'reports', 'team', 'comments', 'notifications'], ['view', 'create', 'edit', 'assign', 'comment', 'report']); + $syncRole('specialist', ['tasks', 'meetings', 'files', 'comments', 'notifications'], ['view', 'create', 'edit', 'comment', 'upload']); + $syncRole('specialist', ['projects', 'sprints', 'backlog', 'team'], ['view']); + } + + public function down(): void + { + $roleIds = DB::table('roles')->whereIn('name', ['product_manager', 'scrum_master', 'specialist'])->pluck('id'); + DB::table('permission_role')->whereIn('role_id', $roleIds)->delete(); + DB::table('roles')->whereIn('name', ['product_manager', 'scrum_master', 'specialist'])->delete(); + DB::table('roles')->where('name', 'admin')->update(['display_name' => 'مدیر سیستم']); + DB::table('roles')->where('name', 'ceo')->update(['display_name' => 'مدیرعامل']); + DB::table('roles')->where('name', 'team_member')->update(['display_name' => 'عضو تیم']); + } +}; diff --git a/backend/database/migrations/2026_06_28_000001_remove_legacy_team_member_role.php b/backend/database/migrations/2026_06_28_000001_remove_legacy_team_member_role.php new file mode 100644 index 0000000..b23a6d9 --- /dev/null +++ b/backend/database/migrations/2026_06_28_000001_remove_legacy_team_member_role.php @@ -0,0 +1,43 @@ +where('name', 'team_member')->value('id'); + $specialistId = DB::table('roles')->where('name', 'specialist')->value('id'); + + if (!$legacyId || !$specialistId) { + return; + } + + $legacyUsers = DB::table('role_user')->where('role_id', $legacyId)->get(); + foreach ($legacyUsers as $legacyUser) { + DB::table('role_user')->updateOrInsert( + ['role_id' => $specialistId, 'user_id' => $legacyUser->user_id], + ['created_at' => $legacyUser->created_at ?? now(), 'updated_at' => now()] + ); + } + + DB::table('role_user')->where('role_id', $legacyId)->delete(); + DB::table('permission_role')->where('role_id', $legacyId)->delete(); + DB::table('roles')->where('id', $legacyId)->delete(); + } + + public function down(): void + { + DB::table('roles')->updateOrInsert( + ['name' => 'team_member'], + [ + 'display_name' => 'عضو تیم', + 'description' => 'دسترسی پایه برای انجام وظایف محوله', + 'guard_name' => 'web', + 'created_at' => now(), + 'updated_at' => now(), + ] + ); + } +}; diff --git a/backend/database/migrations/2026_06_28_000002_backfill_user_status_and_roles.php b/backend/database/migrations/2026_06_28_000002_backfill_user_status_and_roles.php new file mode 100644 index 0000000..d3748a1 --- /dev/null +++ b/backend/database/migrations/2026_06_28_000002_backfill_user_status_and_roles.php @@ -0,0 +1,37 @@ +whereNull('status')->update(['status' => 'active']); + + $specialistId = DB::table('roles')->where('name', 'specialist')->value('id'); + if (!$specialistId) { + return; + } + + $usersWithoutRoles = DB::table('users') + ->leftJoin('role_user', 'users.id', '=', 'role_user.user_id') + ->whereNull('role_user.user_id') + ->select('users.id') + ->get(); + + foreach ($usersWithoutRoles as $user) { + DB::table('role_user')->insert([ + 'role_id' => $specialistId, + 'user_id' => $user->id, + 'created_at' => now(), + 'updated_at' => now(), + ]); + } + } + + public function down(): void + { + // Data backfill only; leave user status and roles intact on rollback. + } +}; diff --git a/backend/database/migrations/2026_06_28_000003_enhance_sprints.php b/backend/database/migrations/2026_06_28_000003_enhance_sprints.php new file mode 100644 index 0000000..59f1917 --- /dev/null +++ b/backend/database/migrations/2026_06_28_000003_enhance_sprints.php @@ -0,0 +1,74 @@ +decimal('capacity_hours', 8, 2)->nullable()->after('goal'); + } + if (!Schema::hasColumn('sprints', 'completed_at')) { + $table->timestamp('completed_at')->nullable()->after('status'); + } + if (!Schema::hasColumn('sprints', 'completion_summary')) { + $table->json('completion_summary')->nullable()->after('completed_at'); + } + }); + + Schema::create('sprint_members', function (Blueprint $table) { + $table->id(); + $table->foreignId('sprint_id')->constrained()->onDelete('cascade'); + $table->foreignId('user_id')->constrained()->onDelete('cascade'); + $table->timestamps(); + $table->unique(['sprint_id', 'user_id']); + }); + + Schema::create('sprint_retrospectives', function (Blueprint $table) { + $table->id(); + $table->foreignId('sprint_id')->unique()->constrained()->onDelete('cascade'); + $table->text('went_well')->nullable(); + $table->text('problems')->nullable(); + $table->text('improvements')->nullable(); + $table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete(); + $table->timestamps(); + }); + + $duplicates = DB::table('sprint_task') + ->select('sprint_id', 'task_id', DB::raw('MIN(id) as keep_id')) + ->groupBy('sprint_id', 'task_id') + ->havingRaw('COUNT(*) > 1') + ->get(); + + foreach ($duplicates as $duplicate) { + DB::table('sprint_task') + ->where('sprint_id', $duplicate->sprint_id) + ->where('task_id', $duplicate->task_id) + ->where('id', '!=', $duplicate->keep_id) + ->delete(); + } + + Schema::table('sprint_task', function (Blueprint $table) { + $table->unique(['sprint_id', 'task_id']); + }); + } + + public function down(): void + { + Schema::dropIfExists('sprint_retrospectives'); + Schema::dropIfExists('sprint_members'); + + Schema::table('sprint_task', function (Blueprint $table) { + $table->dropUnique(['sprint_id', 'task_id']); + }); + + Schema::table('sprints', function (Blueprint $table) { + $table->dropColumn(['capacity_hours', 'completed_at', 'completion_summary']); + }); + } +}; diff --git a/backend/database/migrations/2026_06_28_000004_add_organization_metadata_to_departments_table.php b/backend/database/migrations/2026_06_28_000004_add_organization_metadata_to_departments_table.php new file mode 100644 index 0000000..0de4637 --- /dev/null +++ b/backend/database/migrations/2026_06_28_000004_add_organization_metadata_to_departments_table.php @@ -0,0 +1,32 @@ +string('type')->default('department')->after('description'); + } + if (!Schema::hasColumn('departments', 'manager_changed_at')) { + $table->timestamp('manager_changed_at')->nullable()->after('manager_id'); + } + }); + } + + public function down(): void + { + Schema::table('departments', function (Blueprint $table) { + if (Schema::hasColumn('departments', 'manager_changed_at')) { + $table->dropColumn('manager_changed_at'); + } + if (Schema::hasColumn('departments', 'type')) { + $table->dropColumn('type'); + } + }); + } +}; diff --git a/backend/database/migrations/2026_06_28_000005_create_department_user_table.php b/backend/database/migrations/2026_06_28_000005_create_department_user_table.php new file mode 100644 index 0000000..173a441 --- /dev/null +++ b/backend/database/migrations/2026_06_28_000005_create_department_user_table.php @@ -0,0 +1,47 @@ +id(); + $table->foreignId('department_id')->constrained()->onDelete('cascade'); + $table->foreignId('user_id')->constrained()->onDelete('cascade'); + $table->string('role_in_team')->nullable(); + $table->boolean('is_primary')->default(false); + $table->timestamp('joined_at')->nullable(); + $table->timestamps(); + $table->unique(['department_id', 'user_id']); + }); + + DB::table('users') + ->whereNotNull('department_id') + ->orderBy('id') + ->select(['id', 'department_id', 'job_title', 'created_at', 'updated_at']) + ->chunk(100, function ($users) { + foreach ($users as $user) { + DB::table('department_user')->updateOrInsert( + ['department_id' => $user->department_id, 'user_id' => $user->id], + [ + 'role_in_team' => $user->job_title, + 'is_primary' => true, + 'joined_at' => $user->created_at, + 'created_at' => now(), + 'updated_at' => now(), + ] + ); + } + }); + } + + public function down(): void + { + Schema::dropIfExists('department_user'); + } +}; diff --git a/backend/database/migrations/2026_06_28_000006_add_department_id_to_projects_table.php b/backend/database/migrations/2026_06_28_000006_add_department_id_to_projects_table.php new file mode 100644 index 0000000..90ab96b --- /dev/null +++ b/backend/database/migrations/2026_06_28_000006_add_department_id_to_projects_table.php @@ -0,0 +1,26 @@ +foreignId('department_id')->nullable()->after('project_manager_id')->constrained('departments')->onDelete('set null'); + } + }); + } + + public function down(): void + { + Schema::table('projects', function (Blueprint $table) { + if (Schema::hasColumn('projects', 'department_id')) { + $table->dropConstrainedForeignId('department_id'); + } + }); + } +}; diff --git a/backend/database/migrations/2026_06_28_000007_add_blocker_fields_to_tasks_table.php b/backend/database/migrations/2026_06_28_000007_add_blocker_fields_to_tasks_table.php new file mode 100644 index 0000000..bd649ca --- /dev/null +++ b/backend/database/migrations/2026_06_28_000007_add_blocker_fields_to_tasks_table.php @@ -0,0 +1,32 @@ +string('blocker_type')->nullable()->after('status'); + } + if (!Schema::hasColumn('tasks', 'blocker_note')) { + $table->text('blocker_note')->nullable()->after('blocker_type'); + } + }); + } + + public function down(): void + { + Schema::table('tasks', function (Blueprint $table) { + if (Schema::hasColumn('tasks', 'blocker_note')) { + $table->dropColumn('blocker_note'); + } + if (Schema::hasColumn('tasks', 'blocker_type')) { + $table->dropColumn('blocker_type'); + } + }); + } +}; diff --git a/backend/database/migrations/2026_06_28_000008_add_notifiable_fields_to_notifications_table.php b/backend/database/migrations/2026_06_28_000008_add_notifiable_fields_to_notifications_table.php new file mode 100644 index 0000000..d6774de --- /dev/null +++ b/backend/database/migrations/2026_06_28_000008_add_notifiable_fields_to_notifications_table.php @@ -0,0 +1,32 @@ +string('notifiable_type')->nullable()->after('type'); + } + if (!Schema::hasColumn('notifications', 'notifiable_id')) { + $table->unsignedBigInteger('notifiable_id')->nullable()->after('notifiable_type'); + } + }); + } + + public function down(): void + { + Schema::table('notifications', function (Blueprint $table) { + if (Schema::hasColumn('notifications', 'notifiable_id')) { + $table->dropColumn('notifiable_id'); + } + if (Schema::hasColumn('notifications', 'notifiable_type')) { + $table->dropColumn('notifiable_type'); + } + }); + } +}; diff --git a/backend/database/migrations/2026_06_30_000001_add_type_to_settings_table.php b/backend/database/migrations/2026_06_30_000001_add_type_to_settings_table.php new file mode 100644 index 0000000..2332f83 --- /dev/null +++ b/backend/database/migrations/2026_06_30_000001_add_type_to_settings_table.php @@ -0,0 +1,26 @@ +string('type', 50)->nullable()->after('group'); + } + }); + } + + public function down(): void + { + Schema::table('settings', function (Blueprint $table) { + if (Schema::hasColumn('settings', 'type')) { + $table->dropColumn('type'); + } + }); + } +}; diff --git a/backend/database/migrations/2026_07_01_000001_add_job_titles_setting.php b/backend/database/migrations/2026_07_01_000001_add_job_titles_setting.php new file mode 100644 index 0000000..450c65b --- /dev/null +++ b/backend/database/migrations/2026_07_01_000001_add_job_titles_setting.php @@ -0,0 +1,28 @@ +where('key', 'job_titles')->exists()) { + return; + } + + DB::table('settings')->insert([ + 'key' => 'job_titles', + 'value' => json_encode(['مدیر سیستم', 'مدیر پروژه', 'توسعه‌دهنده', 'کارشناس', 'مدیرعامل'], JSON_UNESCAPED_UNICODE), + 'group' => 'people', + 'type' => 'list', + 'created_at' => now(), + 'updated_at' => now(), + ]); + } + + public function down(): void + { + DB::table('settings')->where('key', 'job_titles')->delete(); + } +}; diff --git a/backend/database/migrations/2026_07_01_000002_add_pwa_snooze_fields_to_notifications_table.php b/backend/database/migrations/2026_07_01_000002_add_pwa_snooze_fields_to_notifications_table.php new file mode 100644 index 0000000..2d06906 --- /dev/null +++ b/backend/database/migrations/2026_07_01_000002_add_pwa_snooze_fields_to_notifications_table.php @@ -0,0 +1,23 @@ +timestamp('remind_at')->nullable()->after('read_at')->index(); + $table->timestamp('dismissed_at')->nullable()->after('remind_at')->index(); + }); + } + + public function down(): void + { + Schema::table('notifications', function (Blueprint $table) { + $table->dropColumn(['remind_at', 'dismissed_at']); + }); + } +}; diff --git a/backend/database/seeders/ActivityLogSeeder.php b/backend/database/seeders/ActivityLogSeeder.php new file mode 100644 index 0000000..aa4da2f --- /dev/null +++ b/backend/database/seeders/ActivityLogSeeder.php @@ -0,0 +1,184 @@ +pluck('id', 'email'); + $now = now(); + + $activities = [ + [ + 'user_id' => $users['manager@pm.com'], + 'action' => 'created', + 'description' => 'پروژه "سامانه مدیریت منابع انسانی" ایجاد شد', + 'subject_type' => 'App\Models\Project', + 'subject_id' => 1, + 'created_at' => $now->copy()->subHours(720), + 'updated_at' => $now->copy()->subHours(720), + ], + [ + 'user_id' => $users['manager@pm.com'], + 'action' => 'created', + 'description' => 'وظیفه "طراحی و پیاده‌سازی ماژول حضور و غیاب" ایجاد شد', + 'subject_type' => 'App\Models\Task', + 'subject_id' => 1, + 'created_at' => $now->copy()->subHours(700), + 'updated_at' => $now->copy()->subHours(700), + ], + [ + 'user_id' => $users['member@pm.com'], + 'action' => 'updated', + 'description' => 'وضعیت وظیفه "طراحی و پیاده‌سازی ماژول حضور و غیاب" به در حال انجام تغییر کرد', + 'subject_type' => 'App\Models\Task', + 'subject_id' => 1, + 'created_at' => $now->copy()->subHours(650), + 'updated_at' => $now->copy()->subHours(650), + ], + [ + 'user_id' => $users['manager@pm.com'], + 'action' => 'assigned', + 'description' => 'وظیفه "مدیریت درخواست‌های مرخصی" به مریم حسینی تخصیص یافت', + 'subject_type' => 'App\Models\Task', + 'subject_id' => 4, + 'created_at' => $now->copy()->subHours(500), + 'updated_at' => $now->copy()->subHours(500), + ], + [ + 'user_id' => $users['observer@pm.com'], + 'action' => 'completed', + 'description' => 'وظیفه "مدیریت درخواست‌های مرخصی" تکمیل شد', + 'subject_type' => 'App\Models\Task', + 'subject_id' => 4, + 'created_at' => $now->copy()->subHours(300), + 'updated_at' => $now->copy()->subHours(300), + ], + [ + 'user_id' => $users['member@pm.com'], + 'action' => 'commented', + 'description' => 'نظری بر وظیفه "طراحی و پیاده‌سازی ماژول حضور و غیاب" اضافه کرد', + 'subject_type' => 'App\Models\Task', + 'subject_id' => 1, + 'created_at' => $now->copy()->subHours(200), + 'updated_at' => $now->copy()->subHours(200), + ], + [ + 'user_id' => $users['manager@pm.com'], + 'action' => 'created', + 'description' => 'پروژه "اپلیکیشن موبایل فروشگاهی" ایجاد شد', + 'subject_type' => 'App\Models\Project', + 'subject_id' => 2, + 'created_at' => $now->copy()->subHours(400), + 'updated_at' => $now->copy()->subHours(400), + ], + [ + 'user_id' => $users['manager@pm.com'], + 'action' => 'created', + 'description' => 'اسپرینت ۱ برای پروژه "سامانه مدیریت منابع انسانی" ایجاد شد', + 'subject_type' => 'App\Models\Sprint', + 'subject_id' => 1, + 'created_at' => $now->copy()->subHours(600), + 'updated_at' => $now->copy()->subHours(600), + ], + [ + 'user_id' => $users['admin@pm.com'], + 'action' => 'created', + 'description' => 'نقش "مدیر پروژه" به سارا احمدی تخصیص یافت', + 'subject_type' => 'App\Models\Role', + 'subject_id' => 2, + 'created_at' => $now->copy()->subHours(800), + 'updated_at' => $now->copy()->subHours(800), + ], + [ + 'user_id' => $users['manager@pm.com'], + 'action' => 'created', + 'description' => 'مورد بک‌لاگ "اضافه کردن قابلیت ثبت اثرانگشت" ایجاد شد', + 'subject_type' => 'App\Models\BacklogItem', + 'subject_id' => 1, + 'created_at' => $now->copy()->subHours(150), + 'updated_at' => $now->copy()->subHours(150), + ], + [ + 'user_id' => $users['ceo@pm.com'], + 'action' => 'viewed', + 'description' => 'گزارش پیشرفت پروژه "سامانه مدیریت منابع انسانی" مشاهده شد', + 'subject_type' => 'App\Models\Report', + 'subject_id' => null, + 'created_at' => $now->copy()->subHours(48), + 'updated_at' => $now->copy()->subHours(48), + ], + [ + 'user_id' => $users['manager@pm.com'], + 'action' => 'updated', + 'description' => 'اولویت پروژه "اپلیکیشن موبایل فروشگاهی" به فوری تغییر کرد', + 'subject_type' => 'App\Models\Project', + 'subject_id' => 2, + 'created_at' => $now->copy()->subHours(120), + 'updated_at' => $now->copy()->subHours(120), + ], + [ + 'user_id' => $users['member@pm.com'], + 'action' => 'uploaded', + 'description' => 'فایل "مستندات API ورژن ۲" بارگذاری شد', + 'subject_type' => 'App\Models\File', + 'subject_id' => 1, + 'created_at' => $now->copy()->subHours(24), + 'updated_at' => $now->copy()->subHours(24), + ], + [ + 'user_id' => $users['manager@pm.com'], + 'action' => 'created', + 'description' => 'جلسه "برنامه‌ریزی اسپرینت ۲" برنامه‌ریزی شد', + 'subject_type' => 'App\Models\Meeting', + 'subject_id' => 1, + 'created_at' => $now->copy()->subHours(72), + 'updated_at' => $now->copy()->subHours(72), + ], + [ + 'user_id' => $users['observer@pm.com'], + 'action' => 'reported', + 'description' => 'اشکال "محاسبه اضافه کار" در بک‌لاگ ثبت شد', + 'subject_type' => 'App\Models\BacklogItem', + 'subject_id' => 2, + 'created_at' => $now->copy()->subHours(36), + 'updated_at' => $now->copy()->subHours(36), + ], + [ + 'user_id' => $users['admin@pm.com'], + 'action' => 'updated', + 'description' => 'تنظیمات سیستم به‌روزرسانی شد', + 'subject_type' => 'App\Models\Setting', + 'subject_id' => null, + 'created_at' => $now->copy()->subHours(12), + 'updated_at' => $now->copy()->subHours(12), + ], + [ + 'user_id' => $users['manager@pm.com'], + 'action' => 'created', + 'description' => 'پروژه "بازطراحی وبسایت شرکتی" ایجاد شد', + 'subject_type' => 'App\Models\Project', + 'subject_id' => 3, + 'created_at' => $now->copy()->subHours(96), + 'updated_at' => $now->copy()->subHours(96), + ], + [ + 'user_id' => $users['member@pm.com'], + 'action' => 'updated', + 'description' => 'وضعیت وظیفه "طراحی صفحه اصلی اپلیکیشن" به در حال انجام تغییر کرد', + 'subject_type' => 'App\Models\Task', + 'subject_id' => 9, + 'created_at' => $now->copy()->subHours(50), + 'updated_at' => $now->copy()->subHours(50), + ], + ]; + + foreach ($activities as $activity) { + DB::table('activity_logs')->insert($activity); + } + } +} diff --git a/backend/database/seeders/BacklogSeeder.php b/backend/database/seeders/BacklogSeeder.php new file mode 100644 index 0000000..bcbbf14 --- /dev/null +++ b/backend/database/seeders/BacklogSeeder.php @@ -0,0 +1,79 @@ +pluck('id'); + $users = DB::table('users')->pluck('id', 'email'); + $now = now(); + + DB::table('backlog_items')->insert([ + [ + 'project_id' => $projects[0], + 'title' => 'اضافه کردن قابلیت ثبت اثرانگشت', + 'description' => 'امکان ثبت حضور و غیاب با استفاده از دستگاه اثرانگشت و همگام‌سازی خودکار با سامانه', + 'type' => 'feature', + 'status' => 'ready', + 'priority' => 'high', + 'estimated_effort' => '8', + 'created_by' => $users['member@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'project_id' => $projects[0], + 'title' => 'گزارش خطا در محاسبه اضافه کار', + 'description' => 'در برخی موارد، محاسبه اضافه کار پرسنل شیفت شب به درستی انجام نمی‌شود', + 'type' => 'bug', + 'status' => 'new', + 'priority' => 'urgent', + 'estimated_effort' => '5', + 'created_by' => $users['observer@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'project_id' => $projects[0], + 'title' => 'ایجاد داشبورد اختصاصی برای مدیران', + 'description' => 'داشبورد شخصی‌سازی شده با KPI های کلیدی برای هر مدیر', + 'type' => 'idea', + 'status' => 'reviewed', + 'priority' => 'medium', + 'estimated_effort' => '13', + 'created_by' => $users['ceo@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'project_id' => $projects[0], + 'title' => 'بهبود سرعت بارگذاری گزارشات', + 'description' => 'بهینه‌سازی کوئری‌های دیتابیس برای کاهش زمان بارگذاری گزارشات حجیم', + 'type' => 'improvement', + 'status' => 'ready', + 'priority' => 'medium', + 'estimated_effort' => '3', + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'project_id' => $projects[0], + 'title' => 'ایجاد ماژول آموزش پرسنل', + 'description' => 'امکان تعریف دوره‌های آموزشی، ثبت نام و پیگیری پیشرفت پرسنل', + 'type' => 'task', + 'status' => 'rejected', + 'priority' => 'low', + 'estimated_effort' => '21', + 'created_by' => $users['member@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + ]); + } +} diff --git a/backend/database/seeders/CommentSeeder.php b/backend/database/seeders/CommentSeeder.php new file mode 100644 index 0000000..ac7bb37 --- /dev/null +++ b/backend/database/seeders/CommentSeeder.php @@ -0,0 +1,103 @@ +pluck('id', 'email'); + $tasks = DB::table('tasks')->pluck('id'); + $now = now(); + + $comments = [ + [ + 'commentable_type' => 'App\\Models\\Task', + 'commentable_id' => $tasks[0], + 'user_id' => $users['manager@pm.com'], + 'body' => 'لطفاً مستندات API رو هم به این تسک اضافه کنید', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'commentable_type' => 'App\\Models\\Task', + 'commentable_id' => $tasks[0], + 'user_id' => $users['member@pm.com'], + 'body' => 'مستندات در حال تکمیل است، تا پایان روز تحویل میدم', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'commentable_type' => 'App\\Models\\Task', + 'commentable_id' => $tasks[1], + 'user_id' => $users['member@pm.com'], + 'body' => 'برای شروع این تسک نیاز به اطلاعات دقیق حقوق پایه پرسنل دارم', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'commentable_type' => 'App\\Models\\Task', + 'commentable_id' => $tasks[1], + 'user_id' => $users['observer@pm.com'], + 'body' => 'اطلاعات حقوق پایه رو از منابع انسانی گرفتم. براتون میفرستم', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'commentable_type' => 'App\\Models\\Task', + 'commentable_id' => $tasks[2], + 'user_id' => $users['manager@pm.com'], + 'body' => 'داشبورد رو بررسی کردم، نیاز به تغییرات جزئی در نمودارها داره', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'commentable_type' => 'App\\Models\\Task', + 'commentable_id' => $tasks[8], + 'user_id' => $users['member@pm.com'], + 'body' => 'طراحی صفحه اصلی آماده شده، لطفاً بررسی کنید', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'commentable_type' => 'App\\Models\\Task', + 'commentable_id' => $tasks[8], + 'user_id' => $users['manager@pm.com'], + 'body' => 'بررسی شد. رنگ‌بندی هدر نیاز به اصلاح داره', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'commentable_type' => 'App\\Models\\Task', + 'commentable_id' => $tasks[9], + 'user_id' => $users['manager@pm.com'], + 'body' => 'اتصال به درگاه پرداخت باید تا پایان فروردین انجام بشه', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'commentable_type' => 'App\\Models\\Task', + 'commentable_id' => $tasks[13], + 'user_id' => $users['observer@pm.com'], + 'body' => 'تحلیل نیازمندی‌ها انجام شد. خروجی جلسات رو در فایل مشترک قرار دادم', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'commentable_type' => 'App\\Models\\Task', + 'commentable_id' => $tasks[4], + 'user_id' => $users['member@pm.com'], + 'body' => 'یکپارچه‌سازی با سامانه بانک اطلاعاتی نیاز به هماهنگی بیشتر با تیم IT سازمان داره', + 'created_at' => $now, + 'updated_at' => $now, + ], + ]; + + foreach ($comments as $comment) { + DB::table('comments')->insert($comment); + } + } +} diff --git a/backend/database/seeders/DatabaseSeeder.php b/backend/database/seeders/DatabaseSeeder.php new file mode 100644 index 0000000..ae5d577 --- /dev/null +++ b/backend/database/seeders/DatabaseSeeder.php @@ -0,0 +1,33 @@ +call([ + RolePermissionSeeder::class, + UserSeeder::class, + ProjectSeeder::class, + TaskSeeder::class, + SprintSeeder::class, + BacklogSeeder::class, + MeetingSeeder::class, + CommentSeeder::class, + ActivityLogSeeder::class, + NotificationSeeder::class, + SettingSeeder::class, + ]); + + DB::statement('PRAGMA foreign_keys = ON'); + } +} diff --git a/backend/database/seeders/MeetingSeeder.php b/backend/database/seeders/MeetingSeeder.php new file mode 100644 index 0000000..a911612 --- /dev/null +++ b/backend/database/seeders/MeetingSeeder.php @@ -0,0 +1,129 @@ +pluck('id'); + $users = DB::table('users')->pluck('id', 'email'); + $now = now(); + + DB::table('meetings')->insert([ + [ + 'project_id' => $projects[0], + 'title' => 'جلسه برنامه‌ریزی اسپرینت ۲', + 'meeting_type' => 'جلسه برنامه‌ریزی', + 'date' => '2026-02-10', + 'start_time' => '09:00:00', + 'end_time' => '11:00:00', + 'location' => 'اتاق جلسات طبقه سوم', + 'agenda' => 'بررسی تسک‌های اسپرینت قبل، تعیین تسک‌های اسپرینت جدید و اولویت‌بندی', + 'notes' => 'لطفاً تسک‌های خود را قبل از جلسه به‌روزرسانی کنید', + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'project_id' => $projects[0], + 'title' => 'جلسه بررسی ماژول حقوق و دستمزد', + 'meeting_type' => 'جلسه بررسی', + 'date' => '2026-03-20', + 'start_time' => '14:00:00', + 'end_time' => '15:30:00', + 'location' => 'اتاق کنفرانس آنلاین', + 'agenda' => 'بررسی پیشرفت کار، چالش‌ها و نیازمندی‌های قانونی ماژول حقوق', + 'notes' => 'حضور کارشناس حقوقی الزامی است', + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'project_id' => $projects[1], + 'title' => 'جلسه هماهنگی با تیم فینتک', + 'meeting_type' => 'جلسه عمومی', + 'date' => '2026-04-05', + 'start_time' => '10:00:00', + 'end_time' => '12:00:00', + 'meeting_link' => 'https://meet.google.com/abc-defg-hij', + 'agenda' => 'هماهنگی برای یکپارچه‌سازی درگاه پرداخت و رفع موانع فنی', + 'notes' => 'مستندات API درگاه پرداخت به‌روزرسانی شد', + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + ]); + + $meetings = DB::table('meetings')->pluck('id'); + + $participants = [ + ['meeting_id' => $meetings[0], 'user_id' => $users['manager@pm.com']], + ['meeting_id' => $meetings[0], 'user_id' => $users['member@pm.com']], + ['meeting_id' => $meetings[0], 'user_id' => $users['observer@pm.com']], + ['meeting_id' => $meetings[1], 'user_id' => $users['manager@pm.com']], + ['meeting_id' => $meetings[1], 'user_id' => $users['member@pm.com']], + ['meeting_id' => $meetings[1], 'user_id' => $users['observer@pm.com']], + ['meeting_id' => $meetings[1], 'user_id' => $users['admin@pm.com']], + ['meeting_id' => $meetings[2], 'user_id' => $users['manager@pm.com']], + ['meeting_id' => $meetings[2], 'user_id' => $users['member@pm.com']], + ]; + + foreach ($participants as $participant) { + $participant['created_at'] = $now; + $participant['updated_at'] = $now; + DB::table('meeting_user')->insert($participant); + } + + DB::table('meeting_action_items')->insert([ + [ + 'meeting_id' => $meetings[0], + 'title' => 'آماده‌سازی لیست تسک‌های تکمیل شده توسط رضا', + 'assigned_to' => $users['member@pm.com'], + 'due_date' => '2026-02-09', + 'is_completed' => true, + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'meeting_id' => $meetings[0], + 'title' => 'به‌روزرسانی تخمین زمانی تسک‌های باقیمانده توسط مدیر پروژه', + 'assigned_to' => $users['manager@pm.com'], + 'due_date' => '2026-02-10', + 'is_completed' => true, + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'meeting_id' => $meetings[1], + 'title' => 'بررسی قوانین جدید کار و ارائه گزارش به تیم', + 'assigned_to' => $users['observer@pm.com'], + 'due_date' => '2026-03-18', + 'is_completed' => false, + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'meeting_id' => $meetings[1], + 'title' => 'تهیه مستند فنی محاسبات حقوق', + 'assigned_to' => $users['member@pm.com'], + 'due_date' => '2026-03-25', + 'is_completed' => false, + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'meeting_id' => $meetings[2], + 'title' => 'دریافت مستندات API از تیم فینتک', + 'assigned_to' => $users['manager@pm.com'], + 'due_date' => '2026-04-07', + 'is_completed' => false, + 'created_at' => $now, + 'updated_at' => $now, + ], + ]); + } +} diff --git a/backend/database/seeders/NotificationSeeder.php b/backend/database/seeders/NotificationSeeder.php new file mode 100644 index 0000000..72b595e --- /dev/null +++ b/backend/database/seeders/NotificationSeeder.php @@ -0,0 +1,105 @@ +pluck('id', 'email'); + $now = now(); + + $notifications = [ + [ + 'user_id' => $users['member@pm.com'], + 'type' => 'task_assigned', + 'title' => 'وظیفه جدید به شما تخصیص یافت', + 'body' => 'وظیفه "طراحی و پیاده‌سازی ماژول حقوق و دستمزد" به شما تخصیص یافت', + 'data' => json_encode(['task_id' => 2, 'project_id' => 1]), + 'is_read' => false, + 'created_at' => $now->copy()->subHours(24), + 'updated_at' => $now->copy()->subHours(24), + ], + [ + 'user_id' => $users['observer@pm.com'], + 'type' => 'task_assigned', + 'title' => 'وظیفه جدید به شما تخصیص یافت', + 'body' => 'وظیفه "طراحی پنل مدیریت فروشگاه" به شما تخصیص یافت', + 'data' => json_encode(['task_id' => 13, 'project_id' => 2]), + 'is_read' => false, + 'created_at' => $now->copy()->subHours(48), + 'updated_at' => $now->copy()->subHours(48), + ], + [ + 'user_id' => $users['member@pm.com'], + 'type' => 'task_overdue', + 'title' => 'مهلت وظیفه به پایان رسیده است', + 'body' => 'مهلت انجام وظیفه "یکپارچه‌سازی با درگاه‌های پرداخت" ۵ روز پیش به پایان رسیده است', + 'data' => json_encode(['task_id' => 14, 'project_id' => 2]), + 'is_read' => true, + 'read_at' => $now->copy()->subHours(2), + 'created_at' => $now->copy()->subHours(120), + 'updated_at' => $now->copy()->subHours(2), + ], + [ + 'user_id' => $users['manager@pm.com'], + 'type' => 'task_overdue', + 'title' => 'تسک دارای تأخیر', + 'body' => 'وظیفه "یکپارچه‌سازی با درگاه‌های پرداخت" توسط رضا کریمی دارای تأخیر است', + 'data' => json_encode(['task_id' => 14, 'project_id' => 2]), + 'is_read' => false, + 'created_at' => $now->copy()->subHours(120), + 'updated_at' => $now->copy()->subHours(120), + ], + [ + 'user_id' => $users['member@pm.com'], + 'type' => 'meeting_created', + 'title' => 'جلسه جدید برنامه‌ریزی شد', + 'body' => 'جلسه "برنامه‌ریزی اسپرینت ۲" در تاریخ ۲۰ بهمن برگزار می‌شود', + 'data' => json_encode(['meeting_id' => 1, 'project_id' => 1]), + 'is_read' => false, + 'created_at' => $now->copy()->subHours(72), + 'updated_at' => $now->copy()->subHours(72), + ], + [ + 'user_id' => $users['observer@pm.com'], + 'type' => 'meeting_created', + 'title' => 'جلسه جدید برنامه‌ریزی شد', + 'body' => 'جلسه "بررسی ماژول حقوق و دستمزد" در تاریخ ۳۰ اسفند برگزار می‌شود', + 'data' => json_encode(['meeting_id' => 2, 'project_id' => 1]), + 'is_read' => true, + 'read_at' => $now->copy()->subHours(48), + 'created_at' => $now->copy()->subHours(96), + 'updated_at' => $now->copy()->subHours(48), + ], + [ + 'user_id' => $users['member@pm.com'], + 'type' => 'mention', + 'title' => 'شما در یک نظر منشن شدید', + 'body' => 'سارا احمدی در نظری شما را منشن کرده است: "رضا جان لطفاً مستندات API رو هم به این تسک اضافه کنید"', + 'data' => json_encode(['task_id' => 1, 'comment_id' => 1]), + 'is_read' => true, + 'read_at' => $now->copy()->subHours(180), + 'created_at' => $now->copy()->subHours(200), + 'updated_at' => $now->copy()->subHours(180), + ], + [ + 'user_id' => $users['manager@pm.com'], + 'type' => 'mention', + 'title' => 'شما در یک نظر منشن شدید', + 'body' => 'دکتر امیر رضایی در بک‌لاگ اشاره کرده است: "نیاز به داشبورد اختصاصی برای مدیران داریم"', + 'data' => json_encode(['backlog_id' => 3]), + 'is_read' => false, + 'created_at' => $now->copy()->subHours(24), + 'updated_at' => $now->copy()->subHours(24), + ], + ]; + + foreach ($notifications as $notification) { + DB::table('notifications')->insert($notification); + } + } +} diff --git a/backend/database/seeders/ProjectSeeder.php b/backend/database/seeders/ProjectSeeder.php new file mode 100644 index 0000000..9750b91 --- /dev/null +++ b/backend/database/seeders/ProjectSeeder.php @@ -0,0 +1,111 @@ +pluck('id', 'email'); + $now = now(); + + $projects = [ + [ + 'title' => 'سامانه مدیریت منابع انسانی', + 'description' => 'طراحی و پیاده‌سازی سامانه جامع مدیریت منابع انسانی شامل ماژول‌های حضور و غیاب، حقوق و دستمزد، ارزیابی عملکرد و مدیریت پرسنل', + 'client' => 'شرکت صنعتی پارس', + 'project_manager_id' => $users['manager@pm.com'], + 'start_date' => '2026-01-05', + 'end_date' => '2026-07-15', + 'priority' => 'high', + 'status' => 'in_progress', + 'progress' => 65, + 'risk_level' => 'medium', + 'budget' => 850000000.00, + 'estimated_hours' => 2400.00, + 'actual_hours' => 1560.00, + 'tags' => json_encode(['HR', 'web', 'dashboard']), + 'notes' => 'پیشرفت مطابق برنامه زمانبندی می‌باشد', + 'is_archived' => false, + 'created_by' => $users['admin@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'اپلیکیشن موبایل فروشگاهی', + 'description' => 'توسعه اپلیکیشن موبایل فروشگاهی چندمنظوره با قابلیت‌های پرداخت آنلاین، مدیریت سفارشات، اعلان‌ها و پنل مدیریت پیشرفته', + 'client' => 'فروشگاه زنجیره‌ای البرز', + 'project_manager_id' => $users['manager@pm.com'], + 'start_date' => '2026-02-15', + 'end_date' => '2026-09-30', + 'priority' => 'urgent', + 'status' => 'in_progress', + 'progress' => 30, + 'risk_level' => 'high', + 'budget' => 1200000000.00, + 'estimated_hours' => 3200.00, + 'actual_hours' => 960.00, + 'tags' => json_encode(['mobile', 'android', 'ios', 'ecommerce']), + 'notes' => 'تأخیر در تحویل ماژول پرداخت از سمت تیم فینتک', + 'is_archived' => false, + 'created_by' => $users['admin@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'بازطراحی وبسایت شرکتی', + 'description' => 'بازطراحی کامل وبسایت شرکتی با رویکرد مدرن، واکنش‌گرا و سئو محور شامل بخش‌های معرفی، محصولات، وبلاگ و تماس با ما', + 'client' => 'شرکت خدمات بیمه ایران', + 'project_manager_id' => $users['manager@pm.com'], + 'start_date' => '2026-05-01', + 'end_date' => '2026-08-15', + 'priority' => 'medium', + 'status' => 'planning', + 'progress' => 10, + 'risk_level' => 'low', + 'budget' => 450000000.00, + 'estimated_hours' => 1200.00, + 'actual_hours' => 120.00, + 'tags' => json_encode(['website', 'redesign', 'ui-ux', 'seo']), + 'notes' => 'در مرحله جمع‌آوری نیازمندی‌ها', + 'is_archived' => false, + 'created_by' => $users['admin@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + ]; + + foreach ($projects as $project) { + DB::table('projects')->insert($project); + } + + $projectIds = DB::table('projects')->pluck('id'); + $project1Id = $projectIds[0]; + $project2Id = $projectIds[1]; + $project3Id = $projectIds[2]; + + $projectMembers = [ + ['project_id' => $project1Id, 'user_id' => $users['manager@pm.com'], 'role_in_project' => 'مدیر پروژه'], + ['project_id' => $project1Id, 'user_id' => $users['member@pm.com'], 'role_in_project' => 'توسعه‌دهنده'], + ['project_id' => $project1Id, 'user_id' => $users['observer@pm.com'], 'role_in_project' => 'ناظر کیفیت'], + ['project_id' => $project1Id, 'user_id' => $users['ceo@pm.com'], 'role_in_project' => 'حامی پروژه'], + + ['project_id' => $project2Id, 'user_id' => $users['manager@pm.com'], 'role_in_project' => 'مدیر پروژه'], + ['project_id' => $project2Id, 'user_id' => $users['member@pm.com'], 'role_in_project' => 'توسعه‌دهنده موبایل'], + ['project_id' => $project2Id, 'user_id' => $users['observer@pm.com'], 'role_in_project' => 'تست‌کننده'], + + ['project_id' => $project3Id, 'user_id' => $users['manager@pm.com'], 'role_in_project' => 'مدیر پروژه'], + ['project_id' => $project3Id, 'user_id' => $users['member@pm.com'], 'role_in_project' => 'طراح رابط کاربری'], + ['project_id' => $project3Id, 'user_id' => $users['observer@pm.com'], 'role_in_project' => 'کارشناس محتوا'], + ]; + + foreach ($projectMembers as $member) { + $member['created_at'] = $now; + $member['updated_at'] = $now; + DB::table('project_user')->insert($member); + } + } +} diff --git a/backend/database/seeders/RolePermissionSeeder.php b/backend/database/seeders/RolePermissionSeeder.php new file mode 100644 index 0000000..adc19e3 --- /dev/null +++ b/backend/database/seeders/RolePermissionSeeder.php @@ -0,0 +1,154 @@ +insert([ + ['name' => 'admin', 'display_name' => 'ادمین', 'description' => 'دسترسی کامل به تمام بخش‌های سیستم', 'guard_name' => 'web', 'created_at' => now(), 'updated_at' => now()], + ['name' => 'project_manager', 'display_name' => 'مدیر پروژه', 'description' => 'مدیریت پروژه‌ها، وظایف و تیم‌ها', 'guard_name' => 'web', 'created_at' => now(), 'updated_at' => now()], + ['name' => 'product_manager', 'display_name' => 'مدیر محصول', 'description' => 'مدیریت بک‌لاگ، اولویت‌ها و گزارش محصول', 'guard_name' => 'web', 'created_at' => now(), 'updated_at' => now()], + ['name' => 'scrum_master', 'display_name' => 'اسکرام مستر', 'description' => 'مدیریت اسپرینت‌ها، جلسات و پیگیری تیم', 'guard_name' => 'web', 'created_at' => now(), 'updated_at' => now()], + ['name' => 'specialist', 'display_name' => 'کارشناس', 'description' => 'دسترسی پایه برای انجام وظایف محوله', 'guard_name' => 'web', 'created_at' => now(), 'updated_at' => now()], + ['name' => 'observer', 'display_name' => 'ناظر', 'description' => 'دسترسی فقط مشاهده گزارشات و داشبورد', 'guard_name' => 'web', 'created_at' => now(), 'updated_at' => now()], + ['name' => 'ceo', 'display_name' => 'مدیر عامل', 'description' => 'دسترسی مشاهده سطح بالا برای مدیران ارشد', 'guard_name' => 'web', 'created_at' => now(), 'updated_at' => now()], + ]); + + $modules = [ + 'projects' => ['view', 'create', 'edit', 'delete', 'assign', 'report'], + 'tasks' => ['view', 'create', 'edit', 'delete', 'assign', 'comment', 'upload'], + 'sprints' => ['view', 'create', 'edit', 'delete'], + 'backlog' => ['view', 'create', 'edit', 'delete', 'approve', 'reject'], + 'meetings' => ['view', 'create', 'edit', 'delete', 'comment'], + 'files' => ['view', 'upload', 'delete'], + 'reports' => ['view', 'create', 'export'], + 'team' => ['view', 'create', 'edit', 'delete'], + 'roles' => ['view', 'create', 'edit', 'delete'], + 'settings' => ['view', 'edit'], + 'notifications' => ['view'], + 'comments' => ['view', 'create', 'edit', 'delete'], + ]; + + $permissions = []; + foreach ($modules as $module => $actions) { + foreach ($actions as $action) { + $name = "{$module}.{$action}"; + $displayMap = [ + 'view' => 'مشاهده', + 'create' => 'ایجاد', + 'edit' => 'ویرایش', + 'delete' => 'حذف', + 'assign' => 'تخصیص', + 'comment' => 'نظردهی', + 'upload' => 'بارگذاری', + 'approve' => 'تأیید', + 'reject' => 'رد', + 'export' => 'خروجی', + 'report' => 'گزارش', + ]; + $displayName = $displayMap[$action] ?? $action; + $moduleDisplay = [ + 'projects' => 'پروژه‌ها', + 'tasks' => 'وظایف', + 'sprints' => 'اسپرینت‌ها', + 'backlog' => 'بک‌لاگ', + 'meetings' => 'جلسات', + 'files' => 'فایل‌ها', + 'reports' => 'گزارشات', + 'team' => 'تیم', + 'roles' => 'نقش‌ها', + 'settings' => 'تنظیمات', + 'notifications' => 'اعلان‌ها', + 'comments' => 'نظرات', + ]; + $permissions[] = [ + 'name' => $name, + 'display_name' => $displayName . ' ' . $moduleDisplay[$module], + 'guard_name' => 'web', + 'module' => $module, + 'created_at' => now(), + 'updated_at' => now(), + ]; + } + } + DB::table('permissions')->insert($permissions); + + $allPermissions = DB::table('permissions')->pluck('id', 'name')->toArray(); + $roles = DB::table('roles')->pluck('id', 'name')->toArray(); + + $rolePermissions = []; + + // admin - full access to all + foreach ($allPermissions as $permId) { + $rolePermissions[] = ['role_id' => $roles['admin'], 'permission_id' => $permId, 'created_at' => now(), 'updated_at' => now()]; + } + + // project_manager + $pmModules = ['projects', 'tasks', 'sprints', 'backlog', 'meetings', 'files', 'reports', 'team', 'comments']; + $pmActions = ['view', 'create', 'edit', 'delete', 'assign', 'comment', 'upload', 'approve', 'reject', 'report', 'export']; + foreach ($allPermissions as $permName => $permId) { + [$module, $action] = explode('.', $permName); + if (in_array($module, $pmModules) && in_array($action, $pmActions)) { + $rolePermissions[] = ['role_id' => $roles['project_manager'], 'permission_id' => $permId, 'created_at' => now(), 'updated_at' => now()]; + } + } + + // specialist + $tmModules = ['tasks', 'meetings', 'files', 'comments', 'notifications']; + $tmActions = ['view', 'create', 'edit', 'comment', 'upload']; + foreach ($allPermissions as $permName => $permId) { + [$module, $action] = explode('.', $permName); + if (in_array($module, $tmModules) && in_array($action, $tmActions)) { + $rolePermissions[] = ['role_id' => $roles['specialist'], 'permission_id' => $permId, 'created_at' => now(), 'updated_at' => now()]; + } + } + // specialist also can view projects, sprints, backlog, team + foreach ($allPermissions as $permName => $permId) { + [$module, $action] = explode('.', $permName); + if (in_array($module, ['projects', 'sprints', 'backlog', 'team']) && $action === 'view') { + $rolePermissions[] = ['role_id' => $roles['specialist'], 'permission_id' => $permId, 'created_at' => now(), 'updated_at' => now()]; + } + } + + $productModules = ['projects', 'tasks', 'backlog', 'reports', 'comments', 'notifications']; + foreach ($allPermissions as $permName => $permId) { + [$module, $action] = explode('.', $permName); + if (in_array($module, $productModules) && in_array($action, ['view', 'create', 'edit', 'approve', 'reject', 'comment', 'report', 'export'])) { + $rolePermissions[] = ['role_id' => $roles['product_manager'], 'permission_id' => $permId, 'created_at' => now(), 'updated_at' => now()]; + } + } + + $scrumModules = ['projects', 'tasks', 'sprints', 'meetings', 'reports', 'team', 'comments', 'notifications']; + foreach ($allPermissions as $permName => $permId) { + [$module, $action] = explode('.', $permName); + if (in_array($module, $scrumModules) && in_array($action, ['view', 'create', 'edit', 'assign', 'comment', 'report'])) { + $rolePermissions[] = ['role_id' => $roles['scrum_master'], 'permission_id' => $permId, 'created_at' => now(), 'updated_at' => now()]; + } + } + + // observer - view only on projects, tasks, sprints, backlog, meetings, reports, team + $observerModules = ['projects', 'tasks', 'sprints', 'backlog', 'meetings', 'reports', 'team']; + foreach ($allPermissions as $permName => $permId) { + [$module, $action] = explode('.', $permName); + if (in_array($module, $observerModules) && $action === 'view') { + $rolePermissions[] = ['role_id' => $roles['observer'], 'permission_id' => $permId, 'created_at' => now(), 'updated_at' => now()]; + } + } + + // ceo - view + report + export on executive modules + $ceoModules = ['projects', 'tasks', 'reports', 'team', 'meetings', 'sprints', 'backlog']; + foreach ($allPermissions as $permName => $permId) { + [$module, $action] = explode('.', $permName); + if (in_array($module, $ceoModules) && in_array($action, ['view', 'report', 'export'])) { + $rolePermissions[] = ['role_id' => $roles['ceo'], 'permission_id' => $permId, 'created_at' => now(), 'updated_at' => now()]; + } + } + + DB::table('permission_role')->insert($rolePermissions); + } +} diff --git a/backend/database/seeders/SettingSeeder.php b/backend/database/seeders/SettingSeeder.php new file mode 100644 index 0000000..cf644b1 --- /dev/null +++ b/backend/database/seeders/SettingSeeder.php @@ -0,0 +1,117 @@ + 'company_name', + 'value' => 'شرکت نرم‌افزاری پیشگام', + 'group' => 'general', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'key' => 'company_phone', + 'value' => '021-12345678', + 'group' => 'general', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'key' => 'company_address', + 'value' => 'تهران، خیابان ولیعصر، برج فناوری، طبقه ۵', + 'group' => 'general', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'key' => 'company_logo', + 'value' => 'logos/company.png', + 'group' => 'general', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'key' => 'job_titles', + 'value' => json_encode(['مدیر سیستم', 'مدیر پروژه', 'توسعه‌دهنده', 'کارشناس', 'مدیرعامل'], JSON_UNESCAPED_UNICODE), + 'group' => 'people', + 'type' => 'list', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'key' => 'default_task_statuses', + 'value' => json_encode(['todo', 'in_progress', 'waiting', 'review', 'done']), + 'group' => 'task', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'key' => 'default_priorities', + 'value' => json_encode(['low', 'medium', 'high', 'urgent']), + 'group' => 'task', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'key' => 'default_project_statuses', + 'value' => json_encode(['planning', 'in_progress', 'on_hold', 'completed', 'cancelled']), + 'group' => 'project', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'key' => 'risk_levels', + 'value' => json_encode(['low', 'medium', 'high']), + 'group' => 'project', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'key' => 'backlog_types', + 'value' => json_encode(['idea', 'feature', 'bug', 'improvement', 'task']), + 'group' => 'backlog', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'key' => 'backlog_statuses', + 'value' => json_encode(['new', 'reviewed', 'ready', 'rejected']), + 'group' => 'backlog', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'key' => 'notification_types', + 'value' => json_encode(['task_assigned', 'task_overdue', 'meeting_created', 'mention']), + 'group' => 'notification', + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'key' => 'smtp_settings', + 'value' => json_encode([ + 'host' => 'smtp.pishgam.com', + 'port' => 587, + 'encryption' => 'tls', + ]), + 'group' => 'mail', + 'created_at' => $now, + 'updated_at' => $now, + ], + ]; + + foreach ($settings as $setting) { + DB::table('settings')->insert($setting); + } + } +} diff --git a/backend/database/seeders/SprintSeeder.php b/backend/database/seeders/SprintSeeder.php new file mode 100644 index 0000000..f0ddb58 --- /dev/null +++ b/backend/database/seeders/SprintSeeder.php @@ -0,0 +1,58 @@ +pluck('id'); + $now = now(); + + DB::table('sprints')->insert([ + [ + 'project_id' => $projects[0], + 'title' => 'اسپرینت ۱ - فروردین', + 'start_date' => '2026-01-05', + 'end_date' => '2026-02-05', + 'status' => 'active', + 'goal' => 'تکمیل ماژول حضور و غیاب و مدیریت مرخصی با قابلیت ثبت و گزارش‌گیری', + 'created_by' => 1, + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'project_id' => $projects[0], + 'title' => 'اسپرینت ۲ - اردیبهشت', + 'start_date' => '2026-02-06', + 'end_date' => '2026-03-06', + 'status' => 'planning', + 'goal' => 'تکمیل محاسبات حقوق و دستمزد و طراحی فرم‌های ارزیابی', + 'created_by' => 1, + 'created_at' => $now, + 'updated_at' => $now, + ], + ]); + + $sprints = DB::table('sprints')->pluck('id'); + $tasks = DB::table('tasks')->where('project_id', $projects[0])->pluck('id'); + + $sprintTasks = []; + $taskIndex = 0; + foreach ($tasks as $taskId) { + $sprintIndex = $taskIndex < 4 ? 0 : 1; + $sprintTasks[] = [ + 'sprint_id' => $sprints[$sprintIndex], + 'task_id' => $taskId, + 'created_at' => $now, + 'updated_at' => $now, + ]; + $taskIndex++; + } + + DB::table('sprint_task')->insert($sprintTasks); + } +} diff --git a/backend/database/seeders/TaskSeeder.php b/backend/database/seeders/TaskSeeder.php new file mode 100644 index 0000000..19e240b --- /dev/null +++ b/backend/database/seeders/TaskSeeder.php @@ -0,0 +1,388 @@ +pluck('id', 'email'); + $projects = DB::table('projects')->pluck('id'); + $now = now(); + + $tasks = [ + // Project 1 - سامانه مدیریت منابع انسانی (8 tasks) + [ + 'title' => 'طراحی و پیاده‌سازی ماژول حضور و غیاب', + 'description' => 'طراحی پایگاه داده و پیاده‌سازی API های مربوط به ثبت و مدیریت حضور و غیاب پرسنل', + 'project_id' => $projects[0], + 'assignee_id' => $users['member@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'high', + 'status' => 'in_progress', + 'start_date' => '2026-01-10', + 'due_date' => '2026-03-15', + 'estimated_time' => 320.00, + 'actual_time' => 280.00, + 'tags' => json_encode(['HR', 'API', 'attendance']), + 'sort_order' => 1, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'پیاده‌سازی ماژول حقوق و دستمزد', + 'description' => 'محاسبه خودکار حقوق، کسورات، مالیات و بیمه پرسنل بر اساس قوانین کار', + 'project_id' => $projects[0], + 'assignee_id' => $users['member@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'urgent', + 'status' => 'todo', + 'start_date' => '2026-03-16', + 'due_date' => '2026-05-30', + 'estimated_time' => 400.00, + 'actual_time' => 0.00, + 'tags' => json_encode(['HR', 'payroll', 'financial']), + 'sort_order' => 2, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'طراحی داشبورد مدیریتی منابع انسانی', + 'description' => 'طراحی و پیاده‌سازی داشبورد تحلیلی با نمودارهای حضور، غیاب و عملکرد پرسنل', + 'project_id' => $projects[0], + 'assignee_id' => $users['member@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'medium', + 'status' => 'review', + 'start_date' => '2026-02-01', + 'due_date' => '2026-04-01', + 'estimated_time' => 200.00, + 'actual_time' => 180.00, + 'tags' => json_encode(['dashboard', 'charts', 'analytics']), + 'sort_order' => 3, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'مدیریت درخواست‌های مرخصی', + 'description' => 'سیستم ثبت، تأیید و مدیریت درخواست‌های مرخصی با قابلیت تعریف انواع مرخصی', + 'project_id' => $projects[0], + 'assignee_id' => $users['observer@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'high', + 'status' => 'done', + 'start_date' => '2026-01-05', + 'due_date' => '2026-02-20', + 'estimated_time' => 180.00, + 'actual_time' => 190.00, + 'tags' => json_encode(['HR', 'leave', 'workflow']), + 'sort_order' => 4, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'یکپارچه‌سازی با سامانه بانک اطلاعاتی', + 'description' => 'اتصال و همگام‌سازی داده‌های پرسنلی با سامانه‌های موجود سازمان', + 'project_id' => $projects[0], + 'assignee_id' => null, + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'high', + 'status' => 'waiting', + 'start_date' => '2026-03-01', + 'due_date' => '2026-04-15', + 'estimated_time' => 160.00, + 'actual_time' => 20.00, + 'tags' => json_encode(['integration', 'API', 'database']), + 'sort_order' => 5, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'گزارش‌گیری پیشرفته منابع انسانی', + 'description' => 'ایجاد گزارشات سفارشی و آماری با قابلیت خروجی اکسل و PDF', + 'project_id' => $projects[0], + 'assignee_id' => $users['member@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'low', + 'status' => 'todo', + 'start_date' => '2026-05-01', + 'due_date' => '2026-06-15', + 'estimated_time' => 240.00, + 'actual_time' => 0.00, + 'tags' => json_encode(['reporting', 'excel', 'pdf']), + 'sort_order' => 6, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'مدیریت ارزیابی عملکرد پرسنل', + 'description' => 'طراحی فرم‌های ارزیابی و فرآیند بازخورد ۳۶۰ درجه', + 'project_id' => $projects[0], + 'assignee_id' => $users['member@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'medium', + 'status' => 'todo', + 'start_date' => '2026-04-01', + 'due_date' => '2026-05-01', + 'estimated_time' => 300.00, + 'actual_time' => 0.00, + 'tags' => json_encode(['HR', 'evaluation', '360']), + 'sort_order' => 7, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'تست و استقرار نسخه اولیه', + 'description' => 'انجام تست‌های یکپارچه‌سازی و استقرار در محیط آزمایشگاهی', + 'project_id' => $projects[0], + 'assignee_id' => $users['observer@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'high', + 'status' => 'waiting', + 'start_date' => '2026-06-01', + 'due_date' => '2026-07-01', + 'estimated_time' => 160.00, + 'actual_time' => 0.00, + 'tags' => json_encode(['testing', 'deployment', 'staging']), + 'sort_order' => 8, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + + // Project 2 - اپلیکیشن موبایل فروشگاهی (7 tasks) + [ + 'title' => 'طراحی صفحه اصلی اپلیکیشن', + 'description' => 'طراحی رابط کاربری صفحه اصلی با نمایش محصولات پرطرفدار، دسته‌بندی‌ها و بنرهای تبلیغاتی', + 'project_id' => $projects[1], + 'assignee_id' => $users['member@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'high', + 'status' => 'in_progress', + 'start_date' => '2026-02-15', + 'due_date' => '2026-03-20', + 'estimated_time' => 200.00, + 'actual_time' => 160.00, + 'tags' => json_encode(['mobile', 'ui', 'home']), + 'sort_order' => 1, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'پیاده‌سازی سبد خرید و پرداخت', + 'description' => 'پیاده‌سازی سبد خرید، اعمال تخفیف و اتصال به درگاه پرداخت آنلاین', + 'project_id' => $projects[1], + 'assignee_id' => $users['member@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'urgent', + 'status' => 'in_progress', + 'start_date' => '2026-03-01', + 'due_date' => '2026-04-30', + 'estimated_time' => 350.00, + 'actual_time' => 200.00, + 'tags' => json_encode(['payment', 'cart', 'checkout']), + 'sort_order' => 2, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'سیستم اعلان‌های هوشمند', + 'description' => 'پیاده‌سازی اعلان‌های push برای تخفیف‌ها، وضعیت سفارش و پیشنهادات ویژه', + 'project_id' => $projects[1], + 'assignee_id' => null, + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'medium', + 'status' => 'todo', + 'start_date' => '2026-04-15', + 'due_date' => '2026-06-01', + 'estimated_time' => 250.00, + 'actual_time' => 0.00, + 'tags' => json_encode(['notification', 'push', 'firebase']), + 'sort_order' => 3, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'مدیریت حساب کاربری و پروفایل', + 'description' => 'صفحات ثبت‌نام، ورود، ویرایش پروفایل و مدیریت آدرس‌ها', + 'project_id' => $projects[1], + 'assignee_id' => $users['member@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'high', + 'status' => 'review', + 'start_date' => '2026-02-20', + 'due_date' => '2026-03-25', + 'estimated_time' => 180.00, + 'actual_time' => 190.00, + 'tags' => json_encode(['auth', 'profile', 'user']), + 'sort_order' => 4, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'طراحی پنل مدیریت فروشگاه', + 'description' => 'داشبورد مدیریت محصولات، سفارشات، مشتریان و گزارشات فروش', + 'project_id' => $projects[1], + 'assignee_id' => $users['observer@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'medium', + 'status' => 'todo', + 'start_date' => '2026-05-01', + 'due_date' => '2026-07-01', + 'estimated_time' => 400.00, + 'actual_time' => 0.00, + 'tags' => json_encode(['admin', 'dashboard', 'management']), + 'sort_order' => 5, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'یکپارچه‌سازی با درگاه‌های پرداخت', + 'description' => 'اتصال به درگاه‌های پرداخت زرین‌پال، ملت و سامان', + 'project_id' => $projects[1], + 'assignee_id' => $users['member@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'urgent', + 'status' => 'waiting', + 'start_date' => '2026-03-01', + 'due_date' => '2026-03-30', + 'estimated_time' => 200.00, + 'actual_time' => 50.00, + 'tags' => json_encode(['payment', 'gateway', 'integration']), + 'sort_order' => 6, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'بهینه‌سازی عملکرد و کاهش مصرف باتری', + 'description' => 'بهینه‌سازی درخواست‌های شبکه، کش کردن داده‌ها و کاهش مصرف منابع', + 'project_id' => $projects[1], + 'assignee_id' => null, + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'low', + 'status' => 'todo', + 'start_date' => '2026-07-01', + 'due_date' => '2026-08-15', + 'estimated_time' => 160.00, + 'actual_time' => 0.00, + 'tags' => json_encode(['performance', 'optimization', 'battery']), + 'sort_order' => 7, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + + // Project 3 - بازطراحی وبسایت شرکتی (5 tasks) + [ + 'title' => 'تحلیل و جمع‌آوری نیازمندی‌ها', + 'description' => 'جلسات با کارفرما برای جمع‌آوری نیازمندی‌های دقیق و انتظارات از وبسایت جدید', + 'project_id' => $projects[2], + 'assignee_id' => $users['member@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'high', + 'status' => 'in_progress', + 'start_date' => '2026-05-01', + 'due_date' => '2026-05-20', + 'estimated_time' => 80.00, + 'actual_time' => 60.00, + 'tags' => json_encode(['analysis', 'requirements', 'meeting']), + 'sort_order' => 1, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'طراحی وایرفریم و نمونه اولیه', + 'description' => 'طراحی وایرفریم صفحات اصلی و نمونه اولیه قابل کلیک در Figma', + 'project_id' => $projects[2], + 'assignee_id' => $users['member@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'high', + 'status' => 'todo', + 'start_date' => '2026-05-21', + 'due_date' => '2026-06-10', + 'estimated_time' => 160.00, + 'actual_time' => 0.00, + 'tags' => json_encode(['design', 'wireframe', 'figma']), + 'sort_order' => 2, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'پیاده‌سازی فرانت‌اند با ری‌اکت', + 'description' => 'توسعه فرانت‌اند وبسایت با استفاده از React و Tailwind CSS', + 'project_id' => $projects[2], + 'assignee_id' => null, + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'medium', + 'status' => 'todo', + 'start_date' => '2026-06-11', + 'due_date' => '2026-07-20', + 'estimated_time' => 320.00, + 'actual_time' => 0.00, + 'tags' => json_encode(['frontend', 'react', 'tailwind']), + 'sort_order' => 3, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'توسعه بک‌اند و مدیریت محتوا', + 'description' => 'پیاده‌سازی پنل مدیریت محتوا و API های مورد نیاز', + 'project_id' => $projects[2], + 'assignee_id' => $users['observer@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'medium', + 'status' => 'todo', + 'start_date' => '2026-06-20', + 'due_date' => '2026-07-25', + 'estimated_time' => 240.00, + 'actual_time' => 0.00, + 'tags' => json_encode(['backend', 'CMS', 'API']), + 'sort_order' => 4, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + [ + 'title' => 'بهینه‌سازی سئو و عملکرد', + 'description' => 'بهینه‌سازی سرعت بارگذاری، سئوی فنی و دسترسی‌پذیری وبسایت', + 'project_id' => $projects[2], + 'assignee_id' => $users['observer@pm.com'], + 'reporter_id' => $users['manager@pm.com'], + 'priority' => 'low', + 'status' => 'todo', + 'start_date' => '2026-07-20', + 'due_date' => '2026-08-05', + 'estimated_time' => 100.00, + 'actual_time' => 0.00, + 'tags' => json_encode(['seo', 'performance', 'optimization']), + 'sort_order' => 5, + 'created_by' => $users['manager@pm.com'], + 'created_at' => $now, + 'updated_at' => $now, + ], + ]; + + foreach ($tasks as $task) { + DB::table('tasks')->insert($task); + } + } +} diff --git a/backend/database/seeders/UserSeeder.php b/backend/database/seeders/UserSeeder.php new file mode 100644 index 0000000..69899ec --- /dev/null +++ b/backend/database/seeders/UserSeeder.php @@ -0,0 +1,101 @@ + 'علی محمدی', + 'email' => 'admin@pm.com', + 'password' => Hash::make('password'), + 'phone' => '09121111111', + 'job_title' => 'مدیر سیستم', + 'department' => 'فناوری اطلاعات', + 'status' => 'active', + 'avatar' => 'avatars/default.png', + 'email_verified_at' => now(), + 'created_at' => now(), + 'updated_at' => now(), + ], + [ + 'name' => 'سارا احمدی', + 'email' => 'manager@pm.com', + 'password' => Hash::make('password'), + 'phone' => '09122222222', + 'job_title' => 'مدیر پروژه', + 'department' => 'مدیریت پروژه', + 'status' => 'active', + 'avatar' => 'avatars/default.png', + 'email_verified_at' => now(), + 'created_at' => now(), + 'updated_at' => now(), + ], + [ + 'name' => 'رضا کریمی', + 'email' => 'member@pm.com', + 'password' => Hash::make('password'), + 'phone' => '09123333333', + 'job_title' => 'توسعه‌دهنده', + 'department' => 'فناوری اطلاعات', + 'status' => 'active', + 'avatar' => 'avatars/default.png', + 'email_verified_at' => now(), + 'created_at' => now(), + 'updated_at' => now(), + ], + [ + 'name' => 'مریم حسینی', + 'email' => 'observer@pm.com', + 'password' => Hash::make('password'), + 'phone' => '09124444444', + 'job_title' => 'کارشناس', + 'department' => 'کیفیت', + 'status' => 'active', + 'avatar' => 'avatars/default.png', + 'email_verified_at' => now(), + 'created_at' => now(), + 'updated_at' => now(), + ], + [ + 'name' => 'دکتر امیر رضایی', + 'email' => 'ceo@pm.com', + 'password' => Hash::make('password'), + 'phone' => '09125555555', + 'job_title' => 'مدیرعامل', + 'department' => 'مدیریت ارشد', + 'status' => 'active', + 'avatar' => 'avatars/default.png', + 'email_verified_at' => now(), + 'created_at' => now(), + 'updated_at' => now(), + ], + ]; + + foreach ($users as $user) { + $createdUser = User::create($user); + $role = match ($createdUser->email) { + 'admin@pm.com' => 'admin', + 'manager@pm.com' => 'project_manager', + 'member@pm.com' => 'specialist', + 'observer@pm.com' => 'observer', + 'ceo@pm.com' => 'ceo', + default => 'specialist', + }; + $roleId = DB::table('roles')->where('name', $role)->value('id'); + DB::table('role_user')->insert([ + 'role_id' => $roleId, + 'user_id' => $createdUser->id, + 'created_at' => now(), + 'updated_at' => now(), + ]); + } + } +} diff --git a/backend/package.json b/backend/package.json new file mode 100644 index 0000000..7686b29 --- /dev/null +++ b/backend/package.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://www.schemastore.org/package.json", + "private": true, + "type": "module", + "scripts": { + "build": "vite build", + "dev": "vite" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.0.0", + "axios": "^1.11.0", + "concurrently": "^9.0.1", + "laravel-vite-plugin": "^2.0.0", + "tailwindcss": "^4.0.0", + "vite": "^7.0.7" + } +} diff --git a/backend/phpunit.xml b/backend/phpunit.xml new file mode 100644 index 0000000..e7f0a48 --- /dev/null +++ b/backend/phpunit.xml @@ -0,0 +1,36 @@ + + + + + tests/Unit + + + tests/Feature + + + + + app + + + + + + + + + + + + + + + + + + + diff --git a/backend/public/.htaccess b/backend/public/.htaccess new file mode 100644 index 0000000..b574a59 --- /dev/null +++ b/backend/public/.htaccess @@ -0,0 +1,25 @@ + + + Options -MultiViews -Indexes + + + RewriteEngine On + + # Handle Authorization Header + RewriteCond %{HTTP:Authorization} . + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + + # Handle X-XSRF-Token Header + RewriteCond %{HTTP:x-xsrf-token} . + RewriteRule .* - [E=HTTP_X_XSRF_TOKEN:%{HTTP:X-XSRF-Token}] + + # Redirect Trailing Slashes If Not A Folder... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_URI} (.+)/$ + RewriteRule ^ %1 [L,R=301] + + # Send Requests To Front Controller... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + diff --git a/backend/public/favicon.ico b/backend/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/backend/public/index.php b/backend/public/index.php new file mode 100644 index 0000000..ee8f07e --- /dev/null +++ b/backend/public/index.php @@ -0,0 +1,20 @@ +handleRequest(Request::capture()); diff --git a/backend/public/robots.txt b/backend/public/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/backend/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/backend/resources/css/app.css b/backend/resources/css/app.css new file mode 100644 index 0000000..3e6abea --- /dev/null +++ b/backend/resources/css/app.css @@ -0,0 +1,11 @@ +@import 'tailwindcss'; + +@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php'; +@source '../../storage/framework/views/*.php'; +@source '../**/*.blade.php'; +@source '../**/*.js'; + +@theme { + --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', + 'Segoe UI Symbol', 'Noto Color Emoji'; +} diff --git a/backend/resources/js/app.js b/backend/resources/js/app.js new file mode 100644 index 0000000..e59d6a0 --- /dev/null +++ b/backend/resources/js/app.js @@ -0,0 +1 @@ +import './bootstrap'; diff --git a/backend/resources/js/bootstrap.js b/backend/resources/js/bootstrap.js new file mode 100644 index 0000000..5f1390b --- /dev/null +++ b/backend/resources/js/bootstrap.js @@ -0,0 +1,4 @@ +import axios from 'axios'; +window.axios = axios; + +window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; diff --git a/backend/resources/views/welcome.blade.php b/backend/resources/views/welcome.blade.php new file mode 100644 index 0000000..b7355d7 --- /dev/null +++ b/backend/resources/views/welcome.blade.php @@ -0,0 +1,277 @@ + + + + + + + {{ config('app.name', 'Laravel') }} + + + + + + + @if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot'))) + @vite(['resources/css/app.css', 'resources/js/app.js']) + @else + + @endif + + +
+ @if (Route::has('login')) + + @endif +
+
+
+
+

Let's get started

+

Laravel has an incredibly rich ecosystem.
We suggest starting with the following.

+ + +
+
+ {{-- Laravel Logo --}} + + + + + + + + + + + {{-- Light Mode 12 SVG --}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{-- Dark Mode 12 SVG --}} + +
+
+
+
+ + @if (Route::has('login')) + + @endif + + diff --git a/backend/routes/api.php b/backend/routes/api.php new file mode 100644 index 0000000..c54b118 --- /dev/null +++ b/backend/routes/api.php @@ -0,0 +1,192 @@ +middleware('throttle:login'); +Route::post('/forgot-password', [AuthController::class, 'forgotPassword'])->middleware('throttle:login'); + +Route::middleware('auth:sanctum')->group(function () { + Route::post('/logout', [AuthController::class, 'logout']); + Route::get('/user', [AuthController::class, 'user']); + Route::put('/user/profile', [AuthController::class, 'updateProfile']); + Route::post('/user/avatar', [AuthController::class, 'updateAvatar']); + Route::put('/user/password', [AuthController::class, 'changePassword'])->middleware('throttle:sensitive'); + + Route::get('/pwa/home', [PwaController::class, 'home']); + Route::get('/pwa/profile', [PwaController::class, 'profile']); + Route::get('/pwa/sprints', [PwaController::class, 'sprints'])->middleware('permission:sprints.view'); + Route::get('/pwa/task-options', [PwaController::class, 'taskOptions'])->middleware('permission:tasks.create'); + Route::get('/pwa/projects', [PwaController::class, 'projects'])->middleware('permission:projects.view'); + Route::get('/pwa/projects/{project}', [PwaController::class, 'projectDetail'])->middleware('permission:projects.view'); + Route::patch('/pwa/projects/{project}/status', [PwaController::class, 'updateProjectStatus'])->middleware('permission:projects.edit'); + Route::get('/pwa/notifications', [PwaController::class, 'notifications'])->middleware('permission:notifications.view'); + Route::patch('/pwa/notifications/{notification}/read', [PwaController::class, 'notificationRead'])->middleware('permission:notifications.view'); + Route::patch('/pwa/notifications/{notification}/unread', [PwaController::class, 'notificationUnread'])->middleware('permission:notifications.view'); + Route::patch('/pwa/notifications/{notification}/remind', [PwaController::class, 'notificationRemind'])->middleware('permission:notifications.view'); + Route::patch('/pwa/notifications/{notification}/dismiss', [PwaController::class, 'notificationDismiss'])->middleware('permission:notifications.view'); + Route::patch('/pwa/notifications/read-all', [PwaController::class, 'notificationsReadAll'])->middleware('permission:notifications.view'); + Route::get('/pwa/tasks', [PwaController::class, 'tasks'])->middleware('permission:tasks.view'); + Route::get('/pwa/tasks/{task}', [PwaController::class, 'taskDetail'])->middleware('permission:tasks.view'); + Route::patch('/pwa/tasks/{task}/status', [PwaController::class, 'updateTaskStatus'])->middleware('permission:tasks.edit'); + Route::post('/pwa/tasks/{task}/comments', [PwaController::class, 'addTaskComment'])->middleware('permission:comments.create'); + Route::post('/pwa/tasks/{task}/attachments', [PwaController::class, 'addTaskAttachment'])->middleware('permission:files.upload'); + Route::get('/pwa/tasks/{task}/attachments/{file}', [PwaController::class, 'downloadTaskAttachment'])->middleware('permission:files.view'); + + Route::get('/dashboard/summary', [DashboardController::class, 'summary'])->middleware('permission:reports.view'); + Route::get('/dashboard/charts', [DashboardController::class, 'charts'])->middleware('permission:reports.view'); + + Route::get('/users', [UserController::class, 'index'])->middleware(['permission:team.view', 'throttle:sensitive']); + Route::post('/users', [UserController::class, 'store'])->middleware(['permission:team.create', 'throttle:sensitive']); + Route::get('/users/{user}', [UserController::class, 'show'])->middleware(['permission:team.view', 'throttle:sensitive']); + Route::put('/users/{user}', [UserController::class, 'update'])->middleware(['permission:team.edit', 'throttle:sensitive']); + Route::patch('/users/{user}', [UserController::class, 'update'])->middleware(['permission:team.edit', 'throttle:sensitive']); + Route::delete('/users/{user}', [UserController::class, 'destroy'])->middleware(['permission:team.delete', 'throttle:sensitive']); + Route::patch('/users/{user}/status', [UserController::class, 'updateStatus']); + Route::put('/users/{user}/status', [UserController::class, 'updateStatus']); + Route::put('/users/{user}/roles', [UserController::class, 'syncRoles'])->middleware(['permission:roles.edit', 'throttle:sensitive']); + Route::get('/users/{user}/workload', [UserController::class, 'updateWorkload']); + Route::get('/users/{user}/tasks', [UserController::class, 'taskStats']); + + Route::get('/projects', [ProjectController::class, 'index'])->middleware('permission:projects.view'); + Route::post('/projects', [ProjectController::class, 'store'])->middleware('permission:projects.create'); + Route::get('/projects/{project}', [ProjectController::class, 'show'])->middleware('permission:projects.view'); + Route::put('/projects/{project}', [ProjectController::class, 'update'])->middleware('permission:projects.edit'); + Route::patch('/projects/{project}', [ProjectController::class, 'update'])->middleware('permission:projects.edit'); + Route::delete('/projects/{project}', [ProjectController::class, 'destroy'])->middleware('permission:projects.delete'); + Route::post('/projects/{project}/archive', [ProjectController::class, 'archive'])->middleware('permission:projects.edit'); + Route::post('/projects/{project}/restore', [ProjectController::class, 'restore'])->middleware('permission:projects.edit'); + Route::post('/projects/{project}/members', [ProjectController::class, 'addMember'])->middleware('permission:projects.assign'); + Route::delete('/projects/{project}/members/{user}', [ProjectController::class, 'removeMember'])->middleware('permission:projects.assign'); + Route::post('/projects/{project}/update-progress', [ProjectController::class, 'updateProgress'])->middleware('permission:projects.edit'); + + Route::get('/tasks', [TaskController::class, 'index'])->middleware('permission:tasks.view'); + Route::post('/tasks', [TaskController::class, 'store'])->middleware('permission:tasks.create'); + Route::get('/tasks/{task}', [TaskController::class, 'show'])->middleware('permission:tasks.view'); + Route::put('/tasks/{task}', [TaskController::class, 'update'])->middleware('permission:tasks.edit'); + Route::patch('/tasks/{task}', [TaskController::class, 'update'])->middleware('permission:tasks.edit'); + Route::delete('/tasks/{task}', [TaskController::class, 'destroy'])->middleware('permission:tasks.delete'); + Route::put('/tasks/{task}/status', [TaskController::class, 'updateStatus'])->middleware('permission:tasks.edit'); + Route::put('/tasks/{task}/assignee', [TaskController::class, 'updateAssignee'])->middleware('permission:tasks.assign'); + Route::post('/tasks/reorder', [TaskController::class, 'reorder'])->middleware('permission:tasks.edit'); + Route::get('/my-tasks', [TaskController::class, 'myTasks']); + Route::get('/delayed-tasks', [TaskController::class, 'delayedTasks']); + + Route::apiResource('tasks.checklists', ChecklistController::class)->shallow(); + Route::put('/checklists/{checklist}/toggle', [ChecklistController::class, 'toggleComplete']); + + Route::apiResource('tasks.subtasks', SubtaskController::class)->shallow(); + Route::put('/subtasks/{subtask}/status', [SubtaskController::class, 'updateStatus']); + + Route::get('/sprints', [SprintController::class, 'index'])->middleware('permission:sprints.view'); + Route::post('/sprints', [SprintController::class, 'store'])->middleware('permission:sprints.create'); + Route::get('/sprints/{sprint}', [SprintController::class, 'show'])->middleware('permission:sprints.view'); + Route::put('/sprints/{sprint}', [SprintController::class, 'update'])->middleware('permission:sprints.edit'); + Route::patch('/sprints/{sprint}', [SprintController::class, 'update'])->middleware('permission:sprints.edit'); + Route::delete('/sprints/{sprint}', [SprintController::class, 'destroy'])->middleware('permission:sprints.delete'); + Route::get('/sprints/{sprint}/available-tasks', [SprintController::class, 'availableTasks'])->middleware('permission:sprints.view'); + Route::post('/sprints/{sprint}/tasks', [SprintController::class, 'addTask'])->middleware('permission:sprints.edit'); + Route::delete('/sprints/{sprint}/tasks/{task}', [SprintController::class, 'removeTask'])->middleware('permission:sprints.edit'); + Route::put('/sprints/{sprint}/tasks/{task}/status', [SprintController::class, 'updateTaskStatus'])->middleware('permission:sprints.edit'); + Route::post('/sprints/{sprint}/start', [SprintController::class, 'start'])->middleware('permission:sprints.edit'); + Route::post('/sprints/{sprint}/end', [SprintController::class, 'end'])->middleware('permission:sprints.edit'); + Route::post('/sprints/{sprint}/cancel', [SprintController::class, 'cancel'])->middleware('permission:sprints.edit'); + Route::get('/sprints/{sprint}/report', [SprintController::class, 'report'])->middleware('permission:sprints.view'); + Route::put('/sprints/{sprint}/retrospective', [SprintController::class, 'updateRetrospective'])->middleware('permission:sprints.edit'); + + Route::get('/backlog-items', [BacklogController::class, 'index'])->middleware('permission:backlog.view'); + Route::post('/backlog-items', [BacklogController::class, 'store'])->middleware('permission:backlog.create'); + Route::get('/backlog-items/{backlogItem}', [BacklogController::class, 'show'])->middleware('permission:backlog.view'); + Route::put('/backlog-items/{backlogItem}', [BacklogController::class, 'update'])->middleware('permission:backlog.edit'); + Route::patch('/backlog-items/{backlogItem}', [BacklogController::class, 'update'])->middleware('permission:backlog.edit'); + Route::delete('/backlog-items/{backlogItem}', [BacklogController::class, 'destroy'])->middleware('permission:backlog.delete'); + Route::post('/backlog-items/{backlogItem}/convert-to-task', [BacklogController::class, 'convertToTask'])->middleware('permission:backlog.edit'); + + Route::get('/meetings', [MeetingController::class, 'index'])->middleware('permission:meetings.view'); + Route::post('/meetings', [MeetingController::class, 'store'])->middleware('permission:meetings.create'); + Route::get('/meetings/{meeting}', [MeetingController::class, 'show'])->middleware('permission:meetings.view'); + Route::put('/meetings/{meeting}', [MeetingController::class, 'update'])->middleware('permission:meetings.edit'); + Route::patch('/meetings/{meeting}', [MeetingController::class, 'update'])->middleware('permission:meetings.edit'); + Route::delete('/meetings/{meeting}', [MeetingController::class, 'destroy'])->middleware('permission:meetings.delete'); + Route::post('/meetings/{meeting}/participants', [MeetingController::class, 'addParticipant'])->middleware('permission:meetings.edit'); + Route::delete('/meetings/{meeting}/participants/{user}', [MeetingController::class, 'removeParticipant'])->middleware('permission:meetings.edit'); + Route::post('/meetings/{meeting}/action-items', [MeetingController::class, 'addActionItem'])->middleware('permission:meetings.edit'); + Route::put('/meetings/{meeting}/action-items/{actionItem}', [MeetingController::class, 'updateActionItem'])->middleware('permission:meetings.edit'); + Route::post('/meetings/{meeting}/action-items/{actionItem}/convert-to-task', [MeetingController::class, 'convertActionItemToTask'])->middleware('permission:meetings.edit'); + + Route::get('/comments', [CommentController::class, 'index'])->middleware('permission:comments.view'); + Route::post('/comments', [CommentController::class, 'store'])->middleware('permission:comments.create'); + Route::put('/comments/{comment}', [CommentController::class, 'update'])->middleware('permission:comments.edit'); + Route::delete('/comments/{comment}', [CommentController::class, 'destroy'])->middleware('permission:comments.delete'); + + Route::get('/files', [FileController::class, 'index'])->middleware('permission:files.view'); + Route::post('/files', [FileController::class, 'store'])->middleware('permission:files.upload'); + Route::get('/files/{file}', [FileController::class, 'show'])->middleware('permission:files.view'); + Route::delete('/files/{file}', [FileController::class, 'destroy'])->middleware('permission:files.delete'); + + Route::get('/activity-logs', [ActivityLogController::class, 'index'])->middleware('permission:reports.view'); + Route::get('/activity-logs/{activityLog}', [ActivityLogController::class, 'show'])->middleware('permission:reports.view'); + + Route::get('/notifications', [NotificationController::class, 'index'])->middleware('permission:notifications.view'); + Route::post('/notifications/{notification}/read', [NotificationController::class, 'markAsRead'])->middleware('permission:notifications.view'); + Route::post('/notifications/read-all', [NotificationController::class, 'markAllAsRead'])->middleware('permission:notifications.view'); + Route::delete('/notifications/{notification}', [NotificationController::class, 'destroy'])->middleware('permission:notifications.view'); + + Route::prefix('reports')->middleware('permission:reports.view')->group(function () { + Route::get('/project-status', [ReportController::class, 'projectStatus']); + Route::get('/delayed-tasks', [ReportController::class, 'delayedTasks']); + Route::get('/team-performance', [ReportController::class, 'teamPerformance']); + Route::get('/workload', [ReportController::class, 'workload']); + Route::get('/sprint-progress', [ReportController::class, 'sprintProgress']); + Route::get('/time-estimate', [ReportController::class, 'timeEstimate']); + Route::get('/recent-activities', [ReportController::class, 'recentActivities']); + Route::get('/risky-projects', [ReportController::class, 'riskyProjects']); + }); + + Route::post('/departments/{department}/members', [DepartmentController::class, 'addMember'])->middleware('permission:team.edit'); + Route::put('/departments/{department}/members/{user}', [DepartmentController::class, 'updateMember'])->middleware('permission:team.edit'); + Route::delete('/departments/{department}/members/{user}', [DepartmentController::class, 'removeMember'])->middleware('permission:team.edit'); + Route::post('/departments/{department}/members/{user}/transfer', [DepartmentController::class, 'transferMember'])->middleware('permission:team.edit'); + Route::get('/departments', [DepartmentController::class, 'index'])->middleware('permission:team.view'); + Route::post('/departments', [DepartmentController::class, 'store'])->middleware('permission:team.create'); + Route::get('/departments/{department}', [DepartmentController::class, 'show'])->middleware('permission:team.view'); + Route::put('/departments/{department}', [DepartmentController::class, 'update'])->middleware('permission:team.edit'); + Route::patch('/departments/{department}', [DepartmentController::class, 'update'])->middleware('permission:team.edit'); + Route::delete('/departments/{department}', [DepartmentController::class, 'destroy'])->middleware('permission:team.delete'); + + Route::get('/roles', [RoleController::class, 'index'])->middleware(['permission:roles.view', 'throttle:sensitive']); + Route::post('/roles', [RoleController::class, 'store'])->middleware(['permission:roles.create', 'throttle:sensitive']); + Route::get('/roles/{role}', [RoleController::class, 'show'])->middleware(['permission:roles.view', 'throttle:sensitive']); + Route::put('/roles/{role}', [RoleController::class, 'update'])->middleware(['permission:roles.edit', 'throttle:sensitive']); + Route::patch('/roles/{role}', [RoleController::class, 'update'])->middleware(['permission:roles.edit', 'throttle:sensitive']); + Route::delete('/roles/{role}', [RoleController::class, 'destroy'])->middleware(['permission:roles.delete', 'throttle:sensitive']); + Route::post('/roles/{role}/permissions', [RoleController::class, 'assignPermissions'])->middleware(['permission:roles.edit', 'throttle:sensitive']); + Route::get('/roles/{role}/permissions', [RoleController::class, 'getPermissions'])->middleware('permission:roles.view'); + Route::apiResource('permissions', PermissionController::class)->only(['index', 'show'])->middleware('permission:roles.view'); + + Route::get('/settings', [SettingController::class, 'index'])->middleware('permission:settings.view'); + Route::post('/settings', [SettingController::class, 'store'])->middleware(['permission:settings.edit', 'throttle:sensitive']); + Route::put('/settings/{setting}', [SettingController::class, 'update'])->middleware(['permission:settings.edit', 'throttle:sensitive']); + + Route::get('/search', [SearchController::class, 'search']); +}); diff --git a/backend/routes/console.php b/backend/routes/console.php new file mode 100644 index 0000000..3c9adf1 --- /dev/null +++ b/backend/routes/console.php @@ -0,0 +1,8 @@ +comment(Inspiring::quote()); +})->purpose('Display an inspiring quote'); diff --git a/backend/routes/web.php b/backend/routes/web.php new file mode 100644 index 0000000..86a06c5 --- /dev/null +++ b/backend/routes/web.php @@ -0,0 +1,7 @@ +create([ + 'email' => 'admin@pm.com', + 'password' => Hash::make('password'), + 'status' => 'active', + ]); + + $response = $this->postJson('/api/login', [ + 'email' => ' admin@pm.com ', + 'password' => 'password', + ]); + + $response + ->assertOk() + ->assertJsonPath('success', true) + ->assertJsonPath('data.user.id', $user->id) + ->assertJsonStructure([ + 'data' => ['user', 'token', 'permissions'], + ]); + } + + public function test_login_rejects_invalid_credentials(): void + { + User::factory()->create([ + 'email' => 'admin@pm.com', + 'password' => Hash::make('password'), + 'status' => 'active', + ]); + + $this->postJson('/api/login', [ + 'email' => 'admin@pm.com', + 'password' => 'wrong-password', + ]) + ->assertUnauthorized() + ->assertJsonPath('success', false); + } + + public function test_inactive_user_cannot_login(): void + { + User::factory()->create([ + 'email' => 'inactive@pm.com', + 'password' => Hash::make('password'), + 'status' => 'inactive', + ]); + + $this->postJson('/api/login', [ + 'email' => 'inactive@pm.com', + 'password' => 'password', + ]) + ->assertForbidden() + ->assertJsonPath('success', false); + } + + public function test_authenticated_user_can_be_loaded_and_logged_out(): void + { + $user = User::factory()->create([ + 'password' => Hash::make('password'), + 'status' => 'active', + ]); + + $token = $user->createToken('api-token')->plainTextToken; + + $this->withToken($token) + ->getJson('/api/user') + ->assertOk() + ->assertJsonPath('data.id', $user->id); + + $this->withToken($token) + ->postJson('/api/logout') + ->assertOk() + ->assertJsonPath('success', true); + + Auth::forgetGuards(); + + $this->withToken($token) + ->getJson('/api/user') + ->assertUnauthorized(); + } +} diff --git a/backend/tests/Feature/DepartmentMemberTest.php b/backend/tests/Feature/DepartmentMemberTest.php new file mode 100644 index 0000000..a0136e2 --- /dev/null +++ b/backend/tests/Feature/DepartmentMemberTest.php @@ -0,0 +1,74 @@ +create(['status' => 'active']); + $this->grantAdminRole($admin); + $department = Department::create([ + 'name' => 'فناوری اطلاعات', + 'type' => 'department', + 'is_active' => true, + ]); + Department::create([ + 'name' => 'زیرساخت', + 'type' => 'unit', + 'parent_id' => $department->id, + 'is_active' => true, + ]); + + $token = $admin->createToken('api-token')->plainTextToken; + + $this->withToken($token) + ->getJson('/api/departments') + ->assertOk() + ->assertJsonPath('data.0.name', 'فناوری اطلاعات') + ->assertJsonPath('data.0.children.0.name', 'زیرساخت') + ->assertJsonPath('flat.1.parent_id', $department->id); + } + + public function test_authenticated_user_can_add_member_to_department(): void + { + $admin = User::factory()->create(['status' => 'active']); + $this->grantAdminRole($admin); + $member = User::factory()->create(['status' => 'active']); + $department = Department::create([ + 'name' => 'دپارتمان محصول', + 'type' => 'department', + 'is_active' => true, + ]); + + $token = $admin->createToken('api-token')->plainTextToken; + + $this->withToken($token) + ->postJson("/api/departments/{$department->id}/members", [ + 'user_id' => $member->id, + 'role_in_team' => 'طراح محصول', + 'is_primary' => true, + ]) + ->assertOk() + ->assertJsonPath('success', true); + + $this->assertDatabaseHas('department_user', [ + 'department_id' => $department->id, + 'user_id' => $member->id, + 'role_in_team' => 'طراح محصول', + 'is_primary' => true, + ]); + $this->assertDatabaseHas('users', [ + 'id' => $member->id, + 'department_id' => $department->id, + 'department' => 'دپارتمان محصول', + ]); + } +} diff --git a/backend/tests/Feature/ExampleTest.php b/backend/tests/Feature/ExampleTest.php new file mode 100644 index 0000000..8364a84 --- /dev/null +++ b/backend/tests/Feature/ExampleTest.php @@ -0,0 +1,19 @@ +get('/'); + + $response->assertStatus(200); + } +} diff --git a/backend/tests/Feature/PwaHomeTest.php b/backend/tests/Feature/PwaHomeTest.php new file mode 100644 index 0000000..7a19947 --- /dev/null +++ b/backend/tests/Feature/PwaHomeTest.php @@ -0,0 +1,62 @@ +getJson('/api/pwa/home')->assertUnauthorized(); + } + + public function test_authenticated_user_gets_personal_pwa_home_summary(): void + { + $user = User::factory()->create(['status' => 'active', 'name' => 'کاربر تست']); + $project = Project::create([ + 'title' => 'پروژه موبایل', + 'project_manager_id' => $user->id, + 'status' => 'active', + 'priority' => 'medium', + 'created_by' => $user->id, + ]); + + Task::create([ + 'title' => 'تسک امروز', + 'project_id' => $project->id, + 'assignee_id' => $user->id, + 'reporter_id' => $user->id, + 'created_by' => $user->id, + 'priority' => 'high', + 'status' => 'in_progress', + 'due_date' => now()->toDateString(), + ]); + + Notification::create([ + 'user_id' => $user->id, + 'type' => 'task_assigned', + 'title' => 'تسک جدید', + 'body' => 'یک تسک به شما تخصیص داده شد', + 'is_read' => false, + ]); + + $token = $user->createToken('api-token')->plainTextToken; + + $this->withToken($token) + ->getJson('/api/pwa/home') + ->assertOk() + ->assertJsonPath('data.user.name', 'کاربر تست') + ->assertJsonPath('data.stats.today_tasks', 1) + ->assertJsonPath('data.stats.unread_notifications', 1) + ->assertJsonPath('data.tasks.0.title', 'تسک امروز') + ->assertJsonPath('data.notifications.0.title', 'تسک جدید'); + } +} diff --git a/backend/tests/Feature/RolePermissionManagementTest.php b/backend/tests/Feature/RolePermissionManagementTest.php new file mode 100644 index 0000000..b1ba007 --- /dev/null +++ b/backend/tests/Feature/RolePermissionManagementTest.php @@ -0,0 +1,74 @@ +create(['status' => 'active']); + $this->grantAdminRole($admin); + $token = $admin->createToken('api-token')->plainTextToken; + $permissions = Permission::query()->insert([ + ['name' => 'projects.view', 'display_name' => 'مشاهده پروژه‌ها', 'module' => 'projects', 'guard_name' => 'web', 'created_at' => now(), 'updated_at' => now()], + ['name' => 'projects.edit', 'display_name' => 'ویرایش پروژه‌ها', 'module' => 'projects', 'guard_name' => 'web', 'created_at' => now(), 'updated_at' => now()], + ]); + + $permissionIds = Permission::pluck('id')->all(); + + $response = $this->withToken($token) + ->postJson('/api/roles', [ + 'name' => 'delivery_lead', + 'display_name' => 'راهبر تحویل', + 'description' => 'مدیریت تحویل پروژه‌ها', + 'permissions' => $permissionIds, + ]); + + $response + ->assertCreated() + ->assertJsonPath('data.name', 'delivery_lead') + ->assertJsonCount(2, 'data.permissions'); + + $role = Role::where('name', 'delivery_lead')->firstOrFail(); + $this->assertCount(2, $role->permissions); + $this->assertTrue($permissions); + + $this->withToken($token) + ->postJson("/api/roles/{$role->id}/permissions", ['permissions' => [$permissionIds[0]]]) + ->assertOk() + ->assertJsonCount(1, 'data.permissions'); + + $this->assertSame([$permissionIds[0]], $role->fresh()->permissions()->pluck('permissions.id')->all()); + } + + public function test_user_roles_can_be_synced(): void + { + $admin = User::factory()->create(['status' => 'active']); + $target = User::factory()->create(['status' => 'active']); + $this->grantAdminRole($admin); + $token = $admin->createToken('api-token')->plainTextToken; + + $roles = Role::query()->insert([ + ['name' => 'qa_observer', 'display_name' => 'ناظر کیفیت', 'guard_name' => 'web', 'created_at' => now(), 'updated_at' => now()], + ['name' => 'delivery_manager', 'display_name' => 'مدیر تحویل', 'guard_name' => 'web', 'created_at' => now(), 'updated_at' => now()], + ]); + + $roleIds = Role::whereIn('name', ['qa_observer', 'delivery_manager'])->pluck('id')->all(); + + $this->withToken($token) + ->putJson("/api/users/{$target->id}/roles", ['roles' => $roleIds]) + ->assertOk() + ->assertJsonCount(2, 'data.roles'); + + $this->assertSame($roleIds, $target->fresh()->roles()->pluck('roles.id')->all()); + $this->assertTrue($roles); + } +} diff --git a/backend/tests/Feature/SecurityHardeningTest.php b/backend/tests/Feature/SecurityHardeningTest.php new file mode 100644 index 0000000..c941e5e --- /dev/null +++ b/backend/tests/Feature/SecurityHardeningTest.php @@ -0,0 +1,87 @@ +postJson('/api/login', [ + 'email' => 'missing@example.com', + 'password' => 'wrong-password', + ])->assertUnauthorized(); + } + + $this->postJson('/api/login', [ + 'email' => 'missing@example.com', + 'password' => 'wrong-password', + ])->assertTooManyRequests(); + } + + public function test_file_upload_rejects_executable_files(): void + { + Storage::fake('local'); + + $user = User::factory()->create(['status' => 'active']); + $this->grantAdminRole($user); + $project = Project::create([ + 'title' => 'Security test project', + 'project_manager_id' => $user->id, + 'created_by' => $user->id, + ]); + $token = $user->createToken('api-token')->plainTextToken; + + $this->withToken($token) + ->postJson('/api/files', [ + 'project_id' => $project->id, + 'file' => UploadedFile::fake()->create('payload.php', 4, 'application/x-php'), + ]) + ->assertUnprocessable(); + } + + public function test_file_resource_does_not_expose_storage_path(): void + { + $user = User::factory()->create(['status' => 'active']); + $this->grantAdminRole($user); + $file = File::create([ + 'name' => 'safe.pdf', + 'original_name' => 'safe.pdf', + 'path' => 'files/private-safe.pdf', + 'mime_type' => 'application/pdf', + 'size' => 123, + 'fileable_type' => Project::class, + 'fileable_id' => 1, + 'user_id' => $user->id, + ]); + + $token = $user->createToken('api-token')->plainTextToken; + + $this->withToken($token) + ->getJson('/api/files') + ->assertOk() + ->assertJsonMissingPath('data.0.path') + ->assertJsonPath('data.0.download_url', url("/api/files/{$file->id}")); + } + + public function test_user_without_permission_cannot_access_user_management(): void + { + $user = User::factory()->create(['status' => 'active']); + $token = $user->createToken('api-token')->plainTextToken; + + $this->withToken($token) + ->getJson('/api/users') + ->assertForbidden() + ->assertJsonPath('success', false); + } +} diff --git a/backend/tests/Feature/SettingTest.php b/backend/tests/Feature/SettingTest.php new file mode 100644 index 0000000..fc7b6cc --- /dev/null +++ b/backend/tests/Feature/SettingTest.php @@ -0,0 +1,78 @@ +create(['status' => 'active']); + $this->grantAdminRole($user); + $token = $user->createToken('api-token')->plainTextToken; + + $this->withToken($token) + ->postJson('/api/settings', [ + 'key' => 'default_task_statuses', + 'value' => ['todo', 'in_progress', 'done'], + 'group' => 'task', + 'type' => 'list', + ]) + ->assertCreated() + ->assertJsonPath('data.value.0', 'todo') + ->assertJsonPath('data.type', 'list'); + + $setting = Setting::where('key', 'default_task_statuses')->firstOrFail(); + + $this->withToken($token) + ->putJson("/api/settings/{$setting->id}", [ + 'value' => ['todo', 'review', 'done'], + 'group' => 'task', + 'type' => 'list', + ]) + ->assertOk() + ->assertJsonPath('data.value.1', 'review'); + + $this->assertSame(['todo', 'review', 'done'], $setting->fresh()->value); + } + + public function test_settings_support_plain_strings_and_json_objects(): void + { + $user = User::factory()->create(['status' => 'active']); + $this->grantAdminRole($user); + $token = $user->createToken('api-token')->plainTextToken; + + $plain = Setting::create([ + 'key' => 'company_name', + 'value' => 'شرکت پیشگام', + 'group' => 'general', + 'type' => 'string', + ]); + + $this->withToken($token) + ->getJson('/api/settings') + ->assertOk() + ->assertJsonPath('data.0.value', 'شرکت پیشگام'); + + $this->withToken($token) + ->putJson("/api/settings/{$plain->id}", [ + 'value' => [ + 'host' => 'smtp.example.com', + 'port' => '587', + 'encryption' => 'tls', + ], + 'group' => 'mail', + 'type' => 'json', + ]) + ->assertOk() + ->assertJsonPath('data.value.host', 'smtp.example.com'); + + $this->assertSame('smtp.example.com', $plain->fresh()->value['host']); + } +} diff --git a/backend/tests/TestCase.php b/backend/tests/TestCase.php new file mode 100644 index 0000000..53f4b4e --- /dev/null +++ b/backend/tests/TestCase.php @@ -0,0 +1,22 @@ + 'admin'], + ['display_name' => 'ادمین', 'guard_name' => 'web'] + ); + + $user->roles()->syncWithoutDetaching([$role->id]); + + return $role; + } +} diff --git a/backend/tests/Unit/ExampleTest.php b/backend/tests/Unit/ExampleTest.php new file mode 100644 index 0000000..5773b0c --- /dev/null +++ b/backend/tests/Unit/ExampleTest.php @@ -0,0 +1,16 @@ +assertTrue(true); + } +} diff --git a/backend/vite.config.js b/backend/vite.config.js new file mode 100644 index 0000000..f35b4e7 --- /dev/null +++ b/backend/vite.config.js @@ -0,0 +1,18 @@ +import { defineConfig } from 'vite'; +import laravel from 'laravel-vite-plugin'; +import tailwindcss from '@tailwindcss/vite'; + +export default defineConfig({ + plugins: [ + laravel({ + input: ['resources/css/app.css', 'resources/js/app.js'], + refresh: true, + }), + tailwindcss(), + ], + server: { + watch: { + ignored: ['**/storage/framework/views/**'], + }, + }, +}); diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/frontend/.oxlintrc.json b/frontend/.oxlintrc.json new file mode 100644 index 0000000..1255078 --- /dev/null +++ b/frontend/.oxlintrc.json @@ -0,0 +1,8 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["react", "oxc"], + "rules": { + "react/rules-of-hooks": "error", + "react/only-export-components": ["warn", { "allowConstantExport": true }] + } +} diff --git a/frontend/README.md b/frontend/README.md new file mode 100644 index 0000000..d937833 --- /dev/null +++ b/frontend/README.md @@ -0,0 +1,16 @@ +# React + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs) +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) + +## React Compiler + +The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). + +## Expanding the Oxlint configuration + +If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and Oxlint's TypeScript related rules in your project. diff --git a/frontend/index.html b/frontend/index.html new file mode 100644 index 0000000..78b6242 --- /dev/null +++ b/frontend/index.html @@ -0,0 +1,16 @@ + + + + + + + + + مدیریت پروژه | سامانه مدیریت پروژه‌های سازمانی + + + +
+ + + diff --git a/frontend/package-lock.json b/frontend/package-lock.json new file mode 100644 index 0000000..c48a471 --- /dev/null +++ b/frontend/package-lock.json @@ -0,0 +1,2219 @@ +{ + "name": "frontend", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "frontend", + "version": "0.0.0", + "dependencies": { + "axios": "^1.18.1", + "lucide-react": "^0.487.0", + "react": "^19.2.7", + "react-dom": "^19.2.7", + "react-hot-toast": "^2.6.0", + "react-router-dom": "^7.18.0", + "recharts": "^3.9.0" + }, + "devDependencies": { + "@types/react": "^19.2.17", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^6.0.2", + "oxlint": "^1.69.0", + "vite": "^8.1.0" + } + }, + "node_modules/@emnapi/core": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", + "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.2", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", + "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", + "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz", + "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.137.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.137.0.tgz", + "integrity": "sha512-WT+Gb24i8hmvo85AIv2oEYouEXkRlKAlT9WaCa3TfLgNCN+GhrJOGZuIlMouAh38Qe4QOx26eUOVsq70qXrywA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@oxlint/binding-android-arm-eabi": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.71.0.tgz", + "integrity": "sha512-ImGmd1njEg4FEJH03jhRnveEegtO3czCtfptvaHivKAZQIYATbVFBrrzbaYMYv0oJioTnxZAZVSyV+oL7W8S2g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-android-arm64": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.71.0.tgz", + "integrity": "sha512-4A5BEexBrwY1YFF8Kiq/lp/wQPRG79G3BWIE1FuWaM5MvmpYSd+7ZySVcKkHdwo0UDzdQGddp6pD9mpctMqLnw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-arm64": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.71.0.tgz", + "integrity": "sha512-9wJA9GJulLwS2usU3CEisI/ESDO1n1z9eyTCvApMDrAkbJ1ve0mORgTMjcWWsKxkzkeZ2N/Gpra5IQE7x8tYgQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-x64": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.71.0.tgz", + "integrity": "sha512-PlLCjS06V0PeJMAJwzjrExw1sYNW9Gch3JtNlcwwZDXGlTYDuwHNN89zYH8LTXFfgkVtsYvs2nv0FqrzyuFDzg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-freebsd-x64": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.71.0.tgz", + "integrity": "sha512-Lhil7bWre0ncxbUoDoxfS0JzpTz17BRQKW7iwoAUY8GJ66+WwJEfYPCFJ1P0WgVZR5/O/b3Q2pENlHOjeXLOGQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-gnueabihf": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.71.0.tgz", + "integrity": "sha512-Oo9/L58PYD3RC0x05d2upAPLllHytTjHQGsnC06P6Ynn7jKkp5mdImQxXdJ3+FnBaKspNpGogzgVsi6g872LiA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-musleabihf": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.71.0.tgz", + "integrity": "sha512-mSHfyfgJrEbyIR29ejaeS50BdPk+GoNPlC1dckpDiUZbJAIel68sjSMdOt4WY0/gva+ECC7FNITQkxMJU+vSBw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-gnu": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.71.0.tgz", + "integrity": "sha512-n9yY4M2tiy3aij4AqtlnspzpfdpeT5JQfK2/w2d8oyp5W0FRwOb1dIeX99nORNcxGr08iD9bH8N5XFz3I2iy8w==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-musl": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.71.0.tgz", + "integrity": "sha512-fJZrs5sDZtTaPIOiemRQQmo82Ezy+vOGXemPc4Ok7iVVsYsFa7SlW6Z5XN819VfsqBHRm3NJ3rTdnR8+bJYJdQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-ppc64-gnu": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.71.0.tgz", + "integrity": "sha512-cwl7VKGERIy9p+G+AvZdfy/06q0aHXaTt/mMRReC751iuNYJgqKjB7NydXSS30nBT9vtr2tunciOtrR4fD6FUA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-gnu": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.71.0.tgz", + "integrity": "sha512-eZ8ieVXvzGi8jr7+ybQGPK2STw3mldfxZlgA2738iflfB/rzA69sE6m5rDRpQaxC7dpm745Enlh1Tod0QAk9Gg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-musl": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.71.0.tgz", + "integrity": "sha512-puMDbQYe6+NXwfMusojoA7CXGn2b3utukmd23PQqc1E3XhVCwyZ+FueSMzDYeNgDV2dUfIVXAAKZBcFDeCL6sA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-s390x-gnu": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.71.0.tgz", + "integrity": "sha512-4NJLxBs1ujISCt3L/1FcywLs73PWtJuw+piD6feK2V6h6OS6P7xu9/sWt1DTRLibe6QCzmfZzmM/2HPORoV/Lg==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-gnu": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.71.0.tgz", + "integrity": "sha512-cFDaiR8L3430qp88tfZnvFlt3KotFhR/DlbIL0nHOMMYiG/9Wy4l+6f7t8G8pTa9bd8Lt8+M0y/qjRQ/xcB74g==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-musl": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.71.0.tgz", + "integrity": "sha512-orfixdt76KlpNly9z0PkWBBNfwjKz+JFVLP/7wnVchlKNU9Dpt9InU/ZggeSej6fC7qwHmHNOGlhLnQXcYoGuA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-openharmony-arm64": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.71.0.tgz", + "integrity": "sha512-9emQu2lAp6yhPB3XuI+++vR+l/o6JR1X+EpxwcumPdQXBWXEPAsquPGL7l158EqU8SebQMXTUa/S5zN98juyHw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-arm64-msvc": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.71.0.tgz", + "integrity": "sha512-bd5kI8spYwTm3BILDtGhi73zoup5dw8MlPQNT8YB3BD5UIsjNe3K9/4ctrzQMX4SZMoK5HgzVLkLJzacEXB7fA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-ia32-msvc": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.71.0.tgz", + "integrity": "sha512-W4HvOHGzVLHcrmFu+bMrJlho+/yrlX5ZNdJZqGe8MEldkQG+RHYhxxad9P4jvWAYFmIqUA5i9DQ8QsJqSU9GIw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-x64-msvc": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.71.0.tgz", + "integrity": "sha512-D2kyEIPHk/G/wiZLnwTVC/sVst+T/lKldVOjAFpgTIBUAOlry72e5OiapDbDBF4LfJLkN5ypJb/8Eu6yJzkveQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@reduxjs/toolkit": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.12.0.tgz", + "integrity": "sha512-KiT+RzZbp6mQET+Mg+h2c97+9j1sNflUxQkIHI7Yuzf6Peu+OYpmkn6nbHWmLLWj+1ZODUJFwGZ7gx3L9R9EOw==", + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "@standard-schema/utils": "^0.3.0", + "immer": "^11.0.0", + "redux": "^5.0.1", + "redux-thunk": "^3.1.0", + "reselect": "^5.1.0" + }, + "peerDependencies": { + "react": "^16.9.0 || ^17.0.0 || ^18 || ^19", + "react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-redux": { + "optional": true + } + } + }, + "node_modules/@reduxjs/toolkit/node_modules/immer": { + "version": "11.1.8", + "resolved": "https://registry.npmjs.org/immer/-/immer-11.1.8.tgz", + "integrity": "sha512-/tbkHMW7y10Lx6i1crLjD4/OhNkRG+Fo7byZHtah0547nIeXYcpIXaUh0IAQY6gO5459qpGGYapcEOHtFXkIuA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.3.tgz", + "integrity": "sha512-DT6Z3PhvioeHMvxo+xHc3KtqggrI7CCTXCmC2h/5zUlp5jVitv7XEy+9q5/7v8IolhlioawpMo8Kg0EEBy7J0g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.3.tgz", + "integrity": "sha512-0NwgwsjM7LrsuVnXMK3koTpagBNOhloc/BNjKqZjv4V5zI5r13qx69uVhRx+o5Z0yy4Hzq+lpy7TAgUG/ocvrw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.3.tgz", + "integrity": "sha512-YtiBp4disu6V560loT6PjMdiRaWmVvDNrUunAalbiFx2ggeJwxdAsgZMcoGP17uyAsTwAj5V1niksxlHnVQ1Sw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.3.tgz", + "integrity": "sha512-yD3EkEdXk2LypPxnf/kSZHirarsI8gcPzc62SukhR9VJTyvV+F9Q/GxWNuCojc7sXyuVC4DxRGhdDK4X8VSsbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.3.tgz", + "integrity": "sha512-c+8vieQbsD7HNAHKIA34w0GJ9FedFFuJGD+7E6vz7Q3uqAIugL5p45fhlsj4UaAsHpcmlqugBWMhA0/j7o0sIg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.3.tgz", + "integrity": "sha512-50jD0uUwLvur7Zz9LHz17kaAdTPjn5wN93hEgjvmYFRZwiR7ZJYovTd5ipyWJDAnXKvZ+wgc+/Ika6dwSF5OcA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.3.tgz", + "integrity": "sha512-BO9+oPL8K9poZJBfYPsXNtYjPE5uM3qeehT3aFcW4LITOl+iSqhp0abzjR2nWBUNjIZeKXjAEWBZ64WjNoHd6w==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.3.tgz", + "integrity": "sha512-f3VpLB1vQ0Eo6ecr/6cekLnvYMFF4YBFoVGkfkvPLq1bAkbAwHYQPZKoAmG6OJyTcxxoC+AvezGx/S1obNC0Mw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.3.tgz", + "integrity": "sha512-AmurZ26Pqx/RI9N1gzEOCklkKXl927yjfXWUUS0O7Puh8ARM/Ob8qfrD3qnWksScdw6cSrW5PSHE9DyLu7+PtA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.3.tgz", + "integrity": "sha512-JJpqs8bRGITDOdbkNKnlojzBabbOHrqjSvDr0IVsZObE1lBcPjxItUEY9eWIDbxaJ3cGrXPWGfGkIxFijg/URg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.3.tgz", + "integrity": "sha512-rSJcdjPxzA/by/6/rYs+v+bXU7UjvnbUWz8MJb6kh6+knqB1dCrtHg0uu7C/4haqJvqdkYHQ5IGn+tCH9GLW/g==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.3.tgz", + "integrity": "sha512-hQ3/PYkDJICgevvyNcVrihVeqq7k1Pp3VZ9lY+dauAYUJKO+auqApvANhvR1An9BhmqYKvW2Mu1F9u4DXSMLxQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.3.tgz", + "integrity": "sha512-Elcv/BtML9lXrV6JuKITc/grN2kYV9gjsQpW8Jfw4ioK0TOkjBjye0nnyqQNy9STNaI20lXNaQBRrD5gSgR0Yg==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.11.1", + "@emnapi/runtime": "1.11.1", + "@napi-rs/wasm-runtime": "^1.1.6" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.3.tgz", + "integrity": "sha512-2DrEfhluH9yhiaFApmsjsjwrSYbNcY1oFTzYSP1a535jDbV98zCFanA/96TBUd0iDFcxGmw9QRExwGCXz3U+/g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.3.tgz", + "integrity": "sha512-OL4OMk7UPXOeVGGd3qo5zJyPIljf4AFgk5QAkPPS+OoLuOOozhuaQGC18MxVTnw/06q93gShAJzlwnSCY9YtqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "license": "MIT" + }, + "node_modules/@standard-schema/utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@standard-schema/utils/-/utils-0.3.0.tgz", + "integrity": "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==", + "license": "MIT" + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", + "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/d3-array": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", + "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==", + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", + "license": "MIT" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", + "license": "MIT" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "license": "MIT" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz", + "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==", + "license": "MIT", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-shape": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz", + "integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", + "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==", + "license": "MIT" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "19.2.17", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.17.tgz", + "integrity": "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", + "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.2.0" + } + }, + "node_modules/@types/use-sync-external-store": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz", + "integrity": "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==", + "license": "MIT" + }, + "node_modules/@vitejs/plugin-react": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.0.3.tgz", + "integrity": "sha512-vmFvco5/QuC2f9Oj+wTk0+9XeDFkHxSamwZKYc7MxYwKICfvUvlMhqKI0VuICPltGqh1neqBKDvO4kes1ya8vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", + "babel-plugin-react-compiler": "^1.0.0", + "vite": "^8.0.0" + }, + "peerDependenciesMeta": { + "@rolldown/plugin-babel": { + "optional": true + }, + "babel-plugin-react-compiler": { + "optional": true + } + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.18.1.tgz", + "integrity": "sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.5", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cookie": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz", + "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "license": "MIT" + }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz", + "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decimal.js-light": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", + "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==", + "license": "MIT" + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-toolkit": { + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.49.0.tgz", + "integrity": "sha512-G5iZ6Pc/FNRY/soKZHC+TxGDD83rHUDXxzaWhGCX44vAv/tMs56WMusnm/KMNK+luUPsgA9U28cGr4RDlSzL2g==", + "license": "MIT", + "workspaces": [ + "docs", + "benchmarks" + ] + }, + "node_modules/eventemitter3": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", + "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/goober": { + "version": "2.1.19", + "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.19.tgz", + "integrity": "sha512-U7veizMqxyKlM58+Z5j2ngJBH/r9siDmxpvNxSw0PylF6WQvrASJEZrxh1hidRBJc2jqoBVSyOban5u8m+6Rxg==", + "license": "MIT", + "peerDependencies": { + "csstype": "^3.0.10" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/immer": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/immer/-/immer-10.2.0.tgz", + "integrity": "sha512-d/+XTN3zfODyjr89gM3mPq1WNX2B8pYsu7eORitdwyA2sBubnTl3laYlBk4sXY5FUa5qTZGBDPJICVbvqzjlbw==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lucide-react": { + "version": "0.487.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.487.0.tgz", + "integrity": "sha512-aKqhOQ+YmFnwq8dWgGjOuLc8V1R9/c/yOd+zDY4+ohsR2Jo05lSGc3WsstYPIzcTpeosN7LoCkLReUUITvaIvw==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.15", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.15.tgz", + "integrity": "sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/oxlint": { + "version": "1.71.0", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.71.0.tgz", + "integrity": "sha512-U1m1X+C0vDj7DC1e13IoZULzEcPczE7UOMTs8VlZGHUEIUaSTZKo5qkPsQEfzpgnQ29Pea/w3Xntk62UCecxZw==", + "dev": true, + "license": "MIT", + "bin": { + "oxlint": "bin/oxlint" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxlint/binding-android-arm-eabi": "1.71.0", + "@oxlint/binding-android-arm64": "1.71.0", + "@oxlint/binding-darwin-arm64": "1.71.0", + "@oxlint/binding-darwin-x64": "1.71.0", + "@oxlint/binding-freebsd-x64": "1.71.0", + "@oxlint/binding-linux-arm-gnueabihf": "1.71.0", + "@oxlint/binding-linux-arm-musleabihf": "1.71.0", + "@oxlint/binding-linux-arm64-gnu": "1.71.0", + "@oxlint/binding-linux-arm64-musl": "1.71.0", + "@oxlint/binding-linux-ppc64-gnu": "1.71.0", + "@oxlint/binding-linux-riscv64-gnu": "1.71.0", + "@oxlint/binding-linux-riscv64-musl": "1.71.0", + "@oxlint/binding-linux-s390x-gnu": "1.71.0", + "@oxlint/binding-linux-x64-gnu": "1.71.0", + "@oxlint/binding-linux-x64-musl": "1.71.0", + "@oxlint/binding-openharmony-arm64": "1.71.0", + "@oxlint/binding-win32-arm64-msvc": "1.71.0", + "@oxlint/binding-win32-ia32-msvc": "1.71.0", + "@oxlint/binding-win32-x64-msvc": "1.71.0" + }, + "peerDependencies": { + "oxlint-tsgolint": ">=0.22.1", + "vite-plus": "*" + }, + "peerDependenciesMeta": { + "oxlint-tsgolint": { + "optional": true + }, + "vite-plus": { + "optional": true + } + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.15", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", + "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.12", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/react": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.7.tgz", + "integrity": "sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.7.tgz", + "integrity": "sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.7" + } + }, + "node_modules/react-hot-toast": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.6.0.tgz", + "integrity": "sha512-bH+2EBMZ4sdyou/DPrfgIouFpcRLCJ+HoCA32UoAYHn6T3Ur5yfcDCeSr5mwldl6pFOsiocmrXMuoCJ1vV8bWg==", + "license": "MIT", + "dependencies": { + "csstype": "^3.1.3", + "goober": "^2.1.16" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": ">=16", + "react-dom": ">=16" + } + }, + "node_modules/react-is": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.7.tgz", + "integrity": "sha512-kZFnouyVv7eP/Phmrlo9FK+zcAdriZJvzxXHF1Sl1P377WSGe2G/JxVolhTrB/jeV47lKImhNUsijjHAAbcl/A==", + "license": "MIT", + "peer": true + }, + "node_modules/react-redux": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.3.0.tgz", + "integrity": "sha512-KQopgqFo/p/fgmAs5qz6p5RWaNAzq40WAu7fJIXnQpYxFPbJYtsJPWvGeF2rOBaY/kEuV77AVsX8TsQzKm+A/g==", + "license": "MIT", + "dependencies": { + "@types/use-sync-external-store": "^0.0.6", + "use-sync-external-store": "^1.4.0" + }, + "peerDependencies": { + "@types/react": "^18.2.25 || ^19", + "react": "^18.0 || ^19", + "redux": "^5.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "redux": { + "optional": true + } + } + }, + "node_modules/react-router": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.0.tgz", + "integrity": "sha512-pTTGt8J+ji1NOmYnjzT+bAJy/1zD+Jp4ziO6cL7T3ZLvXKtusO7BpFqlRXitqpcPVqllsIXFHRMt+2/k3Xn6HQ==", + "license": "MIT", + "dependencies": { + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/react-router-dom": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.0.tgz", + "integrity": "sha512-Fi0yY6kgtKae/Th2xibdWK0KSdYZ4B53Gyf6wRtomOKWgpNm7H7+DyfDhncdz9FKbpS+1jmDhg3F4WoGJ+yFOA==", + "license": "MIT", + "dependencies": { + "react-router": "7.18.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } + }, + "node_modules/recharts": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/recharts/-/recharts-3.9.0.tgz", + "integrity": "sha512-dCEcE9y20c8H2tkVeByrAXhhnBJk6/QLbxKmn+dJUptOfc5NMjwRh1jo0vZPRLD+5dMrHrP+hPEsfbGBMfnf5Q==", + "license": "MIT", + "workspaces": [ + "www" + ], + "dependencies": { + "@reduxjs/toolkit": "^1.9.0 || 2.x.x", + "clsx": "^2.1.1", + "decimal.js-light": "^2.5.1", + "es-toolkit": "^1.39.3", + "eventemitter3": "^5.0.1", + "immer": "^10.1.1", + "react-redux": "8.x.x || 9.x.x", + "reselect": "5.2.0", + "tiny-invariant": "^1.3.3", + "use-sync-external-store": "^1.2.2", + "victory-vendor": "^37.0.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-is": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/redux": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", + "license": "MIT" + }, + "node_modules/redux-thunk": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz", + "integrity": "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==", + "license": "MIT", + "peerDependencies": { + "redux": "^5.0.0" + } + }, + "node_modules/reselect": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.2.0.tgz", + "integrity": "sha512-AgZ3UOZm3YndfrJ4OYjgrT7bmCm/1iqkjvEfH/oYjzh6PD2qw4QuT3jjnXIrpdt4MTpMXclMT3lXbmRY+XRakw==", + "license": "MIT" + }, + "node_modules/rolldown": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.3.tgz", + "integrity": "sha512-1F1eEtUBtFvcGm1HQ9TiUIUHPQG7mSAODrhIzjxoUEFuo8OcbrGLiVLkevNgj84TE4lnHvnumwFjhJO5Eu135g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.137.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.1.3", + "@rolldown/binding-darwin-arm64": "1.1.3", + "@rolldown/binding-darwin-x64": "1.1.3", + "@rolldown/binding-freebsd-x64": "1.1.3", + "@rolldown/binding-linux-arm-gnueabihf": "1.1.3", + "@rolldown/binding-linux-arm64-gnu": "1.1.3", + "@rolldown/binding-linux-arm64-musl": "1.1.3", + "@rolldown/binding-linux-ppc64-gnu": "1.1.3", + "@rolldown/binding-linux-s390x-gnu": "1.1.3", + "@rolldown/binding-linux-x64-gnu": "1.1.3", + "@rolldown/binding-linux-x64-musl": "1.1.3", + "@rolldown/binding-openharmony-arm64": "1.1.3", + "@rolldown/binding-wasm32-wasi": "1.1.3", + "@rolldown/binding-win32-arm64-msvc": "1.1.3", + "@rolldown/binding-win32-x64-msvc": "1.1.3" + } + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" + }, + "node_modules/set-cookie-parser": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz", + "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==", + "license": "MIT" + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tiny-invariant": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/use-sync-external-store": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", + "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/victory-vendor": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-37.3.6.tgz", + "integrity": "sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==", + "license": "MIT AND ISC", + "dependencies": { + "@types/d3-array": "^3.0.3", + "@types/d3-ease": "^3.0.0", + "@types/d3-interpolate": "^3.0.1", + "@types/d3-scale": "^4.0.2", + "@types/d3-shape": "^3.1.0", + "@types/d3-time": "^3.0.0", + "@types/d3-timer": "^3.0.0", + "d3-array": "^3.1.6", + "d3-ease": "^3.0.1", + "d3-interpolate": "^3.0.1", + "d3-scale": "^4.0.2", + "d3-shape": "^3.1.0", + "d3-time": "^3.0.0", + "d3-timer": "^3.0.1" + } + }, + "node_modules/vite": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.0.tgz", + "integrity": "sha512-BuJcQK/56NQTWDGn4ABea3q4SSBdNPWwNZKTkkUpcMPnLoquSYH8llRtSUIgoL1KSCpHt5eghLShn50mH36y7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.32.0", + "picomatch": "^4.0.4", + "postcss": "^8.5.15", + "rolldown": "~1.1.2", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.3.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + } + } +} diff --git a/frontend/package.json b/frontend/package.json new file mode 100644 index 0000000..77eef20 --- /dev/null +++ b/frontend/package.json @@ -0,0 +1,27 @@ +{ + "name": "frontend", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "axios": "^1.18.1", + "lucide-react": "^0.487.0", + "react": "^19.2.7", + "react-dom": "^19.2.7", + "react-hot-toast": "^2.6.0", + "react-router-dom": "^7.18.0", + "recharts": "^3.9.0" + }, + "devDependencies": { + "@types/react": "^19.2.17", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^6.0.2", + "oxlint": "^1.69.0", + "vite": "^8.1.0" + } +} diff --git a/frontend/public/favicon.svg b/frontend/public/favicon.svg new file mode 100644 index 0000000..6893eb1 --- /dev/null +++ b/frontend/public/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/public/icons.svg b/frontend/public/icons.svg new file mode 100644 index 0000000..e952219 --- /dev/null +++ b/frontend/public/icons.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/public/manifest.webmanifest b/frontend/public/manifest.webmanifest new file mode 100644 index 0000000..7b35ec9 --- /dev/null +++ b/frontend/public/manifest.webmanifest @@ -0,0 +1,20 @@ +{ + "name": "سامانه مدیریت پروژه", + "short_name": "مدیریت پروژه", + "description": "اپلیکیشن موبایل مدیریت روزانه پروژه‌ها", + "dir": "rtl", + "lang": "fa", + "display": "standalone", + "start_url": "/pwa", + "scope": "/", + "theme_color": "#2563eb", + "background_color": "#f8fafc", + "icons": [ + { + "src": "/favicon.svg", + "sizes": "any", + "type": "image/svg+xml", + "purpose": "any maskable" + } + ] +} diff --git a/frontend/public/offline.html b/frontend/public/offline.html new file mode 100644 index 0000000..7fcf778 --- /dev/null +++ b/frontend/public/offline.html @@ -0,0 +1,19 @@ + + + + + + آفلاین | مدیریت پروژه + + + +
+

اتصال برقرار نیست

+

برای مشاهده اطلاعات به اینترنت نیاز دارید. داده‌های خصوصی سامانه به‌صورت آفلاین ذخیره نمی‌شوند.

+
+ + diff --git a/frontend/public/pwa-sw.js b/frontend/public/pwa-sw.js new file mode 100644 index 0000000..96d91a4 --- /dev/null +++ b/frontend/public/pwa-sw.js @@ -0,0 +1,28 @@ +const CACHE_NAME = 'pm-pwa-shell-v1'; +const OFFLINE_URL = '/offline.html'; + +self.addEventListener('install', (event) => { + event.waitUntil( + caches.open(CACHE_NAME).then((cache) => cache.addAll([OFFLINE_URL])) + ); +}); + +self.addEventListener('activate', (event) => { + event.waitUntil( + caches.keys().then((keys) => Promise.all(keys.filter((key) => key !== CACHE_NAME).map((key) => caches.delete(key)))) + ); +}); + +self.addEventListener('fetch', (event) => { + const url = new URL(event.request.url); + + if (url.pathname.startsWith('/api/')) { + return; + } + + if (event.request.mode === 'navigate') { + event.respondWith( + fetch(event.request).catch(() => caches.match(OFFLINE_URL)) + ); + } +}); diff --git a/frontend/src/App.css b/frontend/src/App.css new file mode 100644 index 0000000..f90339d --- /dev/null +++ b/frontend/src/App.css @@ -0,0 +1,184 @@ +.counter { + font-size: 16px; + padding: 5px 10px; + border-radius: 5px; + color: var(--accent); + background: var(--accent-bg); + border: 2px solid transparent; + transition: border-color 0.3s; + margin-bottom: 24px; + + &:hover { + border-color: var(--accent-border); + } + &:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 2px; + } +} + +.hero { + position: relative; + + .base, + .framework, + .vite { + inset-inline: 0; + margin: 0 auto; + } + + .base { + width: 170px; + position: relative; + z-index: 0; + } + + .framework, + .vite { + position: absolute; + } + + .framework { + z-index: 1; + top: 34px; + height: 28px; + transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg) + scale(1.4); + } + + .vite { + z-index: 0; + top: 107px; + height: 26px; + width: auto; + transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg) + scale(0.8); + } +} + +#center { + display: flex; + flex-direction: column; + gap: 25px; + place-content: center; + place-items: center; + flex-grow: 1; + + @media (max-width: 1024px) { + padding: 32px 20px 24px; + gap: 18px; + } +} + +#next-steps { + display: flex; + border-top: 1px solid var(--border); + text-align: left; + + & > div { + flex: 1 1 0; + padding: 32px; + @media (max-width: 1024px) { + padding: 24px 20px; + } + } + + .icon { + margin-bottom: 16px; + width: 22px; + height: 22px; + } + + @media (max-width: 1024px) { + flex-direction: column; + text-align: center; + } +} + +#docs { + border-right: 1px solid var(--border); + + @media (max-width: 1024px) { + border-right: none; + border-bottom: 1px solid var(--border); + } +} + +#next-steps ul { + list-style: none; + padding: 0; + display: flex; + gap: 8px; + margin: 32px 0 0; + + .logo { + height: 18px; + } + + a { + color: var(--text-h); + font-size: 16px; + border-radius: 6px; + background: var(--social-bg); + display: flex; + padding: 6px 12px; + align-items: center; + gap: 8px; + text-decoration: none; + transition: box-shadow 0.3s; + + &:hover { + box-shadow: var(--shadow); + } + .button-icon { + height: 18px; + width: 18px; + } + } + + @media (max-width: 1024px) { + margin-top: 20px; + flex-wrap: wrap; + justify-content: center; + + li { + flex: 1 1 calc(50% - 8px); + } + + a { + width: 100%; + justify-content: center; + box-sizing: border-box; + } + } +} + +#spacer { + height: 88px; + border-top: 1px solid var(--border); + @media (max-width: 1024px) { + height: 48px; + } +} + +.ticks { + position: relative; + width: 100%; + + &::before, + &::after { + content: ''; + position: absolute; + top: -4.5px; + border: 5px solid transparent; + } + + &::before { + left: 0; + border-left-color: var(--border); + } + &::after { + right: 0; + border-right-color: var(--border); + } +} diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx new file mode 100644 index 0000000..42611e5 --- /dev/null +++ b/frontend/src/App.jsx @@ -0,0 +1,124 @@ +import { BrowserRouter, Routes, Route, Navigate, useLocation } from 'react-router-dom'; +import { Toaster } from 'react-hot-toast'; +import { AuthProvider, useAuth } from './context/AuthContext'; +import Sidebar from './components/Sidebar'; +import Header from './components/Header'; +import { useState } from 'react'; + +import Login from './pages/Login'; +import Dashboard from './pages/Dashboard'; +import Projects from './pages/Projects'; +import ProjectDetail from './pages/ProjectDetail'; +import Tasks from './pages/Tasks'; +import Kanban from './pages/Kanban'; +import Backlog from './pages/Backlog'; +import Sprints from './pages/Sprints'; +import Team from './pages/Team'; +import MeetingList from './pages/MeetingList'; +import Files from './pages/Files'; +import Reports from './pages/Reports'; +import Notifications from './pages/Notifications'; +import Roles from './pages/Roles'; +import Settings from './pages/Settings'; +import Profile from './pages/Profile'; +import Organization from './pages/Organization'; +import PwaLayout from './pwa/PwaLayout'; +import { defaultRouteForAppMode, isStandalonePwa } from './utils/appMode'; +import './styles/pwa.css'; + +const pageTitles = { + '/': 'داشبورد', + '/projects': 'پروژه‌ها', + '/tasks': 'تسک‌ها', + '/kanban': 'برد کاری', + '/backlog': 'بک‌لاگ', + '/sprints': 'اسپرینت‌ها', + '/team': 'اعضای تیم', + '/meetings': 'جلسات', + '/files': 'فایل‌ها', + '/reports': 'گزارش‌ها', + '/notifications': 'اعلان‌ها', + '/roles': 'نقش‌ها و دسترسی‌ها', + '/organization': 'ساختار سازمانی', + '/settings': 'تنظیمات', + '/profile': 'پروفایل کاربری', +}; + +function ProtectedRoute({ children }) { + const { user, loading } = useAuth(); + if (loading) return
در حال بارگذاری...
; + if (!user) return ; + return children; +} + +function AppLayout({ children, title }) { + const [collapsed, setCollapsed] = useState(false); + return ( +
+ setCollapsed(!collapsed)} /> +
+
+
{children}
+
+
+ ); +} + +function DefaultAppRoute() { + const route = defaultRouteForAppMode(); + if (route === '/pwa') return ; + return ; +} + +function AppRoutes() { + const { user, loading } = useAuth(); + const location = useLocation(); + if (loading) return
در حال بارگذاری...
; + + if (!user) { + return ( + + } /> + } /> + + ); + } + + const isPwaPath = location.pathname === '/pwa' || location.pathname.startsWith('/pwa/'); + if (isStandalonePwa() && !isPwaPath) return ; + + return ( + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + ); +} + +export default function App() { + return ( + + + + + + + ); +} diff --git a/frontend/src/assets/hero.png b/frontend/src/assets/hero.png new file mode 100644 index 0000000000000000000000000000000000000000..02251f4b956c55af2d76fd0788124d7eee2b45eb GIT binary patch literal 13057 zcmV+cGycqpP)V|)f$;Qooc7=_G zlYe)HToTQIc!$)^+J1M1y0*T%w!p~7%ux`!eRhO?c80XDxKQ*R^lUUMnA>6NT^?feoZ8xxvP32D&s-9ow zqjcM}eesrC)NeDmsf)*P7wJ|K!&xP%Zy4iI8lF)Tv2!reW)tCzg_1=PmOwd1SQfxa z8;58t!=z~Ba7CYlNWVG>he8aRPY|+-JmozNhn!#9i#77Aa_Edt$ijyCWL#=~I>~2X zZNrQ8I0=D+NWD4pq=7~(i zhfThMNw|G>g^y9pGzxX7ZSApl@tIxFcs{p#MX{Ax&XZT+cR#U+OWc@S)pkIuI}dzu zH?^Q=<(y&Vq-oxSLfc0Zmq81bjZWf}RnssBaD6}2g-XJHLcN_|*IOu>m|x$nbm(?E zyNy!Zp=RroS;?Vg*kmoJYBi!n5{_^@rA!)=t#a^;N$8GL!*DsQb}`yvEuX!G@||An znOfUZAevPrkV_qjl|<~3QRZzG&h@C9Y5z zqpNH4xqbF_InIPh)kX}Vn^5kyed|mOuq+2>M;v~KO37a#yrEn3XDqtOl=rc6_KZ!; zreo)DFVB4|>1Zd(bvMI%8uM;3!)YMYu&cG?(PE!B~y@3yKBMt|R zAf=I16tFwPsl)!jDqvYkLHaAQ+f@W1m6F5aZvwhm4JL z{_l)@b;)mDSzle2gyFP5-r1x-5X{G}ot%VyWP@vEW80!Q=f%RTfpg>B*TA^pyWYUQ z<=xPtz}WcZ!;rFl4m1D&FFHv?K~#9!?A%+fn=lXt;9!Fc#kQ;zk~gZFsH z8e5iu@c_pzX&qb8&Dum*oXwB+fm6l6gFfC|o*wgEiy6tw~&co z9Vd_4)P%wP-KwQW7|lN-znGK#?N+j24U=$982myIBM+vsiKsc*@4-rwJxuAaHKna6 zT3wi!C~a4ZKH03qU}_1bKyx0&$CaK7_%Z+Kl$)fF5^op zZApQF2TvDav!s|krTjw-8US6ep z%!VmX4luub+fseQz_D9ATJQ?iQQwD}TZz{-yo#l12a%+7bT@E(X-hyaVS-5vuXc#^ zx^w;L21;NphGVoj*{s3f4dme0y2LC=G1-7THd`#z?;tuC{^9k(dM{Rf2GOxg7Jzho z7nSZHl7?M9kdalX`)YgoKEfiae5+;$(OGeN1eqxrv!ZCVKyH>xiyNqfe8xzY8*7)H zQls8KMp)F4D>ED;idMOU^^WhVF@q>ZSmeB0y~qC~|DB648hr%Sh|*T(4q|w2l?m2+ zvBVw3@7+Mz?^Yc#+se6KM;a<=(W-I>k)$-qL2V*t}VaW`;?P4)WqI%maIDq8!oUcSYAD`}wWjkSyAVsnF65#2zQ zZ>(K*TlS(E#4y$4Zq+e^_&}d)q20hCe3!LfLYP%nQpLJ~gM6a1hJlz3)aS<9C9me| zAcmJ#>tOwBy{HoP0Sm1&_(E+S@6 zgBIFUoei8zJmdpiq8q5=OY7t@`)JWxn_&GvKVr=Zdb_pEL_j|=?f;WK^U9Q0efd#K z9q7SfJTl4pmA$jsZ5oK8@O9#!I3Cv-kL)<8SalSsp#dcpvJ}Nz#G6FC0%9|7Fi#8; zGDJXtj!&GljT3*HE@0EE>G8Se&d)*nkqe}-?`3vPl&UqK?xG z!3XJ4M-x`EuQjhBbu?ik-)rmIt=DF_N?TVMP)8Gjn)TZ2V%H|zENbeix}kOxd@0}Q z>)HuH6Ean!uS#~4g2Ne2WsMGel|h%j9*W_quQheG^JqmKhc*RYzp0wKlGjBq2VzY_ zgOv8WC1+%W=W)k)Yp_`8kfE=uiiwOZTXi8Uj9YGr$f@yJcJ;#&-Nq~sJ7anE(@;QN z=~br%7%7`isKStX|7!1?L(apl^QvPKlrHV4S+6tNVQ*R1iGdC~WMNE1$a+=rpQmcB z>wxiLIBvOnm;u*;9Y!kJdy(T4lk|8>JAm(&wEsFIF1$_*{>2ZNd$V6DS=SfrGxAv0 zzKe377JI`&o9Ljr+VnS*EwehA{f&{cKZF(6*MG5!p5MvrFA3ll{fmRG*L@6^cb;o^ z3Wm8c?Sc6$`>~VEWw(c$Y?nRO;2Q$=ulpqPtM^=1IZx;@xK0PgO7rKQ^WHVLwtgUT z%|JF{^f(VH)wLKQ%dYiu2RmchBdxL0-M?wxxul_z*{h6ZZ`>-k(vizs((vW8Lt6Z6 zY;Dt?@JWyN`O`f;&d1Mb?e%9oyRK1ql?EE5XB2(W)|D1~Rx35$H6@6)$F?)7V|zEO zI}fu0-0}8W5=6sg$fPnZ~7=tTudl?Ecb@pxbo)vni%gP-?hL|%*?62C;x6?@E`VRnJv z?fTb;k4x;TS7Cu-z%J}uy}e-pwpLQ17Q@4DC+FCdAmNKklG$`I_pyw7E{fYmw~{Fj zi?6KcVy=Wrel)EB_DWO|0CKmI|13!gBV?X`Ozp7x>?6jr`>Qz=^4ea35!$*f}) zS$i+x_k+@P2q1RFUH^ZTTk7=n?cjfR>hTq3l3SY~#w+I8SSutXGyhw;Ws~=zMQ%Vc z>$On~47Ut?P*_!TOQ&PFmLAyJieB2X4_Fd_!WxI-AY`q1Lc-oK?+qcOTzlQ?@~x@OT}*9jTVNfl@3rGvZpWI=eKg>T zZb@6YWz)J=IhP7CF|c?G62vMEG%#U}?#86$0jR4sG~i(jRd#jmn`7b(O#?N;3a;1t zhXLssmUwGhp79luw#(*V8WL0|8+E z6=YZ_O@er~$LrD_PYGc(kJgB=;yw#+Z3X6LDUZ(NcwN=B-hjdiHm!JFar%m{(5bEW z@@_VEtG$5;`EJZ|OkJ@l&G9n((w@uNFwmU%bG|s#TbcJJos!{e+bjCjrCq_}LcN!UFgKtgg7siV*7# z!}1whTRRi*-avJPu->C}Z8EiuK$#886+H_#_!btv+rsiBbv2jAJvJ+O0{#}y(%L3H zfjU-kq_-L@2XrL*ae{{qYJkD{@dw%*bkh2P&YS-0!Xt!PRz7KHV0+~j(t9W8lAVWR zt@B*DgURgEz4>WuN>o?_iKcw$?k{||Pg7{Q2o4|VmJ)mg?{VQJA<}zEr^YAAS zgGm5RT4T3p)U;yz-tfBO^kw8?IoG!IVmc+Z3m#}AOQ?5MRa>)OcU!$N^_+yK6ayn? zK>~WK0!#ysuj^oNLakm)Zvu+J)OSubX^kv!c*xgdIvs;kln!rgG4*uZ;w0mQQO4XD zO9P{GNdv!=cQ(CAL{S(%KtuV^zC&Q{%g)PoXnp^gn^>c*`E>$hLYg2HjnbVGtWLa{7zHdG1jT@B{|Dm16 z7K2(jsfG+m*Zxof)iXxu+!H5Mo-0$pkyV3VV4B@Qms46M zuBxGRV@HxU7Wwx-6CB zaU*HO<_qn$5GH>&@?nRy1{z zkik!sLfWQ)r#75)vVwCBU*r_)Q6mp?!j85{#Xqse)ApRdE$V0%I0*~e(_{)5H)`Mk z#rExC>yjhZxuL@|+#v4#<Axw$+VpV zuT;!2Vww$je$DpAW`$FX_Ab|Ip%$;&T$-lW8jS~B$>G}rd>eQG+$h9lQx4Mx0w={m zx9?T6VU`>sR}XClkAhHEShOUe8awiq zmizhL+}5UKs3}6~It7vBTig9dfQ2Q8coo+Miiaw7n~>4ybv2Ptt0^^=VqX(t*Yya9 zr`FxxFX8(v*H=+uJ#JJWIB2A(==HDYx~^zZ2nu?2`}|Wsa*f3h3ixc+U|FDtAG$Y! z*lc_7se5Oso-Cgqe0){{!8H4g$3<8!R<6JOurD;((({c$1(pwb>(#TT!sge@4>r2@ zVL7>U`0`nsWAYErezk4(Z!gMI2?UTo{J3Ajo(u4)KYIRd>BRcG4BoS3G0EXyEp@tw z%P7__?A^a>Q&AKL@ayDO9D*Qkc!NHnO9l}kpp_6hXbMppYL(X1L?njdFT|-h2<_$; zAtDZ!1Rf%|yb!qbWKd}%0b`LzBeyNy43|QO(&h2mxQLUL)|0%agVOW)6TV!&Ip^Ls z`PG2cygM8)IecQx=Fc+nqYRo4hS^^-nM_&-y8?EJXUczP=DIw(GkTJdpEdh<_STs{ z|A)4n1GKdE=Wu!!nYoZHcUQ4S&R;oDOKX2lrkdF(mK>hz<$Pp>igjOcvoRIjlN=W8 zu8Gx5(roqn8$>gEE5vy{GiGeW8Tq{vnf3hS-V=$tZkQuftUVuU8o6k&dn=Yg3)6MOIH>nlK^-2+C6BZITr~1@So?NvG#TwL)|~=1YXGMTLpS<)ziK_CSOabe z=cB#5)yz|@0i9dSo?*CX)}UP=s6)B+F@~Em(u@Q(I9J9i_V{LmMu8BfXYMh~*oPP+ z!3~xTv|(>|=n6ZOtT~C@V!z!w%18*8T2t6}U2S##rC)mekBql&VsBX;$~ByGE$oA9 z`0Wzq8p?R{4)$l*on;!cLa}Dh^Xe?owiQZt9nH1fxxh$pN9K%CtOw?u3>85L7rr!d zXs)l{TZ{xXP&U8exz?9cv~dNNibOmt*K4I$?RxqIBZ0(?Mg-9FS{*9Bc49Qc1`=sIF-rye`aNT1G@4NwXcnyc@+bw_mTsR>5< zF<2;X0QesG_pw|TonqVBhRtfqI>ty(SIu&VOXd0CrLlfp+;WH7HYjhqnu^oAY!9cB z=B6#R?Rfz9BP`dJ=@v_?70s3HxQPk+{6Y+lM85f2NF^00*^OcM0~?JOZfR9ZPYF+# zYSs}(_BUYV8{n@2a1hD^SV41bwmi2uztR;PeBgF1F-`9>`zoNss-@3LaF2sjl~>OaaVmp7PNp+UT`6@}gR%uzqHDVeEZ14{Yt?n%JeQm+t(1_u zSc}oj^{b;+rlS|ME%+LjzSI&xu0Bblxo$MJ-J$kJ?Qu_XUXh}*@*-x@ny|}wVM%Lg z3tNB`yvr*}N?ClGL;H2cglcvErIccU3(eP7>@~4nOIcI~-`P8tSQnx=jI&{9)!1}l z;gQ%_h>ZlPSV@o@Azq1R$C6ja5!^ZGh;YRhhxs58qJWo9@Bceac&yy(pET1hnn`~7@}2L0&dfPKYs$ih7m2}R!25!(hxqA(!UIw; zK4+~Jowy3=RNC6nE=ncU{LH5?*9@W24lacJlvCZXB$CYtE@>c+~H zkV=(5I&gb{xn2!~f&fs2NQgAL6`p|kyt6kpWk}iVlqIp(H;ig`{_U9yxs1jzu^ETM z7~)Rg8C-NueqTYP&U8l{DY=Y47cR zOR@U%$KQV{mkRF|4)z9Y^t3K`@p>duY&QLUFeh6VoV`a`$U@)(z!-N*5Cj<11$EZW&hJLX83TO{lJYP74rlDZQPkm@t<=U^I)x@|UnHHkdQlh?!ltZwl92rE;;^ zZuIappj4dhld1}kttYYV-j|KF1Kus zWBnzttD^00%LFK(wrwNragFub6xiV8QE2rm<`&fcR4SLFcdtLxVuN!Aal-g6dE4%k zARZ}|xeo;K{0yf7@9aua%2j5o)CPcIOc6uLHFJOcgtB5owlcNAwyAHc0QB0Dts?c@ zUemG~j_E&W7R%+x-IO4FJl8e&*2Blmp1S#RA|)geVrxvP)NHdYuxi~g&Etn?QdNK8ZDKZ?QFLU?zh30G|t9G>a_X4zk}Ygw<^$7K!GIn(Io$>(d4ODJQ2XSd%jpK zm7>ptl$a3GyB}5-%p4>Q*p#VL^B{yQMuFCM^#l#+N!Ne z5_PrJWB=@Iy+t)H`g1lX`{bm($KE5I?0c(JEYm#t{F}j!xtsbob0{xu@0TB_*>G7w0ICn zr#VoBktqHZ~XxhiKD*lcG|b;H*|Ny3P^8ceV`sfBRfrhwZ!T+MFZ!F1Bt{q$8d9i6o?~ zODj^POr}&ivSa^R^YFIq7o0giLBKCycH_aU`F6)O6JX%nPTwh~Q`eq6*0iE#Srj2^ z*_hN3%*b83zfafy60@Cp3{J({RlSaEn&E?mrxRNC9GQ7#+f=s! z0KBf-9Ny_v2VbE%aB|Di)5kNJ^t&C`4D(>t7zYUWUFtbxt+Oq=!@O7BU)}>d*R72o zFF)3jQD_lLe4is&xzyJYC1-c{8TX$RU>&>P$%)ufpez0XSAukmh!xcekg`s$c<>-q zI#zn^JU0zzF}V60)o$_gY}PQH>b2M9&8fRZa#OauglPb zeQ@pMm&=!vNgos4CluQjLMV!pfkmxK+35bi^k&=k>9h02?l+u+m0agG;(h2|Jslc-llvtEwn~*w3bx7qnvZACG<8}AGeaDVvcHbKd2>3G^ zSFPULUn-?Pmo^-_`mLZr??uNH`2=I&yajlrF{DtUxMy#Nu}z=3y7qbUA;5`)hibMR zhXL@@uKyV0-2&A@t@!xyrBnMJl&^o@Gx$&5_q6?D=ji5grd-~=?dlg;ur(_V0wjh! zA=JV^C1m+DDkOsgr<%O9ZQFg!0}pD(#PSz4Dr_EyS5$`)VIAv);4n-SFP~YtC7sH= z7&*MfpH;gd*FHbkmD#)hVxb6xjc9~`t?_{=JS+@ip_cTicXxG<=7m9& zPX+Z8IC*GSAXuGCrZDHgR$r%jyk-fctis2Kx4HvZ|B~8uC@o)m^>Hy-O!&TKA?$&n zkP2Xc54w~!=z2?^NafyL*L0V9cbYrugHBBUj`xVyZmGFR&kvk#>1J*Z~i zNTz}?IAdJ$gkqd2!Gw(%LzE!O5s4C7q4%T~e_P{+z=DNDKrG**p=U`d5yg^vp`;Zn zsU=8gd0a9s4s0FPJePWR9eH5=+O^Kks&kC-iblNqTh2&Pw*^(4384f+D8N|fewZu_ zg2ejQ)ov;ztz;NQl7yj;A`(!H!XQu_$sqY9h_IrH*}_%1{L&_YLDvO?%R5Z-t+ClW z_qERbL?HKUZ!nt+!E9S`uoh^5A|DaIHe*_gf1`E_Vq+}{&T@t$EGhMnRjJ4z2w_W8 zp+qjs7as22^&S3wY1?+}^j-I=RcCE>#|39)g(lU7v_8;?=qK(9D8-*pPdiy)P3lIblG`+?%ea| zYoD3dopYt!tKgFicfNmNi(EWE=E4hC6(r|PYtanqJlmt57YOVrr2^tfrG(eG9C##X zu&1t@%L$RIvpj!wUA z8i>Pqot#_+Cnp6L2XPcZy1ar|9MnY+7eNvK1E)@Tr#2KsXq1*>)uUCozT7L##ok?o zhA6ofP4E|b*9tAfG?uf$#}>TIR&1A!yslP8}i7w-EzW(x#9VEvx18k%Tn=-$VV zkOtUr0b2!w3t>h?#8AZl^Az*(6KCGlD;4j~yx};`#2gN1_gv=%7KVzecIRakN{f*4 zeaI>yH;-o4OGhvGTU)(quWI)-q?V*(sVesSMv|wMUQ3hLEt=lBB$KZ9TyHr>)f7o%) zPYeU<3P)*P10*7vE)nA5#{c=6-E-_>r_u4e3i!I2+UksELwDqwMeBZ9FSP$;^Ajro z_@M#_Ss$?ejoB@!wN|kbGKs(0zLo%0QpQXW#t;oC$B0MZYZ&Ej?8~fNhcCVvPo3vo zFn0WWZaPliF^8_}yzb`*f@yg0uWv6HgNI)xa=pO%Ck(C<=-60l#uD3(wXP~c7!NoX z0&^6=N`zcc90F#qt@=Rn@r!3(*1v(Tl{B!m?Mc7yIA+nEHpY{YWr$=)F7rhR1P}(v zt{YhY#;jsW6G>#xhP*B`OCk|Pf+NN;ju1rxa*HAgoGq*rvqw&xe~;t1JA31$s?GBb z*g7&@cbKo4n<`>)!UlIAgR6q&))B0KYU8r66GbFj?8Guw4E%&}Qi_lT003LtoIZei zwD~=XZmeo+yZ2Pq3KYCF-R&11^p= z@H%s+=G`}wrbJ{()Mh71#2SP3Zy3m>l1n?0N-N1Q;z6?oSxr-G(H5m4EO>~&;}VKi zfY}3w+9z>vp#d)hVuu`)vG_aaH%3b=WKMnSu&c31;<3O;bz2iD=w+o4#oBb36 z5ZCF*Gu?zjZIR0S>_%pHY2$k8D^n7Sz_K8tCDeXM+dO<#LSg%h6`~dnVG1N@T7v&e z%wEd1!k{^zfz_1BTW{!$!B%g)J^2b87!9Y>>100X1SgT7s0z$o>^lAA=Gp_cC1(h=*5Tmf8z&LGJJ>$|K^~s`z9*OWz5MFUr?>Bi?_PGBB)#psD5?>n+q{o_ zz7~ez&;t#h8l$jwGPCC&xq2YetXYQT+0F3j(`xmNGf8dj#an|p#I*pvI*kwW4iuB> z+q3_7xB8y;pLzHG-S%+UHQA zvqp;$kmGJY>lLsN4C~&TcvAS1SErTcwcw0r@wngk zShAUA1M9b#g}^pL-zH7Q#z^&j#r9F8BTVfkR&qF<=e35goTu7c|GN)0mokj4m0%~0 zXJ8j4Hc_l;HJ&uU*Iw`8d_EscJ``s0tk9mkKo^&#TYXm-EoAzTQObxa@^u~g2t#T) zJz|rE!I_?i4dCJC=B8(_pZ{YR>|V?0iCcnU;E@$239^x?SYCfNaMHN;CtHIS_zHN9 zTkQc1v@O35okiFtq5_u+5FkY55ap@pi)O?}x0D1c*qB0KpYR}>Ul+B0Vmr}Z@+%mJ|As}sis_=ROPbov@*2thpE&?!V#Qgu$snYvCZ zrkhmkMU+fSf-s8(L37fPr&M*jRs{{THb!aXQu|P9l_-vJhHvLzMGH zE?1U0H_+PmNABp9`|KzkGfrrZ%XvdGo6*<{d5m9~L7 z_^`M;X6xDo=m6LY6RfvJEvsTK1!u8d2HPx|$S}p;sRy!I zWL55Yxu~_B`OP@~(q6&W3#)~I&+MGL%GWR$#udC151^wsswhqlii;rP9jJpiI7o&Z zAb})=HY7?4HA|re3ns`%$)FuvKCFWjhb~?IE)F6dF2K5}poj-NK6Gf;hw$t3=1txY zoxQxZWrQU6K!%|~!m?~Bnw-6Rr!F3BZ{u5!LqnZTDON}Coj9^@&le)V!NYrVwS~B% zEL+>Sr@}qGwGvu|HrOo|gSt__ezN^&%~{*)a=rf7y1HujUcr`zZB<4#l@T#eN)si} z)lZA<{=tKx8E%c9>A(##6}_p+~EZpKsl5a4pj`E*;_-6`ysiv zffA!7=MT1vCz}-m4~tjVey1b2KSR4OEtLd-(_DdUqYZ74LaDkhH?KFh?%WAOP2WbX zp@zT+Dx|5_f%JQiAGvVw!oh+g3e50u!aPfMxdC=E)XB{F5IcEZhePIM- zph6Y`$Oy?JBL<8Ex(SqEhLeQ@XcrdA>a?rx+_~HLA;l14)WmmpH}_w?Pg#HBZs0eS zwypwAW?M-x+3AU-(GGWSJ=ngxUEcEZ5OsX(Qlt!MQ zn^(`S{GHkAv(8@D`EAfSYig%Cxv?z!{=w^F#y)5_d7FuKZH7qlR-#5B0bt806%D0I zT7VdVP_?q*%Rq8UR;JkD4i^RXowt+E%#V2U>TfDqzZSDZ+dR!a#T3I>-z_$q9@k|m zy5~A*m~&JWP@E7a=pc}4kVHTc4h&R;Li7d@f`|hKMLkbb^uhOakNr3&FLjlm~i5NBM< zFaYI{;cpiHCNRdE0dg*>qIm(_t?#$h=(SCw?h3rJV2*ER8{O4^3#=dO)KwklZkoqU zS8i5c%YL*y*4;FY#D=XmkQnYj%LH)?02~gSJH`Qp1XY64g>%c_K$xseI&|e)7vRoL zAqRba$G@%fSGA7X7hQk%_3NVOYVS+$leU_!&6*5uN)8#5ZBz_6ASCA;azYS-Rt@ki zg2NWz(=;t}SC(~Ibl63$5C8FPmhXqb^)5#jaJ~I{Ex3xZ!+2h8$}}h_g@Be>HZ;72 z6#y#>AY3^skuVKF#0WxFBQ()5d5_nWb?c6c>EeMM|Mh+*&wEpPyxHCq{R-Gdr-`hN zF=1sxl&mBoK+#qRLl9#CEN|Fg8>nbmsTg3a1;#M9enQ$RgWk}kp#-5wh=EF&1tl%mJln2V^8o%Qv(*=zEuO7y z=m*8?xpUn-*@h5Cl_3BK3joiGkyaScK+>|MWdMRWm@RT!Q1piAlv5hL@B6>3&GI8) zP!xBc6}ZNIpJLL%2a8Y!+(<=f%WX>_uWVxlga9!D*oYt$l0cxRDMvqfU;Kq_mLK5k z)dvqYcgLa_Lz?3HyeF)@$%$&6lI?r4I>6W#M*<)vq{?&Oqrx``d`mhpVPr> z#q078F6gw_X<=?KR>8%^t%@wbITvNMu!hKiTSkCTJkw>1!e*Y{%31#_yMf=LW7{RJ zYoC^w$6%3cBtVG5)x#{Hg6IVTh9XEcM{gQwXk!R^y95^f-hZ`d{aVa+xW1EO4wDV4 zB?JgD7*?qkvc|$nIykTvNl2x0j3Q!MXoLL^)~}d7jcYf(H8D~c+?$pKL(px>Z3`eb z04RzS6_AgFT6Pn#iZAg$Sl_j8#;6ShF%&(Fag#E2asU@@LaN;=b=Wf7sgPKhfzhBM zC@eFL8^MrnA*9&Khe*Ab@CC9*uyJGXyi(;y2>lQLJZt;ShtJi?3Yf_t`F+$hY!+Q2Ndsx=U+bjTiAy7djLji>7k%k`$9&--f<*BNA3Hy&ZrHH|4 zG5H&9cB?O#zI1_OOf0Ce%mDfQxdtp3vU%(iY6yji3iISS61XLv#z|!zI_sZqza@B+ zyu9st5-h+`H7QUKx9}3w@oU@EO}&cEzG?fu!!bLO->%zkcg;i9^j`S~=WKMnDi1f= P00000NkvXXu0mjft=yBf literal 0 HcmV?d00001 diff --git a/frontend/src/assets/react.svg b/frontend/src/assets/react.svg new file mode 100644 index 0000000..6c87de9 --- /dev/null +++ b/frontend/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/assets/vite.svg b/frontend/src/assets/vite.svg new file mode 100644 index 0000000..5101b67 --- /dev/null +++ b/frontend/src/assets/vite.svg @@ -0,0 +1 @@ +Vite diff --git a/frontend/src/components/ConfirmDialog.jsx b/frontend/src/components/ConfirmDialog.jsx new file mode 100644 index 0000000..c28ddbb --- /dev/null +++ b/frontend/src/components/ConfirmDialog.jsx @@ -0,0 +1,14 @@ +import Modal from './Modal'; + +export default function ConfirmDialog({ title, message, onConfirm, onCancel, confirmText, danger }) { + return ( + + + + + }> +

{message || 'آیا از انجام این عملیات اطمینان دارید؟'}

+
+ ); +} diff --git a/frontend/src/components/EmptyState.jsx b/frontend/src/components/EmptyState.jsx new file mode 100644 index 0000000..bfdc11f --- /dev/null +++ b/frontend/src/components/EmptyState.jsx @@ -0,0 +1,12 @@ +import { Inbox } from 'lucide-react'; + +export default function EmptyState({ icon: Icon, title, description, action }) { + return ( +
+
{Icon ? : }
+
{title || 'موردی یافت نشد'}
+ {description &&
{description}
} + {action &&
{action}
} +
+ ); +} diff --git a/frontend/src/components/FormSelect.jsx b/frontend/src/components/FormSelect.jsx new file mode 100644 index 0000000..2d2296a --- /dev/null +++ b/frontend/src/components/FormSelect.jsx @@ -0,0 +1,11 @@ +import { forwardRef } from 'react'; + +const FormSelect = forwardRef(function FormSelect({ className = '', children, ...props }, ref) { + return ( + + ); +}); + +export default FormSelect; diff --git a/frontend/src/components/Header.jsx b/frontend/src/components/Header.jsx new file mode 100644 index 0000000..9621dfb --- /dev/null +++ b/frontend/src/components/Header.jsx @@ -0,0 +1,142 @@ +import { useEffect, useState } from 'react'; +import { Link, useNavigate } from 'react-router-dom'; +import { useAuth } from '../context/AuthContext'; +import api from '../services/api'; +import { Search, Bell, CheckCheck } from 'lucide-react'; +import ThemeModeToggle from './ThemeModeToggle'; + +export default function Header({ title }) { + const { user, logout } = useAuth(); + const navigate = useNavigate(); + const [showMenu, setShowMenu] = useState(false); + const [searchQuery, setSearchQuery] = useState(''); + const [searchResults, setSearchResults] = useState([]); + const [searching, setSearching] = useState(false); + const [showNotifications, setShowNotifications] = useState(false); + const [notifications, setNotifications] = useState([]); + const [unreadCount, setUnreadCount] = useState(0); + + const fetchNotifications = async () => { + try { + const { data } = await api.get('/notifications', { params: { per_page: 8 } }); + setNotifications(data.data || []); + setUnreadCount(data.meta?.unread_count ?? (data.data || []).filter((item) => !item.read_at).length); + } catch {} + }; + + useEffect(() => { + fetchNotifications(); + const timer = setInterval(fetchNotifications, 60000); + return () => clearInterval(timer); + }, []); + + const handleSearch = async (e) => { + const q = e.target.value; + setSearchQuery(q); + if (q.length < 2) { setSearchResults([]); return; } + setSearching(true); + try { + const res = await api.get(`/search?q=${q}`); + setSearchResults(res.data.data || []); + } catch {} finally { setSearching(false); } + }; + + const notificationUrl = (notification) => notification.data?.url || (notification.type?.includes('meeting') ? '/meetings' : notification.type?.includes('task') || notification.type === 'mention' ? '/kanban' : '/notifications'); + + const markNotificationRead = async (notification) => { + if (!notification.read_at) { + try { + await api.post(`/notifications/${notification.id}/read`); + } catch {} + } + setShowNotifications(false); + fetchNotifications(); + navigate(notificationUrl(notification)); + }; + + const markAllNotificationsRead = async () => { + try { + await api.post('/notifications/read-all'); + fetchNotifications(); + } catch {} + }; + + const handleLogout = async () => { + await logout(); + navigate('/login'); + }; + + return ( +
+

{title}

+
+ + + {searchResults.length > 0 && ( +
+ {searchResults.map((item, i) => ( + + {item.title || item.name} + + ))} +
+ )} +
+
+ +
+ + {showNotifications && ( +
+
+ اعلان‌ها + {unreadCount > 0 && } +
+ {notifications.length === 0 ? ( +
اعلان جدیدی ندارید
+ ) : notifications.map((notification) => ( + + ))} + setShowNotifications(false)}>مشاهده همه اعلان‌ها +
+ )} +
+
+
setShowMenu(!showMenu)} style={{ display: 'flex', alignItems: 'center', gap: '0.5rem', cursor: 'pointer' }}> + {user?.avatar_url ? {user?.name :
{user?.name?.[0] || '?'}
} + {user?.name} +
+ {showMenu && ( +
+ setShowMenu(false)}> + پروفایل کاربری + + setShowMenu(false)}> + تنظیمات + + +
+ )} +
+
+
+ ); +} diff --git a/frontend/src/components/LoadingSkeleton.jsx b/frontend/src/components/LoadingSkeleton.jsx new file mode 100644 index 0000000..67e28ff --- /dev/null +++ b/frontend/src/components/LoadingSkeleton.jsx @@ -0,0 +1,36 @@ +export function CardSkeleton() { + return ( +
+
+
+
+
+ ); +} + +export function TableSkeleton({ rows = 5, cols = 4 }) { + return ( +
+ {Array.from({ length: rows }).map((_, i) => ( +
+ {Array.from({ length: cols }).map((_, j) => ( +
+ ))} +
+ ))} +
+ ); +} + +export function KPISkeleton() { + return ( +
+ {Array.from({ length: 4 }).map((_, i) => ( +
+
+
+
+ ))} +
+ ); +} diff --git a/frontend/src/components/Modal.jsx b/frontend/src/components/Modal.jsx new file mode 100644 index 0000000..a794263 --- /dev/null +++ b/frontend/src/components/Modal.jsx @@ -0,0 +1,22 @@ +import { useEffect } from 'react'; + +export default function Modal({ title, children, onClose, footer, size }) { + useEffect(() => { + const handleEscape = (e) => { if (e.key === 'Escape') onClose(); }; + document.addEventListener('keydown', handleEscape); + return () => document.removeEventListener('keydown', handleEscape); + }, [onClose]); + + return ( +
{ if (e.target === e.currentTarget) onClose(); }}> +
+
+

{title}

+ +
+
{children}
+ {footer &&
{footer}
} +
+
+ ); +} diff --git a/frontend/src/components/PersianDateInput.jsx b/frontend/src/components/PersianDateInput.jsx new file mode 100644 index 0000000..90f49f2 --- /dev/null +++ b/frontend/src/components/PersianDateInput.jsx @@ -0,0 +1,116 @@ +import { useEffect, useMemo, useRef, useState } from 'react'; +import { CalendarDays, ChevronLeft, ChevronRight, X } from 'lucide-react'; +import { + getJalaliWeekday, + isoToJalali, + isoToJalaliParts, + jalaliMonthLength, + jalaliToIso, + todayJalaliParts, +} from '../utils/date'; + +const monthNames = [ + 'فروردین', + 'اردیبهشت', + 'خرداد', + 'تیر', + 'مرداد', + 'شهریور', + 'مهر', + 'آبان', + 'آذر', + 'دی', + 'بهمن', + 'اسفند', +]; +const weekDays = ['ش', 'ی', 'د', 'س', 'چ', 'پ', 'ج']; + +export default function PersianDateInput({ value, onChange, className = '', placeholder = 'انتخاب تاریخ', ...props }) { + const today = todayJalaliParts(); + const selected = isoToJalaliParts(value); + const [open, setOpen] = useState(false); + const [view, setView] = useState(selected || today); + const wrapRef = useRef(null); + + useEffect(() => { + if (selected) setView(selected); + }, [value]); + + useEffect(() => { + const handleClickOutside = (event) => { + if (wrapRef.current && !wrapRef.current.contains(event.target)) setOpen(false); + }; + document.addEventListener('mousedown', handleClickOutside); + return () => document.removeEventListener('mousedown', handleClickOutside); + }, []); + + const days = useMemo(() => { + const firstWeekday = getJalaliWeekday(view.jy, view.jm, 1); + const length = jalaliMonthLength(view.jy, view.jm); + return [ + ...Array.from({ length: firstWeekday }, () => null), + ...Array.from({ length }, (_, index) => index + 1), + ]; + }, [view]); + + const moveMonth = (offset) => { + setView((current) => { + let jm = current.jm + offset; + let jy = current.jy; + if (jm < 1) { jm = 12; jy -= 1; } + if (jm > 12) { jm = 1; jy += 1; } + return { jy, jm, jd: 1 }; + }); + }; + + const pickDay = (day) => { + const iso = jalaliToIso(view.jy, view.jm, day); + onChange(iso); + setOpen(false); + }; + + const clearDate = (event) => { + event.stopPropagation(); + onChange(''); + setOpen(false); + }; + + const displayValue = isoToJalali(value); + + return ( +
+ + {open && ( +
+
+ + {monthNames[view.jm - 1]} {view.jy} + +
+
+ {weekDays.map((day) => {day})} +
+
+ {days.map((day, index) => { + const isSelected = selected && day === selected.jd && view.jm === selected.jm && view.jy === selected.jy; + const isToday = today && day === today.jd && view.jm === today.jm && view.jy === today.jy; + return day ? ( + + ) : ; + })} +
+
+ + +
+
+ )} +
+ ); +} diff --git a/frontend/src/components/PriorityBadge.jsx b/frontend/src/components/PriorityBadge.jsx new file mode 100644 index 0000000..3f5d9ca --- /dev/null +++ b/frontend/src/components/PriorityBadge.jsx @@ -0,0 +1,17 @@ +const priorityConfig = { + 'low': { color: 'badge-gray', label: 'کم' }, + 'medium': { color: 'badge-info', label: 'متوسط' }, + 'high': { color: 'badge-warning', label: 'زیاد' }, + 'urgent': { color: 'badge-danger', label: 'فوری' }, + 'critical': { color: 'badge-danger', label: 'بحرانی' }, + 'کم': { color: 'badge-gray', label: 'کم' }, + 'متوسط': { color: 'badge-info', label: 'متوسط' }, + 'زیاد': { color: 'badge-warning', label: 'زیاد' }, + 'فوری': { color: 'badge-danger', label: 'فوری' }, + 'بحرانی': { color: 'badge-danger', label: 'بحرانی' }, +}; + +export default function PriorityBadge({ priority }) { + const config = priorityConfig[priority] || { color: 'badge-gray', label: priority }; + return {config.label}; +} diff --git a/frontend/src/components/Sidebar.jsx b/frontend/src/components/Sidebar.jsx new file mode 100644 index 0000000..730a956 --- /dev/null +++ b/frontend/src/components/Sidebar.jsx @@ -0,0 +1,94 @@ +import { NavLink } from 'react-router-dom'; +import { useAuth } from '../context/AuthContext'; +import { LayoutDashboard, FolderKanban, CheckSquare, Kanban, Inbox, Timer, Users, Calendar, Paperclip, TrendingUp, Bell, Building2, Shield, Settings, PanelRightClose, PanelRightOpen } from 'lucide-react'; + +const iconSize = 18; + +const menuItems = [ + { path: '/', label: 'داشبورد', icon: LayoutDashboard }, + { path: '/projects', label: 'پروژه‌ها', icon: FolderKanban }, + { path: '/tasks', label: 'تسک‌ها', icon: CheckSquare }, + { path: '/kanban', label: 'برد کاری', icon: Kanban }, + { path: '/backlog', label: 'بک‌لاگ', icon: Inbox }, + { path: '/sprints', label: 'اسپرینت‌ها', icon: Timer }, + { path: '/team', label: 'اعضای تیم', icon: Users }, + { path: '/meetings', label: 'جلسات', icon: Calendar }, + { path: '/files', label: 'فایل‌ها', icon: Paperclip }, + { path: '/reports', label: 'گزارش‌ها', icon: TrendingUp }, + { path: '/notifications', label: 'اعلان‌ها', icon: Bell }, + { path: '/organization', label: 'ساختار سازمانی', icon: Building2 }, + { path: '/roles', label: 'نقش‌ها و دسترسی‌ها', icon: Shield }, + { path: '/settings', label: 'تنظیمات', icon: Settings }, +]; + +export default function Sidebar({ collapsed, onToggle }) { + const { user } = useAuth(); + return ( + + ); +} diff --git a/frontend/src/components/StatusBadge.jsx b/frontend/src/components/StatusBadge.jsx new file mode 100644 index 0000000..2cdfa2c --- /dev/null +++ b/frontend/src/components/StatusBadge.jsx @@ -0,0 +1,56 @@ +const statusColors = { + 'planning': 'badge-warning', + 'در حال انجام': 'badge-primary', + 'in_progress': 'badge-primary', + 'waiting': 'badge-info', + 'در انتظار': 'badge-info', + 'suspended': 'badge-gray', + 'stopped': 'badge-gray', + 'متوقف‌شده': 'badge-gray', + 'completed': 'badge-success', + 'done': 'badge-success', + 'تکمیل‌شده': 'badge-success', + 'انجام‌شده': 'badge-success', + 'cancelled': 'badge-danger', + 'لغوشده': 'badge-danger', + 'todo': 'badge-gray', + 'برای انجام': 'badge-gray', + 'review': 'badge-warning', + 'نیازمند بررسی': 'badge-warning', + 'active': 'badge-success', + 'فعال': 'badge-success', + 'new': 'badge-info', + 'جدید': 'badge-info', + 'ready': 'badge-primary', + 'آماده اجرا': 'badge-primary', + 'rejected': 'badge-danger', + 'رد شده': 'badge-danger', + 'reviewed': 'badge-warning', + 'بررسی‌شده': 'badge-warning', + 'بسته‌شده': 'badge-gray', + 'closed': 'badge-gray', +}; + +const statusLabels = { + 'planning': 'برنامه‌ریزی', + 'in_progress': 'در حال انجام', + 'waiting': 'در انتظار', + 'suspended': 'متوقف‌شده', + 'completed': 'تکمیل‌شده', + 'cancelled': 'لغوشده', + 'todo': 'برای انجام', + 'done': 'انجام‌شده', + 'review': 'نیازمند بررسی', + 'active': 'فعال', + 'new': 'جدید', + 'ready': 'آماده اجرا', + 'rejected': 'رد شده', + 'reviewed': 'بررسی‌شده', + 'closed': 'بسته‌شده', +}; + +export default function StatusBadge({ status }) { + const label = statusLabels[status] || status; + const colorClass = statusColors[status] || 'badge-gray'; + return {label}; +} diff --git a/frontend/src/components/ThemeAccentPicker.jsx b/frontend/src/components/ThemeAccentPicker.jsx new file mode 100644 index 0000000..b3e952b --- /dev/null +++ b/frontend/src/components/ThemeAccentPicker.jsx @@ -0,0 +1,35 @@ +import { useEffect, useState } from 'react'; +import { applyThemeAccent, getThemeAccent, themeAccents } from '../utils/themeAccent'; + +export default function ThemeAccentPicker({ compact = false, label = 'رنگ‌بندی' }) { + const [accent, setAccent] = useState(getThemeAccent); + + useEffect(() => { + const syncAccent = (event) => setAccent(event.detail?.accent || getThemeAccent()); + window.addEventListener('theme-accent-change', syncAccent); + return () => window.removeEventListener('theme-accent-change', syncAccent); + }, []); + + const changeAccent = (key) => { + setAccent(applyThemeAccent(key)); + }; + + return ( +
+ {!compact && {label}} +
+ {themeAccents.map((item) => ( +
+
+ ); +} diff --git a/frontend/src/components/ThemeModeToggle.jsx b/frontend/src/components/ThemeModeToggle.jsx new file mode 100644 index 0000000..9869c03 --- /dev/null +++ b/frontend/src/components/ThemeModeToggle.jsx @@ -0,0 +1,27 @@ +import { useEffect, useState } from 'react'; +import { Moon, Sun } from 'lucide-react'; +import { applyThemeMode, getThemeMode, resolvedThemeMode } from '../utils/themeMode'; + +export default function ThemeModeToggle({ compact = false }) { + const [theme, setTheme] = useState(getThemeMode); + + useEffect(() => { + applyThemeMode(theme); + }, [theme]); + + const currentResolvedTheme = resolvedThemeMode(theme); + const nextTheme = currentResolvedTheme === 'dark' ? 'light' : 'dark'; + + return ( + + ); +} diff --git a/frontend/src/context/AuthContext.jsx b/frontend/src/context/AuthContext.jsx new file mode 100644 index 0000000..a01d34a --- /dev/null +++ b/frontend/src/context/AuthContext.jsx @@ -0,0 +1,89 @@ +import { createContext, useContext, useState, useEffect } from 'react'; +import api from '../services/api'; + +const AuthContext = createContext(null); +const USER_STORAGE_KEY = 'user'; + +export function AuthProvider({ children }) { + const [user, setUser] = useState(null); + const [loading, setLoading] = useState(true); + + useEffect(() => { + const token = localStorage.getItem('token'); + const cachedUser = localStorage.getItem(USER_STORAGE_KEY); + + if (token && cachedUser) { + try { setUser(JSON.parse(cachedUser)); } catch { localStorage.removeItem(USER_STORAGE_KEY); } + } + + if (token) refreshUser(); + else setLoading(false); + }, []); + + useEffect(() => { + const syncUser = (event) => { + if (event.key !== USER_STORAGE_KEY) return; + + if (!event.newValue) { + setUser(null); + return; + } + + try { setUser(JSON.parse(event.newValue)); } catch {} + }; + + window.addEventListener('storage', syncUser); + return () => window.removeEventListener('storage', syncUser); + }, []); + + const persistUser = (nextUser) => { + setUser(nextUser); + + if (nextUser) { + localStorage.setItem(USER_STORAGE_KEY, JSON.stringify(nextUser)); + window.dispatchEvent(new CustomEvent('auth-user-change', { detail: { user: nextUser } })); + } else { + localStorage.removeItem(USER_STORAGE_KEY); + window.dispatchEvent(new CustomEvent('auth-user-change', { detail: { user: null } })); + } + }; + + const refreshUser = async () => { + try { + const { data } = await api.get('/user'); + persistUser(data.data); + return data.data; + } catch { + localStorage.removeItem('token'); + persistUser(null); + } + finally { setLoading(false); } + }; + + const login = async (identifier, password) => { + const { data } = await api.post('/login', { identifier, password }); + localStorage.setItem('token', data.data.token); + persistUser(data.data.user); + return data.data; + }; + + const logout = async () => { + try { await api.post('/logout'); } catch {} + localStorage.removeItem('token'); + persistUser(null); + }; + + const updateProfile = async (profileData) => { + const { data } = await api.put('/user/profile', profileData); + persistUser(data.data); + return data; + }; + + return ( + + {children} + + ); +} + +export const useAuth = () => useContext(AuthContext); diff --git a/frontend/src/index.css b/frontend/src/index.css new file mode 100644 index 0000000..2c84af0 --- /dev/null +++ b/frontend/src/index.css @@ -0,0 +1,111 @@ +:root { + --text: #6b6375; + --text-h: #08060d; + --bg: #fff; + --border: #e5e4e7; + --code-bg: #f4f3ec; + --accent: #aa3bff; + --accent-bg: rgba(170, 59, 255, 0.1); + --accent-border: rgba(170, 59, 255, 0.5); + --social-bg: rgba(244, 243, 236, 0.5); + --shadow: + rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px; + + --sans: system-ui, 'Segoe UI', Roboto, sans-serif; + --heading: system-ui, 'Segoe UI', Roboto, sans-serif; + --mono: ui-monospace, Consolas, monospace; + + font: 18px/145% var(--sans); + letter-spacing: 0.18px; + color-scheme: light dark; + color: var(--text); + background: var(--bg); + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + @media (max-width: 1024px) { + font-size: 16px; + } +} + +@media (prefers-color-scheme: dark) { + :root { + --text: #9ca3af; + --text-h: #f3f4f6; + --bg: #16171d; + --border: #2e303a; + --code-bg: #1f2028; + --accent: #c084fc; + --accent-bg: rgba(192, 132, 252, 0.15); + --accent-border: rgba(192, 132, 252, 0.5); + --social-bg: rgba(47, 48, 58, 0.5); + --shadow: + rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px; + } + + #social .button-icon { + filter: invert(1) brightness(2); + } +} + +body { + margin: 0; +} + +#root { + width: 1126px; + max-width: 100%; + margin: 0 auto; + text-align: center; + border-inline: 1px solid var(--border); + min-height: 100svh; + display: flex; + flex-direction: column; + box-sizing: border-box; +} + +h1, +h2 { + font-family: var(--heading); + font-weight: 500; + color: var(--text-h); +} + +h1 { + font-size: 56px; + letter-spacing: -1.68px; + margin: 32px 0; + @media (max-width: 1024px) { + font-size: 36px; + margin: 20px 0; + } +} +h2 { + font-size: 24px; + line-height: 118%; + letter-spacing: -0.24px; + margin: 0 0 8px; + @media (max-width: 1024px) { + font-size: 20px; + } +} +p { + margin: 0; +} + +code, +.counter { + font-family: var(--mono); + display: inline-flex; + border-radius: 4px; + color: var(--text-h); +} + +code { + font-size: 15px; + line-height: 135%; + padding: 4px 8px; + background: var(--code-bg); +} diff --git a/frontend/src/main.jsx b/frontend/src/main.jsx new file mode 100644 index 0000000..125b3a1 --- /dev/null +++ b/frontend/src/main.jsx @@ -0,0 +1,22 @@ +import { StrictMode } from 'react'; +import { createRoot } from 'react-dom/client'; +import App from './App.jsx'; +import './styles/global.css'; +import { getThemeAccent } from './utils/themeAccent.js'; +import { applyThemeMode, getThemeMode, watchAutoThemeMode } from './utils/themeMode.js'; + +applyThemeMode(getThemeMode()); +document.documentElement.dataset.accent = getThemeAccent(); +watchAutoThemeMode(); + +createRoot(document.getElementById('root')).render( + + + , +); + +if (import.meta.env.PROD && 'serviceWorker' in navigator) { + window.addEventListener('load', () => { + navigator.serviceWorker.register('/pwa-sw.js').catch(() => {}); + }); +} diff --git a/frontend/src/pages/Backlog.jsx b/frontend/src/pages/Backlog.jsx new file mode 100644 index 0000000..f23ed2d --- /dev/null +++ b/frontend/src/pages/Backlog.jsx @@ -0,0 +1,182 @@ +import { useState, useEffect } from 'react'; +import api from '../services/api'; +import StatusBadge from '../components/StatusBadge'; +import PriorityBadge from '../components/PriorityBadge'; +import Modal from '../components/Modal'; +import ConfirmDialog from '../components/ConfirmDialog'; +import EmptyState from '../components/EmptyState'; +import { TableSkeleton } from '../components/LoadingSkeleton'; +import toast from 'react-hot-toast'; +import { Inbox, Edit3, Trash2, ArrowLeft } from 'lucide-react'; + +export default function Backlog() { + const [items, setItems] = useState([]); + const [loading, setLoading] = useState(true); + const [filters, setFilters] = useState({ type: '', status: '', priority: '', project_id: '' }); + const [projects, setProjects] = useState([]); + const [showModal, setShowModal] = useState(false); + const [editing, setEditing] = useState(null); + const [deleting, setDeleting] = useState(null); + const [saving, setSaving] = useState(false); + const [form, setForm] = useState({ title: '', description: '', type: 'feature', project_id: '', priority: 'medium', status: 'new', estimated_effort: '' }); + + const fetchItems = () => { + setLoading(true); + const params = {}; + Object.keys(filters).forEach(k => { if (filters[k]) params[k] = filters[k]; }); + api.get('/backlog-items', { params }).then(({ data }) => setItems(data.data || [])).catch(() => toast.error('خطا')).finally(() => setLoading(false)); + }; + + useEffect(() => { fetchItems(); }, [filters]); + useEffect(() => { + api.get('/projects', { params: { per_page: 100 } }).then(({ data }) => setProjects(data.data || [])).catch(() => {}); + }, []); + + const openCreate = () => { + setEditing(null); + setForm({ title: '', description: '', type: 'feature', project_id: '', priority: 'medium', status: 'new', estimated_effort: '' }); + setShowModal(true); + }; + + const openEdit = (item) => { + setEditing(item); + setForm({ + title: item.title, description: item.description || '', type: item.type, project_id: item.project_id || '', + priority: item.priority, status: item.status, estimated_effort: item.estimated_effort || '', + }); + setShowModal(true); + }; + + const handleSave = async (e) => { + e.preventDefault(); + if (!form.title) { toast.error('عنوان الزامی است'); return; } + setSaving(true); + try { + if (editing) { await api.put(`/backlog-items/${editing.id}`, form); toast.success('به‌روزرسانی شد'); } + else { await api.post('/backlog-items', form); toast.success('ایجاد شد'); } + setShowModal(false); fetchItems(); + } catch (err) { toast.error(err.response?.data?.message || 'خطا'); } finally { setSaving(false); } + }; + + const handleDelete = async () => { + try { await api.delete(`/backlog-items/${deleting.id}`); toast.success('حذف شد'); setDeleting(null); fetchItems(); } + catch { toast.error('خطا'); } + }; + + const convertToTask = async (item) => { + try { + await api.post(`/backlog-items/${item.id}/convert-to-task`); + toast.success('به تسک تبدیل شد'); + fetchItems(); + } catch { toast.error('خطا'); } + }; + + const typeBadge = (type) => { + const colors = { idea: 'badge-info', feature: 'badge-primary', bug: 'badge-danger', improvement: 'badge-warning', task: 'badge-success' }; + return {type}; + }; + + return ( +
+
+ +
+
+ + + +
+ + {loading ? : items.length === 0 ? ( + ایجاد آیتم جدید} /> + ) : ( +
+
+ + + + {items.map(item => ( + + + + + + + + + + ))} + +
عنواننوعاولویتوضعیتپروژهتلاشعملیات
{item.title}{typeBadge(item.type)}{item.project?.title || '—'}{item.estimated_effort || '—'} +
+ + + +
+
+
+
+ )} + + {showModal && ( + setShowModal(false)} size="xl" footer={ + <> + }> +
+
+
setForm({...form, title: e.target.value})} />
+