- Introduced a global constant `__DEV__` to indicate the development environment in the Vite configuration.
- Updated the `OgService` to conditionally include additional font paths when in development mode, improving font loading flexibility.
- Refactored font loading logic to check for file existence before attempting to read, enhancing reliability.
Signed-off-by: Innei <tukon479@gmail.com>
- Updated Dockerfile to use Alpine base image for reduced size and added necessary runtime dependencies including exiftool.
- Refactored EXIF data extraction logic to utilize exiftool with improved error handling and logging.
- Simplified metadata handling by removing unnecessary checks and ensuring consistent extraction of EXIF data.
Signed-off-by: Innei <tukon479@gmail.com>
- Updated the ConsolaCompatibleLogger to include a tag parameter for better log categorization.
- Introduced a relayLogMessage function to facilitate message relaying with associated tags and log levels.
- Refactored the createBuilderLoggerAdapter function to utilize the new tagging system, improving log context and traceability.
Signed-off-by: Innei <tukon479@gmail.com>
- Added an 'errors' field to the DataSyncResultSummary and updated related types to track synchronization errors.
- Modified the DataSyncService to categorize certain failures as errors instead of conflicts.
- Updated UI components to display error counts in synchronization summaries and progress panels, improving user feedback during data sync operations.
Signed-off-by: Innei <tukon479@gmail.com>
- Introduced the DataManagementModule, including a controller and service for managing photo asset records.
- Implemented functionality to truncate photo asset records from the database, enhancing data management capabilities.
- Updated existing photo asset deletion logic to support optional deletion from storage.
- Added a new DataManagementPanel in the dashboard for user interaction with data management features.
Signed-off-by: Innei <tukon479@gmail.com>
- Added a call to `builder.ensurePluginsReady()` in the DataSyncService to ensure that plugin hooks, such as thumbnail storage exclude filters, are executed prior to listing storage objects.
- This change enhances the reliability of the data synchronization process by ensuring all necessary plugins are initialized before operations commence.
Signed-off-by: Innei <tukon479@gmail.com>
- Bumped package version from 0.1.3 to 0.2.2 for the builder.
- Changed main entry point and module exports from `.js` to `.mjs` and updated type definitions to `.d.mts` for better compatibility with ES modules.
- Modified GitHub repository synchronization plugin options to allow an optional `enable` flag, enhancing configuration flexibility.
Signed-off-by: Innei <tukon479@gmail.com>
- Added `githubRepoSyncPlugin` to the builder configuration, enabling synchronization with a GitHub repository.
- Removed deprecated repository settings from user configuration and streamlined the plugin's integration.
- Updated CLI and documentation to reflect changes in repository configuration handling, enhancing clarity for users.
Signed-off-by: Innei <tukon479@gmail.com>
- Introduced a new `docker-compose.yml` file to define services for PostgreSQL and Redis, facilitating local development and testing.
- Configured health checks for both services to ensure they are ready before the core application starts.
- Set up environment variables for the PostgreSQL service to manage user credentials and database initialization.
- Added volume mappings for persistent data storage in both PostgreSQL and Redis.
refactor(auth): streamline tenant context resolution and error handling
- Simplified the `AuthGuard` to throw a `BizException` with a detailed message when tenant IDs do not match.
- Removed unnecessary response header settings in the `TenantContextResolver` and middleware, improving clarity and maintainability.
- Updated various controllers and services to utilize the new tenant context handling logic, ensuring consistent behavior across the application.
feat(super-admin): implement builder debug functionality
- Added `SuperAdminBuilderDebugController` to handle image debugging requests with progress tracking.
- Introduced an in-memory storage provider for debugging purposes, allowing for temporary file uploads and processing.
- Enhanced the dashboard with a new debug page for super admins to test and validate image processing workflows.
Signed-off-by: Innei <tukon479@gmail.com>
- Eliminated checks for `typeof window !== 'undefined'` in various components and utility functions, simplifying the codebase.
- Updated logic to directly access `window` properties, assuming the code runs in a browser environment.
- Improved readability and maintainability by streamlining conditional checks related to window availability.
Signed-off-by: Innei <tukon479@gmail.com>
- Updated photo asset service to correctly use regex in normalization functions, ensuring proper path formatting.
- Introduced builder log relay functionality in the data sync controller to improve logging during synchronization tasks.
- Added error handling improvements across various components, utilizing a centralized error message function for consistency.
- Enhanced photo page actions and library action bar with new select all functionality for better user experience.
Signed-off-by: Innei <tukon479@gmail.com>
- Removed dependencies on AWS SDK's S3 types in favor of a custom S3ObjectLike interface for better type management.
- Updated various services and components to utilize the new S3ObjectLike type, enhancing code clarity and maintainability.
- Introduced a SimpleS3Client interface to streamline S3 client interactions and improve fetch handling.
- Added fast-xml-parser for XML response parsing in S3 operations, enhancing object listing functionality.
Signed-off-by: Innei <tukon479@gmail.com>
- Added perl, perl-image-exiftool, vips, and libheif to the Dockerfile for enhanced image processing capabilities.
- These dependencies support exiftool functionality and enable HEIF/HEIC support in libvips.
Signed-off-by: Innei <tukon479@gmail.com>
- Added logging functionality to the DataSyncService to track progress and errors during the manifest generation process.
- Introduced DataSyncLogLevel and DataSyncLogPayload types for structured logging.
- Updated emitLog method to handle different log levels (info, success, warn, error) and include relevant details.
- Enhanced PhotoSyncProgressState to maintain a log of synchronization events, displayed in the PhotoSyncProgressPanel.
Signed-off-by: Innei <tukon479@gmail.com>
- Bumped versions for several dependencies including `@types/node`, `eslint`, `sharp`, `vite`, and various `@tanstack/react-query` packages to their latest releases for improved stability and features.
- Updated Tailwind CSS related packages to version 4.1.17 for consistency across the project.
- Adjusted other dependencies such as `jotai`, `lucide-react`, and `tailwind-merge` to their latest versions to ensure compatibility and access to new features.
Signed-off-by: Innei <tukon479@gmail.com>
- Removed generic type parameters from BizExceptionOptions and BizErrorResponse interfaces for clarity.
- Updated BizException class to directly use the message property from options, enhancing readability.
- Adjusted toResponse method in BizException to streamline response structure by removing unnecessary details handling.
fix(controller): update error handling in StorageSettingController
- Changed error code in ensureKeyAllowed method to use COMMON_BAD_REQUEST for better accuracy in error reporting.
fix(dashboard): update HTML files to use link tag for favicon
- Replaced meta tag with link tag for favicon in index.html, tenant-missing.html, and tenant-restricted.html for improved compatibility.
Signed-off-by: Innei <tukon479@gmail.com>
- Added LinearBorderContainer component for improved UI styling with gradient borders.
- Refactored NotFound components in both web and dashboard to utilize LinearBorderContainer, enhancing visual presentation and user experience.
- Updated layout and messaging for 404 error pages to provide clearer navigation options.
Signed-off-by: Innei <tukon479@gmail.com>
- Removed the server-side check for window existence in usePageRedirect hook, streamlining the redirect logic.
- Ensured that tenant slug resolution remains intact for client-side operations.
Signed-off-by: Innei <tukon479@gmail.com>
- Enhanced AuthController to derive requestedSlug based on tenant context and placeholder status.
- Updated TenantContextResolver to utilize requestedSlug for setting tenant headers, improving accuracy in tenant identification.
- Ensured consistent handling of tenant slugs across authentication processes.
Signed-off-by: Innei <tukon479@gmail.com>
- Updated AuthProvider to improve tenant slug resolution by considering requestedSlug alongside tenant slug.
- Enhanced error handling in the OAuth callback by logging detailed error information when encountering authentication errors.
- Modified TenantContextResolver to include requestedSlug in tenant context creation, ensuring accurate context resolution.
- Updated TenantContext interface to include requestedSlug for better clarity in tenant context management.
Signed-off-by: Innei <tukon479@gmail.com>
- Removed oauthGoogleRedirectUri and oauthGithubRedirectUri from SYSTEM_SETTING_DEFINITIONS and related service logic.
- Updated SystemSettingService to eliminate handling of redirect URIs for Google and GitHub.
- Adjusted UI schema and types to reflect the removal of redirect URI fields.
- Cleaned up associated validation and parsing logic to streamline OAuth configuration.
Signed-off-by: Innei <tukon479@gmail.com>
- Introduced a new configuration for oauthGatewayUrl in system settings, allowing for flexible OAuth callback handling.
- Updated the SystemSettingService to parse and normalize the oauthGatewayUrl.
- Enhanced the AuthProvider to utilize the oauthGatewayUrl for constructing redirect URIs for third-party logins.
- Added validation for the oauthGatewayUrl to ensure it adheres to HTTP/HTTPS protocols.
- Updated UI schema to include oauthGatewayUrl field for user input.
Signed-off-by: Innei <tukon479@gmail.com>
- Added a new OAuth gateway service to handle multi-tenant authentication callbacks.
- Implemented routing logic for provider callbacks, including tenant slug validation and host resolution.
- Introduced configuration management for environment variables and service settings.
- Created Dockerfile and package.json for service deployment and dependencies.
- Added HTML response for restricted tenant access and updated static web components accordingly.
Signed-off-by: Innei <tukon479@gmail.com>
- Updated the buildBetterAuthProvidersForHost method to include fallback host and tenant slug parameters for improved redirect URI construction.
- Introduced a new resolveRedirectHost method to determine the appropriate host based on tenant slug and fallback host.
- Refactored buildRedirectUri to utilize the new logic, ensuring correct handling of tenant-specific redirects.
Signed-off-by: Innei <tukon479@gmail.com>
- Added logic to automatically set the tenant slug from the current subdomain in the RegistrationWizard component.
- Introduced a state to lock the tenant slug, preventing manual changes when it matches the subdomain.
- Updated WorkspaceStep to reflect the locked state and provide appropriate messaging to users.
Signed-off-by: Innei <tukon479@gmail.com>
- Added methods to block access for reserved tenants in StaticWebController.
- Implemented logic to allow tenantless access to specific dashboard routes.
- Refactored static dashboard index handling to improve tenant context checks and response management.
- Updated TenantMissingStandalone component to simplify URL construction.
Signed-off-by: Innei <tukon479@gmail.com>
- Added a new tenant missing page to provide user feedback when a tenant is unavailable.
- Updated StaticWebController to check for tenant context and render the tenant missing page when necessary.
- Refactored StaticAssetService to generalize HTML response creation.
- Introduced new methods for handling tenant missing scenarios and improved response management in StaticWebService.
Signed-off-by: Innei <tukon479@gmail.com>
- Renamed core package to @afilmory/core for better namespace management.
- Added AppInitializationModule and AppInitializationProvider to handle application startup and root tenant provisioning.
- Introduced root tenant login page and updated routing to support root login.
- Enhanced tenant context resolution to accommodate root tenant paths and added related utility functions.
- Refactored existing services and modules to integrate root tenant logic and improve overall structure.
Signed-off-by: Innei <tukon479@gmail.com>
- Introduced the SkipTenantGuard decorator to the static web routes in StaticWebController, allowing access without tenant validation.
- Updated the getStaticWebRoot, getStaticWebIndex, and getStaticDashboardIndexWithBasename methods to utilize the new guard.
Signed-off-by: Innei <tukon479@gmail.com>
- Introduced a new entrypoint script to handle database migrations before starting the application.
- Implemented CLI commands for database migration, including argument parsing and execution logic.
- Updated Dockerfile to copy the entrypoint script and set it as the container's entrypoint.
Signed-off-by: Innei <tukon479@gmail.com>
- Added functions to resolve dependency versions from package.json and npm commands, improving the accuracy of version retrieval for external modules.
- Refactored the generateExternalsPackageJson function to utilize the new version resolution logic, streamlining the process of generating package.json for externals.
Signed-off-by: Innei <tukon479@gmail.com>
- Changed the build serve command in the Dockerfile to specifically use the @afilmory/web filter, ensuring the correct application context is built and served.
- This adjustment improves the clarity and accuracy of the build process for the web application.
Signed-off-by: Innei <tukon479@gmail.com>
- Refactored the page redirect logic to ensure proper session clearance for placeholder tenants.
- Added an asynchronous function to handle sign-out before redirecting to the target URL, with error logging for better debugging.
Signed-off-by: Innei <tukon479@gmail.com>
- Introduced AllowPlaceholderTenant decorator to manage placeholder tenant access.
- Added PlaceholderTenantGuard to enforce access rules for placeholder tenants.
- Enhanced AuthGuard to handle placeholder tenant contexts and permissions.
- Updated roles handling to support inheritance and added RolesGuard for role-based access control.
- Integrated placeholder tenant logic into various controllers and services for consistent behavior.
- Improved tenant context resolution to fallback to placeholder tenant when necessary.
Signed-off-by: Innei <tukon479@gmail.com>
- Renamed the SkipTenant decorator to SkipTenantGuard for clarity and consistency.
- Updated all relevant imports across the application to reflect this change.
- Added mkdir functionality in vite.config.ts to ensure output directory exists before writing package.json.
- Removed unused CJK font promise in og.service.ts and commented out related code for future reference.
Signed-off-by: Innei <tukon479@gmail.com>
- Removed the MainPageLayout and its associated components from the settings page, returning null instead.
- Added a loader function to redirect users to the '/settings/site' path, streamlining navigation within the application.
Signed-off-by: Innei <tukon479@gmail.com>
- Modified the Dockerfile to use wildcard copying for built assets from the web and dashboard applications, ensuring all files are included in the production image.
- This change enhances the reliability of the asset transfer process during the build stage.
Signed-off-by: Innei <tukon479@gmail.com>
- Updated the LoggingInterceptor to extract and log tenant information during HTTP requests.
- Improved log messages to include tenant slug for better traceability in multi-tenant environments.
Signed-off-by: Innei <tukon479@gmail.com>
- Changed the build command from 'build:web' to 'build:serve' to better align with the intended application startup process.
- Ensured that the Dockerfile reflects the latest build requirements for the core application.
Signed-off-by: Innei <tukon479@gmail.com>