Commit Graph
47 Commits
Author SHA1 Message Date
Jeppe Bundgaard 00a8723347 Integrate Coolify API client and module for managing Coolify services, enhancing automation and deployment processes. 2026-05-19 13:17:07 +02:00
Jeppe Bundgaard f53b99ad94 Implement replication management endpoints and enhance application write freeze handling 2026-05-18 09:59:15 +02:00
Jeppe Bundgaard c1b66a81cc Add invoice_period_flag_ classes to manage invoice period flags with schema, services, and flag lifecycle methods
- Introduced `invoice_period_flag_schema_bootstrap` to initialize the schema for invoice period flags.
- Added `invoice_period_flag_service` to handle manual and automatic flag creation, updates, filtering, and context resolution.
- Implemented lifecycle methods such as `createManualFlag`, `updateAutomaticFlagStatus`, and `applyFlagsToPeriodTypes` for handling invoice period flags and their usage in processing periods.
- Included context-specific resolution methods for efficient flag management in invoicing workflows.
2026-05-11 21:34:57 +02:00
Jeppe Bundgaard 4c32eae49a Remove deprecated Edge Gateway Agent classes and related services 2026-04-22 19:08:44 +02:00
Jeppe Bundgaard ba23ad6e8f Add economic_transfer_executor and economic_transfer_queue classes for handling e-conomic invoice transfer logic, queue management, and processing. Include unit tests for Redis cache validation. 2026-04-08 11:20:08 +02:00
Jeppe Bundgaard 60f6cbee84 Enhance CORS handling with dynamic origin validation and credentials support in Nginx. Update Traefik to include additional allowed origins. 2026-03-18 14:15:28 +01:00
Jeppe Bundgaard 5cc311ae32 Add Redis-based permission caching for users and subusers
- Introduced Redis-backed caching for user and subuser permission evaluations in the `route_t` trait, reducing database queries.
- Enhanced `Redis` class with methods for permission caching: `cache_permission`, `get_permission`, and `clear_permission`.
- Added test coverage for the new caching logic in `PermissionRedisCacheTest.php`.
- Implemented Redis caching for authentication sessions with `cache_auth_session`, `get_auth_session`, and `clear_auth_session`.
- Improved CORS handling for preflight requests in `index.php`.
2026-02-24 15:00:22 +01:00
Jeppe Bundgaard 2534ffb1b9 Add Redis caching to autoloader for improved class and module loading performance
- Integrated Redis caching in the autoloading process to store and retrieve class and file paths dynamically.
- Added fallback mechanisms for Redis errors to ensure compatibility.
- Cached module directories and individual class paths with expiration to enhance performance and reduce filesystem scans.
2026-02-24 13:55:34 +01:00
Jeppe Bundgaard 3bf514ce3f Refactor autoloading logic for efficient class, interface, and module loading
- Replaced manual file inclusion with `spl_autoload_register` for dynamic loading of classes, interfaces, traits, and modules.
- Added support for autoloading across core folders (`classes`, `interfaces`, `traits`, etc.) and module directories.
- Introduced a fallback mechanism for module-specific class loading with suffix-based file matching.
- Improved maintainability and scalability by eliminating extensive manual requires.
2026-02-24 13:38:20 +01:00
Jeppe Bundgaard 1050f72aa6 Refactor route and trait loading logic; simplify 404 handling. 2026-02-24 12:56:56 +01:00
Jeppe Bundgaard f1c0ea2228 Remove language pack management and associated logic; add detailed logging for backups and cron processes. 2026-02-24 12:36:41 +01:00
Jeppe Bundgaard b291e959e0 Add WebAuthn integration, reCAPTCHA support, and new tests
- Integrate WebAuthn library for passkey authentication workflows, including assertion verification and improved error handling.
- Add support for reCAPTCHA token validation across multiple endpoints for enhanced security.
- Extend OpenAPI schema to document new fields and restructured payloads.
- Add unit tests for WebAuthn flows, permission initialization, and route validation to ensure robustness and accuracy.
2026-02-24 09:27:51 +01:00
Jeppe Bundgaard ce889053a6 Improve subuser session handling and 2FA logic
- Add fallback logic to resolve subuser sessions via the tokens table when cache is missing or expired, with re-caching for future use.
- Refactor 2FA flow to prioritize subuser over user objects for better clarity and ensure compatibility with TOTP logic.
- Add safeguards to avoid operations on nonexistent users or subusers in 2FA and authentication flows.
2026-02-23 18:57:20 +01:00
Jeppe Bundgaard c5840c0f3e Add self-serve module loading, enum test, and update email styles/text
- Add `SelfserveLaneServicesEnumTest` to validate `selfserve_lane_services` cases.
- Update `index.php` to load self-serve module interfaces, traits, classes, helpers, and configs.
- Center Truck Wash logo in email header and adjust styling.
- Localize password reset error message in `authRoute.php` with Danish text.
2026-02-18 15:35:41 +01:00
Jeppe Bundgaard 081d8ad284 Add Dockerfile and entrypoint optimizations, Composer auto-install, and dependency updates
- Use `__DIR__` for `vendor/autoload.php` in PHP autoload path.
- Add Composer dependency auto-installation at container startup with `docker-entrypoint.sh`.
- Extend Docker image to include `libssl-dev` and `ca-certificates` for TLS support.
- Enable dynamic installation of application dependencies during runtime via entrypoint.
- Update Composer dependencies, including AWS SDK, Guzzle, and OpenTelemetry libraries.
2026-02-13 22:21:46 +01:00
Jeppe Bundgaard aae244887f Extend CORS headers to include X-Customer-Number and add customer context in subuser grants. 2026-02-12 18:12:29 +01:00
Jeppe Bundgaard f2244f5d0d Initialize permission node containers and handle uninitialized properties in subuser_user_grant to ensure proper grant resolution logic. 2026-02-12 14:08:01 +01:00
Jeppe Bundgaard dcf4252218 Refactor /subusers/grants update logic and require explicit autoloading for subuser module
- Replace route method for updating grants (`PATCH` to `PUT`) and streamline grant updates by directly modifying object properties instead of using manual data arrays.
- Introduce parameter validation for consistency and permission checks for cross-customer grant management.
- Require autoloading for all subuser module components (interfaces, traits, helpers, classes, and permissions) to improve modularity and maintainability.
2026-02-12 13:17:10 +01:00
Jeppe Bundgaard 6b90fe8d8e Refactor /subusers/grants to use paginated response and update dependencies
- Replace manual grant data processing with `listObjectsWithPaginationIfSet` for cleaner pagination and mapping logic.
- Include `subusers_permission_node_key` helper in dependencies.
2026-02-11 17:50:43 +01:00
Jeppe Bundgaard e2521e222f Enhance dynamicimages module with refined asset management and image path configuration
- Update `dynamicimages_asset` constructor to prepend working directory to paths.
- Add helper methods (`getPath`, `getWidth`, `getHeight`) to `dynamicimages_asset`.
- Extend `dynamicimages_image_t` trait with debugging and path configuration utilities.
- Refactor asset path handling in `machine_1` with constants for image files.
- Load `dynamicimages` interfaces, traits, classes, helpers, and configurations in `index.php`.
2026-01-27 11:21:07 +01:00
Jeppe Bundgaard 6468bcb481 Add endpoint to send test progress alerts for department goals
- Implement `/goals/department/progress-alert/test` POST endpoint to send test progress alerts.
- Support email, SMS, and Slack as alert destinations with customizable parameters.
- Validate user permissions, goal existence, and alert configuration before dispatch.
- Extend alert rendering logic with destination-specific delivery methods.
2026-01-27 09:09:10 +01:00
Jeppe Bundgaard 9d34decbb6 Add missing helper files for progress alert customization in goals module
- Include `goals_criteria_progress_alert_destination`, `goals_criteria_progress_alert_progress_type`, `goals_criteria_progress_alert_style`, and `goals_criteria_progress_alert_weekday` helpers in `index.php`.
2026-01-27 09:00:32 +01:00
Jeppe Bundgaard edbd7f539c Add goals_criteria_progress_alert_frequency helper to goals module 2026-01-26 20:14:14 +01:00
Jeppe Bundgaard 9312f9003e Add JSON import/export functionality for goals module
- Implement `exportToJson` and `importFromJson` methods in `goals` for serialization and deserialization.
- Add `fromJson` method in `goals_criteria` to parse criteria from JSON input.
- Extend `exampleRoute` for debugging with sample JSON-based goal creation.
- Update `index.php` to autoload new `goals` module classes and dependencies.
2026-01-26 16:43:59 +01:00
Jeppe Bundgaard cc6639e61b Introduce self-serve module with lane management functionality
- Added `selfserve_lane` class to handle self-serve lane operations.
- Implemented commands (START, STOP, RESET) and states (IDLE, IN_WASH, FAULT, etc.) for lane lifecycle.
- Introduced traits for managing lane status, mode, state, caching, and port control.
- Added enums for cohesive type definitions (`selfserve_lane_command`, `selfserve_lane_status`, `selfserve_lane_state`, etc.).
- Configured `/modules/self-serve/lane/status` route to expose lane state and status via API.
- Linked self-serve configuration via `selfserve_c` and `selfserve_enabled_c` for module toggling.
- Integrated lane caching logic with Redis for performance improvements.
- Updated `index.php` to include the self-serve module.
2025-12-08 15:34:40 +01:00
Jeppe Bundgaard e82b4950b7 Integrate Shelly module with new routes, classes, helpers, and configurations
- Added `shelly` class to manage API operations, handle requests, and validate configurations.
- Introduced `shelly_i` interface and supporting helpers: `shelly_device_state`, `shelly_request_body_get_states`, and `shelly_response_body_get_states`.
- Created new routes for fetching and updating Shelly configurations (`/shelly/config`).
- Added Shelly module configurations: `enabled`, `secret_key`, and `server_url`.
- Implemented `shelly_c` for module setup and configuration handling.
- Integrated Shelly initialization in `index.php`.
2025-10-15 10:54:01 +02:00
Jeppe Bundgaard ca29ded6be Integrate Virkdata module with new routes, helpers, and configurations
- Added `virkdata` class to handle API operations for company information retrieval and config validation.
- Introduced `virkdata_i` interface and supporting helpers: `virkdata_request_parameters`, `virkdata_response`, and enums for formats, countries, and error codes.
- Implemented new routes: `/worker/debug`, `/worker/licenseplates`, `/cvr/lookup`, and `/economic/doesCustomerExist`.
- Added module `Virkdata` route for searching company data and fetching/updating configurations (`moduleVirkDataRoute`).
- Created `virkdata` module configurations: `enabled`, `secret_key`, and `monthly_limit`.
- Integrated virkdata initialization in `index.php`.
2025-10-12 12:50:57 +02:00
Jeppe Bundgaard 09fbbc11bb Add support for handling /files/ requests and temp file attachments in file_server.php
- Updated `file_server.php` to mark files with `temp_file_` in their name as attachments.
- Enhanced routing logic in `index.php` to load `file_server.php` for `/files/` requests.
2025-09-22 17:29:05 +02:00
Jeppe Bundgaard 33a26cffc5 Implement attachments module with CRUD operations and integration points
- Added `attachments` module for creating, reading, updating, and deleting attachments.
- Introduced new classes such as `attachments`, `attachment_store`, `attachment_content`, and `attachment_relation` to handle attachment operations and their relationships.
- Integrated `attachments` features into `db_object_t` for seamless object-attachment interactions.
- Added `attachments_i` interface for standardized attachments module operations.
- Created `attachmentsRoute` for defining endpoints related to attachments.
- Enabled module configuration through `attachments_enabled_c` for attachment management control.
2025-09-22 10:28:22 +02:00
Jeppe Bundgaard 81aa406fb6 Add License Plate Recognizer integration and vehicle product suggestion route
- Implemented `licensePlateRecognizer` module with configuration classes (`enabled`, `api_key`) and API handling.
- Introduced `moduleConfigRoute` endpoints for fetching and updating `licensePlateRecognizer` configurations.
- Added `vehicleProductSuggestionRoute` with logic to fetch product suggestions based on vehicle plates.
- Extended `moduleScannerRoute` with license plate recognition test and exception handling.
- Updated `index.php` to include `licensePlateRecognizer` class.
2025-09-01 10:11:37 +02:00
Jeppe Bundgaard a0fd41fba1 Add image upload support, file handling improvements, and OpenAI integration
- Introduced `uploadRoute` to handle image uploads with MIME type validation and size restrictions.
- Added `upload_store` class for managing file storage and generating presigned URLs for upload/download.
- Enhanced file server to differentiate between PDFs and uploaded files, supporting dynamic content delivery.
- Integrated OpenAI module for License Plate Recognition (LPR), including API configuration and schema validation.
- Updated core structure with new interfaces (`minio_uploads_i`, `openai_i`) and classes (`openai`, `upload_store`).
- Adjusted `index.php` and file routes to support dynamic MIME checks and direct link generation.
2025-08-18 16:50:30 +02:00
Jeppe Bundgaard 69ceafcce6 Add OCR Space module with configuration and image processing support
- Introduced `ocrSpace` module with classes: `ocr_space`, `ocrSpace_c`, and configuration objects for `enabled` and `api_key`.
- Added routes for fetching and updating OCR Space configuration.
- Created `image_processor` class and interface for handling and processing base64-encoded images.
- Integrated new traits and classes for image validation and processing.
- Updated `index.php` to include `ocr_space` and `image_processor`.
2025-08-06 10:27:39 +02:00
Jepp9350 9371883138 Expand Limble module with additional helper classes, task formatting logic, webhook handling, configuration endpoints, and extended API request support. 2025-06-12 15:15:26 +02:00
Jepp9350 458e2916a6 Add Entra module for handling Microsoft integration
This commit introduces the Entra module, enabling configuration management and handling callbacks for Microsoft's authorization. It includes new classes, routes, and configuration variables to support integration, ensuring flexibility and logging support for related operations.
2025-05-21 14:20:50 +02:00
Jepp9350 5550e2e57f Add xlvask module with configuration and API endpoints
Introduce the xlvask module, including classes for configuration variables (enabled, username, password) and main functionality. Integrated xlvask into the app by adding GET/POST API routes for managing its configuration.
2025-05-08 12:17:27 +02:00
Jepp9350 849f1cc53e Add GatewayAPI module with configuration, routing, and core logic
Introduced a new GatewayAPI module to handle SMS messaging integration. This includes interfaces, core classes for API interaction, configuration management, and routing for config retrieval and update. Added necessary initializations in `index.php` to integrate the module seamlessly.
2025-04-10 10:51:32 +02:00
Jepp9350 9b53ae4403 Add fxratesapi module for currency conversion functionality
Integrated a new fxratesapi module to handle currency conversions, including API configurations, rate conversion actions, and request logging. Added support for module settings such as enablement status, API key, and daily request limits. New routes, database interactions, and object handling were implemented to facilitate the module's operations.
2025-03-31 13:19:45 +02:00
Jepp9350 45328a6b72 Add PDF generation module with HTML2PDF integration.
This commit introduces a new PDF generation module leveraging the HTML2PDF library. The module generates PDFs from HTML templates, supports customization through styles and templates, and integrates with Minio for storage and retrieval. A test route is added for generating and serving PDFs dynamically.
2025-03-14 14:56:55 +01:00
Jepp9350 f045611794 Add form handling system for dynamic form operations
Implemented a robust form management system with validation, sanitization, and database integration. Added reusable traits, classes, and methods to define, submit, and process forms. Introduced a "Book a Wash" form as an example implementation.
2025-03-12 14:35:21 +01:00
Jepp9350 410ca84bf1 Add Stripe integration for customers, payments, and products
This commit introduces a comprehensive Stripe module with support for managing customers, products, prices, and payment links. It also includes endpoint routes, helpers, and database updates to support Stripe operations, such as creating and retrieving entities or handling payment workflows. Additionally, a stripe module was integrated into existing routes and objects to enable seamless interaction with Stripe APIs.
2025-02-18 18:31:23 +01:00
Jepp9350 5af6fc5aa5 Add MotorAPI module with configuration management
Introduced the MotorAPI module, including its configuration classes, interface, and integration with the router. The configuration supports enabling, managing API tokens, and daily request limits. Added support for fetching and updating MotorAPI settings via new API routes.
2025-02-18 09:03:06 +01:00
Jepp9350 797630d8bd Add backup and email enhancements with PHPMailer integration
Introduced a backup system managing database and metadata files using Minio/S3, alongside routes for handling these. Integrated PHPMailer for robust email functionalities, including configuration testing and SMTP handling. Updated Dockerfile, composer dependencies, and minor code improvements to support new features.
2025-02-11 14:25:26 +01:00
Jepp9350 61de9cdb45 Add email configuration module and enable invoice PDF retrieval
Introduce an email configuration module to manage SMTP settings, including encryption, host, username, and more. Implement functionality for retrieving invoice PDFs, storing them, and providing secure download links. Added relevant endpoint, routes, and helper methods to support these features.
2025-02-10 18:07:51 +01:00
Jepp9350 172e37d3a2 Add reCAPTCHA support and enhance Economic configurations
Introduce reCAPTCHA integration with validation and configuration handling. Update Economic module to include layout management and dynamic configuration via API. Added traits for managing module settings and encapsulated new endpoint routes for expanded functionality.
2025-02-10 15:27:32 +01:00
Jepp9350 e09eedb010 Add statistics feature with bookings tracking functionality
Introduce a scalable statistics architecture including `statistics` class, interface, and related implementations. Added support for tracking new bookings with routes and data handling through `bookings_s` and `statistic_t`. Integrated the feature into the application using autoloaders and response mechanisms.
2025-01-31 12:32:22 +01:00
Jepp9350 ca52d3b248 Update API endpoints, add wash certificate handling
Replaced legacy 'nnks.truckwash.dk' endpoint with 'api.truckwash.dk' across the codebase for consistency. Implemented a feature to handle certificate downloads, including file serving and validation. Updated PHP configuration to support additional dependencies like PHPMailer, and introduced necessary route and configuration changes for wash certificate processing.
2025-01-31 09:25:18 +01:00
Jepp9350 707df910b0 Refactor: migrate files 2025-01-29 14:27:44 +01:00