- 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>
- Changed target from ES2022 to ESNext in tsconfig files for core and framework packages.
- Reformatted paths and include/exclude arrays for better readability.
- Introduced a new middleware for context propagation in the application, ensuring HttpContext values are preserved for downstream handlers.
- Refactored middleware registration logic to streamline the process and improve maintainability.
Signed-off-by: Innei <tukon479@gmail.com>
- Removed the onboarding module and its associated components to simplify the application structure.
- Introduced a new welcome module with components for site schema and registration wizard.
- Updated routing to direct users to the new welcome page for tenant registration.
- Enhanced the registration process by integrating social authentication options and improving user experience.
- Refactored related hooks and utilities to support the new onboarding flow.
Signed-off-by: Innei <tukon479@gmail.com>
- Removed unnecessary fields from the default builder configuration, including repository and storage settings.
- Set storage to null to enforce configuration validation.
- Updated loadBuilderConfig to ensure storage configuration is provided, throwing an error if missing.
Signed-off-by: Innei <tukon479@gmail.com>
- Changed base image for both builder and runner stages to node:lts-alpine for improved performance and reduced image size.
- Removed hardcoded NODE_VERSION argument to simplify the Dockerfile.
- Updated package installation command to use 'apk add' for consistency.
Signed-off-by: Innei <tukon479@gmail.com>
- Introduced a new Dockerfile to streamline the build process for the core application.
- Configured multi-stage builds to optimize image size and separate build dependencies from production.
- Included installation of necessary packages and setup for the web and dashboard applications.
- Ensured proper copying of built assets to the production image for deployment.
Signed-off-by: Innei <tukon479@gmail.com>
- Updated Dockerfile to include installation of perl in the production image.
- Ensured that the environment is prepared for any necessary scripts or dependencies requiring perl.
Signed-off-by: Innei <tukon479@gmail.com>
- Added endpoints for linking and unlinking social accounts in AuthController.
- Introduced new types for social account requests and responses.
- Implemented methods to fetch and serialize social accounts.
- Updated the AuthProvider to include verification handling and cookie prefix management.
- Created new components for social connection settings in the dashboard, allowing users to manage their linked accounts.
- Added database migration for the new auth_verification table to support account verification processes.
Signed-off-by: Innei <tukon479@gmail.com>
- Added @iconify-json/simple-icons version 1.2.57 to pnpm-lock.yaml and package.json.
- Changed the sign-up endpoint from '/sign-in/email' to '/sign-up/email' in AuthController.
- Enhanced SocialAuthButtons component with improved styling and accessibility features.
- Updated login page layout and error message presentation for better user experience.
Signed-off-by: Innei <tukon479@gmail.com>