47 Commits
Author SHA1 Message Date
F4ilji d6c0f48d48 feat(analytics): add site analytics with grouped navigation sections
- Add Analytics container: models, tasks, jobs, controllers, routes, services
- Add analytics config with section groups (structure, institute, content, services)
- Add database tables: analytics_sessions, analytics_hits, analytics_daily_stats
- Add frontend: Analytics page, section detail, chart, overview, navigation components
- Add consent banner and JS tracking service (sendBeacon + Inertia listener)
- Add permission sync for view_analytics, view_any_analytic
- Fix trailing slash URL matching in GetNavigationSectionsTask
- Fix event propagation on expand arrows in navigation sections
- Fix RecordVisitJob to not depend on dropped analytics_geo_cache table
- Replace plain text views/visitors with badge-style icons
- Group navigation sections by category with separate blocks
- Add config-driven non-CMS sections (faculties, divisions, DPO, journals)
- Remove Events, TV, Sveden from analytics sections
2026-09-18 22:18:04 +05:00
F4ilji 7748b05547 feat(vikon): move API token from .env to integration_credentials
- Rename VICON_TOKEN → VIKON_API_TOKEN in .env and config
- Add ViconApiToken service reading from integration_credentials table
- Update 3 Vicon services to use ViconApiToken instead of config()
- Config/env kept as fallback for clean migration
2026-07-10 16:43:09 +05:00
F4ilji 65f4220932 fix(vikon): store version in file instead of cache to prevent revert after TTL expiry 2026-07-06 13:28:22 +05:00
F4ilji dfe8de0680 feat(logging): add 6 domain-specific daily channels to config 2026-07-05 23:11:27 +05:00
F4ilji a32572f5e8 fix(vikon): remove env override for version, use hardcoded default 2026-07-05 17:44:45 +05:00
F4ilji eb142b2513 refactor(vikon): use Redis cache for version instead of file 2026-07-05 15:11:17 +05:00
F4ilji ad8a4d861b fix(vikon): read version from file and update after core update 2026-07-05 15:06:14 +05:00
F4ilji 0a5f99e6ae refactor(vikon): remove hardcoded module IDs and use config everywhere 2026-07-05 11:40:02 +05:00
F4ilji 8cf195efb0 refactor(vikon): fetch parts from VIKON API instead of hardcoded config 2026-07-05 11:32:54 +05:00
F4ilji 514123a19f feat(vikon): add parts config for partial updates 2026-07-05 02:42:51 +05:00
F4ilji 3dc29d44d8 fix(vikon): DNS bypass, OAuth callback, ABITUR init, token cache, ZIP security
- Add CURLOPT_RESOLVE DNS bypass for db-nica.ru / file.db-nica.ru
- Add OAuth callback route with CSRF state validation
- Add /authorize endpoint to generate OAuth URL with state
- Add ABITUR special case: init empty module core without ZIP download
- Add token validation caching (150s) to reduce API calls
- Block PHP/PHTML/PHAR files inside ZIP before extraction
- Add VikonTokenRefresh middleware for auto token refresh
- Add vikon.refresh middleware alias to Kernel
2026-07-04 17:44:50 +05:00
F4ilji f4f8bc8e77 feat(vikon): rewrite VikonIntegration from scratch — OAuth + core update
- HttpTask: Laravel Http facade with SSL enabled, retry, timeout
- ValidateTokenTask: token check via auth.db-nica.ru
- RefreshTokenTask: token refresh via db-nica.ru
- FilesystemTask: path traversal protection, blocked extensions (PHP/ASP/etc)
- AuthenticateAction: OAuth2 code→token exchange
- CheckAccessAction: token validation + filesystem writability check
- CheckVersionAction: version comparison against remote API
- UpdateCoreAction: ZIP download, Zip Slip protection, atomic sync with rollback
- VikonController: thin controller, 7 endpoints with Session-based token storage
- Routes: access-check, dashboard.auth, throttle:30,1 middleware
- Vue 3 Composition API frontend with progress bar
- Config: all secrets in .env via config/vikon.php
- vikon_core kept as fallback (not deleted)
2026-07-04 12:53:28 +05:00
F4ilji 82df1210c2 feat(vikon): add config/vikon.php with module definitions 2026-07-04 12:41:22 +05:00
F4ilji 47aac647ac feat(vikon): remove broken VikonIntegration container - starting fresh 2026-07-04 12:40:41 +05:00
F4ilji 8bc5c367d6 revert: remove deploy UI, controller, actions, tasks, and routes
- Remove Deploy/Index.vue, DeployController, DeploySiteAction, DeployTask
- Remove deploy routes from web.php
- Remove deploy menu item from menuConfig
- Remove deploy button and methods from Main.vue
- Remove deploy logging channel from logging.php
- Keep _deploy/ folder for future CI/CD setup
2026-07-02 12:00:48 +05:00
F4ilji 09bba25993 feat: add dedicated deploy logging to storage/logs/deploy.log
- Add 'deploy' channel in logging.php
- Instrument DeployTask with phpLog() for all state transitions
- Instrument DeploySiteAction with channel('deploy') for triggers, errors, clears
- Logs written to storage/logs/deploy.log (separate from laravel.log)
2026-07-02 00:57:57 +05:00
F4ilji 169a2f5654 changes 2026-04-08 14:14:38 +05:00
F4iljiandQwen-Coder cc20906062 fix(IMAP): исправить загрузку вложений — setFetchBody(true) необходим для структуры
Проблема: setFetchBody(false) не загружал структуру письма,
поэтому getAttachments() возвращал пустой список.

