* Update dependencies and refactor CameraUpload component to use ZXing for barcode scanning
- Removed `@gtm-support/vue-gtm` from dependencies in `package-lock.json` and `package.json`.
- Added `@zxing/library` to dependencies for improved barcode scanning functionality.
- Refactored `CameraUpload.vue` to replace Quagga with ZXing for barcode detection, enhancing performance and reliability.
- Updated `FieldOptions.vue` to include QR Code as a selectable option for barcode scanning.
These changes aim to streamline the barcode scanning process and ensure the application utilizes the latest libraries for optimal performance.
* Self hosted domain redirect (#756)
* Integration pages from Notion
* Self hosted domain redirect
* Refactor root-redirect middleware and update 404 page layout
- Simplified the `root-redirect.js` middleware by removing the specific route checks, allowing for a more general redirect based on the `self_hosted` feature flag.
- Updated the 404 error page in `[...all].vue` by removing the unnecessary `NuxtLayout` wrapper and replacing `NuxtLink` with a custom `UButton` for navigation, enhancing the overall layout and user experience.
These changes aim to streamline the redirect logic and improve the presentation of the 404 error page.
* Refactor feature flag handling and update middleware
- Updated the condition in `Navbar.vue` to correctly evaluate the feature flags for rendering the AI form builder link.
- Removed the `feature-flags.global.js` middleware as it was no longer needed, streamlining the middleware structure.
- Enhanced the `root-redirect.js` middleware to utilize `h3`'s `sendRedirect` for server-side redirection, improving the redirect logic.
- Modified the `ai-form-builder.vue` page to include the new `root-redirect` middleware, ensuring proper redirection based on feature flags.
These changes aim to improve the handling of feature flags and redirection logic, enhancing the overall application flow.
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Remove Quagga dependency from package.json and package-lock.json to streamline barcode scanning functionality. This change is part of the ongoing effort to enhance performance by utilizing more efficient libraries, following the recent integration of ZXing for barcode detection.
* Enhance Docker Configuration and Health Checks (#761)
* Enhance Docker Configuration and Health Checks
- Added PHP configuration settings in `docker-compose.dev.yml` and `docker-compose.yml` to improve memory management and execution limits, ensuring better performance for PHP applications.
- Introduced health checks for various services including `api`, `api-worker`, `api-scheduler`, `ui`, `redis`, and `db` to ensure service availability and reliability.
- Updated environment variables in `.env.docker` and `client/.env.docker` to include new keys for H-Captcha and reCAPTCHA, enhancing security features.
- Refactored the PHP-FPM entrypoint script to apply PHP configurations dynamically based on environment variables, improving flexibility in deployment.
- Removed outdated PHP configuration files to streamline the Docker setup.
These changes aim to enhance the overall stability, performance, and security of the application in a Dockerized environment.
* Refactor Dockerfile for Improved Build Process
- Changed the Dockerfile to utilize a multi-stage build approach, separating the build and runtime environments for better efficiency.
- Introduced a builder stage using the PHP CLI image to install dependencies and extensions, optimizing the final image size.
- Removed unnecessary installation steps and combined related commands to streamline the Dockerfile, enhancing readability and maintainability.
- Updated the runtime stage to use the PHP FPM Alpine image, ensuring a smaller and more secure production environment.
These changes aim to improve the build process, reduce image size, and enhance the overall performance of the Dockerized application.
* Refactor Environment Variables Documentation
- Consolidated the documentation for environment variables in `environment-variables.mdx` by removing duplicate entries for `JWT_TTL` and `JWT_SECRET`, ensuring clarity and reducing redundancy.
- Introduced a new section for PHP configuration environment variables, detailing important settings such as `PHP_MEMORY_LIMIT`, `PHP_MAX_EXECUTION_TIME`, and others, to aid users in optimizing their PHP applications.
- Added a section for database configuration environment variables, providing essential details for connecting the Laravel backend to the database.
These changes aim to enhance the documentation's clarity and comprehensiveness, making it easier for users to configure their environments effectively.
* Update Environment Configuration for Production Deployment
- Changed the `APP_ENV` variable in the `.env.docker` file from `local` to `production`, aligning the environment settings with the deployment requirements for the production environment. This change is essential for ensuring that the application runs with the appropriate configurations and optimizations for a live setting.
This update aims to facilitate a smoother transition to production by ensuring the correct environment variables are set.
* Update Environment Variables in .env.docker
- Removed the `BROADCAST_CONNECTION` and `SESSION_LIFETIME` variables from the `.env.docker` file, streamlining the environment configuration for better clarity and relevance.
- Retained essential Redis configurations for caching and session management, ensuring that the application maintains its performance and functionality.
This change aims to simplify the environment setup by eliminating unnecessary variables that are no longer needed.
* Refactor Docker Entrypoint and Environment Variables
- Removed the `IS_API_WORKER` environment variable from `docker-compose.yml`, simplifying the configuration for API services and aligning with the new role-based command handling.
- Updated the `php-fpm-entrypoint` script to determine the role (API, worker, or scheduler) based on the command being executed, enhancing flexibility and clarity in service initialization.
- Streamlined the setup process for different roles, ensuring that appropriate commands are executed based on the determined role, which improves maintainability and reduces potential errors.
These changes aim to enhance the Docker configuration by adopting a more dynamic approach to service roles, improving the overall deployment process.
* Enhance PHP Configuration Defaults in Docker Entrypoint
- Updated the `php-fpm-entrypoint` script to set default values for PHP configuration settings, including `memory_limit`, `max_execution_time`, `upload_max_filesize`, and `post_max_size`, when not explicitly provided through environment variables. This change ensures that the application has sensible defaults, improving reliability and reducing potential misconfigurations during deployment.
These modifications aim to enhance the Docker setup by providing fallback values for critical PHP settings, thereby streamlining the configuration process and ensuring better performance in various environments.
* Update Docker Compose Configuration for Storage Volume
- Changed the storage volume mapping in `docker-compose.yml` from a relative path (`./api/storage`) to a named volume (`opnform_storage`). This modification enhances portability and consistency across different environments by utilizing Docker's volume management, ensuring that the storage is properly managed and isolated.
This change aims to improve the Docker setup by leveraging named volumes for better data persistence and management.
* Update Documentation and Configuration for Subdomain Redirect
- Added a link to the new "Subdomain Redirect Configuration" page in `environment-variables.mdx` to enhance user guidance on setting up subdomain redirects.
- Updated the `mint.json` file to include "configuration/subdomain-redirect" in the configuration paths, ensuring it is recognized in the documentation structure.
These changes aim to improve the documentation's comprehensiveness and provide users with clear instructions for configuring subdomain redirects, thereby enhancing the overall setup experience.
* Enhance Form Management with Dynamic Configuration Updates
- Added a new watcher in `OpenCompleteForm.vue` to monitor changes to the form prop and update the form manager accordingly, ensuring that the form manager reflects the latest configuration.
- Introduced an `updateConfig` method in `useFormManager.js` to handle updates to the form configuration, resetting the form state and reinitializing with the new config. This improves the flexibility and responsiveness of the form management system.
These changes aim to enhance the user experience by ensuring that form updates are seamlessly integrated into the form management workflow, allowing for more dynamic interactions.
* Refactor FlatSelectInput Component to Simplify Template Structure
- Removed the conditional rendering of the selected options slot in `FlatSelectInput.vue`, streamlining the template for better readability and maintainability. This change focuses on enhancing the component's clarity by eliminating unnecessary complexity in the markup.
These modifications aim to improve the overall structure of the FlatSelectInput component, making it easier to understand and work with in future development.
* Enhance Application Optimization in Docker Entrypoint
- Added a cache clearing step in the `optimize_application` function of the `php-fpm-entrypoint` script. This new line executes `php ./artisan optimize:clear` before optimizing the application, ensuring that any stale cache is removed, which can lead to improved performance and reliability during application optimization.
This change aims to enhance the application's responsiveness by ensuring that the optimization process starts with a clean state, thereby reducing potential issues related to outdated cached data.
* Refactored UI
* Refactor CameraUpload Component for Improved Webcam Handling
- Updated the CameraUpload.vue component to replace element IDs with Vue refs for better reactivity and maintainability. This change enhances the component's structure by utilizing Vue's reference system, allowing for more efficient DOM manipulation.
- Modified the webcam initialization logic to accommodate both regular and barcode modes, ensuring that the appropriate setup is executed based on the current mode.
- Improved error handling and cleanup processes for the webcam stream, enhancing the robustness of the component during camera operations.
- Streamlined the barcode scanning logic by using ZXing's decodeFromConstraints method, which simplifies the handling of video streams and improves performance.
These modifications aim to enhance the overall functionality and reliability of the CameraUpload component, providing a better user experience during webcam interactions.
* Enhance Barcode Decoder Options and Add QR Code Reader Configuration
- Added 'QR Code' to the barcode decoders options in `FieldOptions.vue`, ensuring users can select this option for scanning.
- Updated `blocks_types.json` to include a new configuration for the QR Code Reader, providing default values and settings for its integration.
- Refactored the `working_form.js` store to accommodate changes in block definitions, ensuring that the effective type and settings are applied correctly when adding blocks.
These modifications aim to improve the functionality and user experience of barcode scanning within the application.
---------
Co-authored-by: Julien Nahum <julien@nahum.net>