Исправления:
- FetchUnreadEmailsTask: setFetchBody(true) для загрузки структуры (вложения)
- FetchUnreadEmailsTask: конвертация Attribute в строку для subject
- config/imap.php: убраны fetch_body/fetch_flags (контроль на уровне Query)
- Обновлена документация

Fix: "В письме не найдено вложений" ошибка при обработке email

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-06 22:17:21 +05:00
F4iljiandQwen-Coder c115a5c7a7 fix(IMAP): оптимизация обработки email для предотвращения memory exhaustion
Корневая проблема: библиотека webklex/php-imap загружала все тела писем
по умолчанию, что приводило к исчерпанию 256MB памяти при 50+ письмах.

Решение (3 уровня):

Уровень 1 - Конфигурация:
- config/imap.php: добавлены fetch_body=false, fetch_flags=false, fetch_limit=20
- php.ini: увеличен memory_limit с 256M до 1G, добавлены OPcache настройки

Уровень 2 - Оптимизация кода:
- FetchUnreadEmailsTask: setFetchBody(false), лимиты, MemoryAwareTrait
- FetchEmailNewsAction: batch-обработка (10 писем), gc_collect_cycles()
- DownloadAttachmentsTask: lazy load вложений, extension whitelist (security)
- ConnectToImapTask: MemoryAwareTrait для мониторинга

Уровень 3 - Инфраструктура:
- ProcessEmailNewsJob: queue job для асинхронной обработки (3 попытки, 300s timeout)
- FetchEmailNewsCommand: поддержка --async режима
- MemoryAwareTrait: reusable трейт для мониторинга памяти

Security fixes:
- Extension whitelist для предотвращения path traversal
- Убраны реальные email из config/imap.php
- Добавлена проверка на null message объект

Docs:
- README_EMAIL_OPTIMIZATION.md: полная документация по оптимизации

Fixes: Allowed memory size of 268435456 bytes exhausted

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-06 22:08:03 +05:00
F4ilji 1256adba98 changes 2026-03-23 10:50:31 +05:00
F4ilji a3948c872e Changes 2026-03-20 21:47:02 +05:00
F4ilji 1f61601e05 add cors rules 2026-01-09 19:07:51 +05:00
F4ilji 2d101dcdda feat: Refactor MainController and related tasks to follow Porto architecture
- Moved logic from MainController to dedicated action and task classes.
- Introduced GetMainPageDataAction, GetEducationsDataTask, GetRecentPostsTask, GetUpcomingEventsTask, and GetPageDataTask for better separation of concerns.
- Updated routes to use the new MainController from the Main container.
- Deprecated the old MainController with a clear message for future removal.
- Updated caching mechanisms to use the new task classes.
- Adjusted environment variable access to use config() instead of env() for better practice.
- Added new MainPageResource for structured data response.
- Updated .gitignore to exclude QWEN.md.
- Added Jenkins service to docker-compose for CI/CD integration.
2025-12-16 12:20:01 +05:00
F4ilji 8bb7886ef7 Enhance TinyEditor configuration by refining 'test' profile settings and improving paste handling options 2025-12-02 14:23:00 +05:00
F4ilji 72af09d93d Add Yandex Metrika integration for tracking; update FindSliderBySlugTask to ensure active slides are filtered correctly based on time; enhance app.blade.php for conditional Yandex Metrika script inclusion based on environment. 2025-09-27 22:35:36 +05:00
F4ilji 335784231a Add Fruitcake CORS package and update CORS configuration to allow all methods, origins, and headers for improved API accessibility. 2025-09-06 00:17:51 +05:00
F4ilji 29daa1e3aa Update CORS configuration to allow all paths for enhanced API accessibility. 2025-09-05 23:59:40 +05:00
F4ilji 525c9edc65 Refactor VK service URLs to use 'vk.ru' instead of 'vk.com' for consistency; update CORS configuration to allow additional methods and origins, enhancing API security and flexibility. 2025-09-05 23:42:06 +05:00
F4ilji 8b213ee803 Update PHP version requirement to ^8.2 in composer files, refactor User model access control logic, clean up MainSectionResource, enhance EditMainSection to include related pages, modify AppServiceProvider to clear subsection cache, change fallback locale to 'en', and improve DesktopNavBar and BasicFooter components for better accessibility and content accuracy. 2025-09-01 13:48:24 +05:00
F4ilji c01016a154 Migrate backend to Porto architecture and fix minor bugs
- Fully transitioned the backend to the Porto architectural pattern
- Improved code organization and maintainability
- Fixed minor bugs and inconsistencies
2025-05-12 08:47:43 +05:00
F4ilji 453fb4cccc major change fixing bugs when running SSR in the project 2025-04-26 22:59:46 +05:00
F4ilji aea6304ac4 fixing bugs 2025-04-20 15:05:16 +05:00
F4ilji 21c4b7c528 added ForceHttpsServiceProvider, added fix in PageResourceList 2025-04-17 20:07:08 +05:00
F4ilji b1d3921ffd increase upload file size and small changes 2025-04-06 21:33:55 +05:00
F4ilji a3b964c1ca fix bugs and add log viewer package 2025-04-06 18:49:40 +05:00
F4ilji 49072e50c7 Rework frontend 2025-03-23 00:38:16 +05:00
f4ilji 3385dc5807 Changes 2025-01-30 00:31:40 +05:00
f4ilji bad611eb84 Changes 2025-01-15 15:31:37 +05:00
f4ilji 6b48c31afd Changes 2025-01-13 13:56:50 +05:00
f4ilji bbc9fda376 Changes 2024-11-25 14:23:49 +05:00
f4ilji 048f046dcf Changes 2024-11-22 18:14:48 +05:00
f4ilji c3d266a6f7 Changes 2024-11-22 17:45:11 +05:00
f4ilji 4bb3e70f1f Changes 2024-11-21 21:22:39 +05:00
f4ilji 4b693240e0 Changes 2024-11-05 15:08:08 +05:00
f4ilji 6d516d1750 Changes 2024-10-28 12:57:16 +05:00
f4ilji cebc584a14 Changes 2024-10-04 12:48:19 +05:00
f4ilji b686638a39 first commit 2024-09-19 16:06:49 +05:00