562 Commits

Author SHA1 Message Date
Innei
d7084a3201 feat(i18n): integrate internationalization support into dashboard
- Added i18next and react-i18next for localization support.
- Created i18n configuration in `src/i18n.ts` and set up language detection.
- Introduced `I18nProvider` to manage i18n context and resource updates.
- Added localization files for English and Chinese (Simplified) with necessary translations.
- Updated `ErrorElement` component to utilize translations for error messages.
- Enhanced dashboard documentation with i18n usage guidelines.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-18 01:31:06 +08:00
Innei
c8b7fcc882 feat(dashboard): update photo management components and dependencies
- Updated `babel-plugin-react-compiler` and `react-compiler-runtime` to version 1.0.0 across multiple package.json files.
- Refactored `PhotoPage` and related components to utilize new tab structure for better organization.
- Introduced `PhotoPageScaffold` and `PhotoPageTabs` for improved layout and navigation within the photo management section.
- Enhanced `PhotoSyncTab`, `PhotoStorageTab`, and `PhotoUsageTab` components for better functionality and user experience.
- Adjusted imports and component structure for clarity and maintainability.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-18 01:14:03 +08:00
Innei
855decbe77 refactor(photo): optimize photo loading and improve component imports
- Changed photo loading methods to remove unnecessary await for synchronous operations.
- Updated import path for icons in PhotoItem component for better clarity and organization.
- Adjusted class names for consistency in styling.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-17 23:29:07 +08:00
Innei
739b1e48b0 feat(dashboard): enhance App and PhotoSyncActions components with new hooks and functionality
- Integrated useRequireStorageProvider in AppLayer to manage storage provider requirements.
- Added auto-run functionality in PhotoSyncActions to trigger sync based on user settings.
- Updated useStorageProvidersQuery to accept options for enabling/disabling queries.
- Enhanced StorageProvidersManager to prompt users for immediate photo sync after configuration.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-17 21:59:03 +08:00
Innei
53abfc598d feat(auth): enhance LoginStep with platform description and adjust layout
- Added a descriptive paragraph about Afilmory as a photo gallery platform to the LoginStep component.
- Updated layout classes for improved consistency and alignment in the LoginStep and SuperAdminTenantManager components.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-17 18:15:17 +08:00
Innei
a6a7e2be33 fix(auth): adjust layout class for SocialAuthButtons component
- Modified the container class for the SocialAuthButtons component to improve layout consistency.
- Removed unnecessary 'justify-center' class when layout is set to 'row' for better alignment.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-17 17:35:32 +08:00
Innei
05a83dadde feat(docker): add patches directory to Dockerfile for core and builder stages
- Included a new COPY command to transfer patches into the Docker image.
- Ensured that patches are available in both core and builder stages for application consistency.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-17 15:39:24 +08:00
Innei
3fe81cc8e9 feat(dependencies): add patch for better-auth and update pnpm-lock and workspace files
- Introduced a patch for '@creem_io/better-auth' to modify the export in the module.
- Updated pnpm-lock.yaml to include the new patch and reflect changes in dependency versions.
- Modified pnpm-workspace.yaml to register the patched dependency.
- Ensured consistency in versioning for related dependencies across the project.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-17 15:33:50 +08:00
Innei
76debaa386 feat(photo): implement photo tag management and update functionality
- Added UpdatePhotoTagsDto for validating photo tag updates.
- Implemented updateAssetTags method in PhotoAssetService to handle tag updates, including validation and error handling.
- Enhanced PhotoController with a new endpoint for updating photo tags.
- Introduced PhotoTagEditorModal for editing tags in the UI, allowing batch updates for selected photos.
- Updated PhotoLibrary components to support tag editing and display changes in the UI.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-17 15:01:56 +08:00
Innei
765cd18598 feat(auth): integrate creem subscription management into authentication flow
- Added support for creem subscriptions in the AuthProvider, including new fields for creemCustomerId.
- Updated BetterAuthUser interface to include optional creemCustomerId.
- Enhanced plan management components to utilize creemCustomerId for subscription handling.
- Refactored PlanCard and PlanList components to accommodate new subscription logic and improve user experience.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-17 02:28:02 +08:00
Innei
99a57f920c feat(billing): enhance billing plan management with product and pricing configurations
- Added support for billing plan products and pricing settings, allowing for detailed configuration of subscription plans.
- Introduced new constants and types for managing billing plan overrides, products, and pricing.
- Updated the SystemSettingService to handle new billing-related settings and integrated them into the admin interface.
- Enhanced the BillingPlanService to retrieve and apply product and pricing information for tenant plans.
- Updated UI components to reflect the new billing plan configurations and ensure proper display of pricing details.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-17 01:48:35 +08:00
Innei
af3b5b9799 feat(landing): update landing page metadata and branding
- Changed website URL and updated SEO metadata to reflect new branding for Afilmory.
- Revised title, description, and keywords to align with the new focus on photography and immersive experiences.
- Removed unused user-related metadata to streamline the layout.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-16 22:55:53 +08:00
Innei
fab85313b0 refactor(landing): remove unused navigation items from PageHeader component
- Eliminated hardcoded navigation items from the PageHeader component to streamline the layout.
- Cleaned up the code by removing the associated navigation rendering logic.
- Improved maintainability of the component by focusing on essential elements.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-16 20:41:38 +08:00
Innei
2e6ef268e5 feat(landing): enhance landing page with privacy and terms of service
- Added new pages for Privacy Policy and Terms of Service, including markdown content rendering.
- Integrated `react-markdown` for displaying legal documents.
- Updated layout to include a footer with links to the new pages.
- Refactored layout components to improve structure and maintainability.
- Removed unused footer navigation items to streamline the design.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-16 20:41:02 +08:00
Innei
d1dee58219 feat(billing): implement billing plan management and usage tracking
- Introduced billing plans with associated quotas for tenants, including maximum upload sizes and processing limits.
- Added new endpoints and services for managing tenant billing plans and tracking usage events.
- Enhanced the dashboard with components for viewing and updating tenant plans, including a new tenant management interface.
- Implemented database migrations to support billing-related data structures and relationships.
- Updated documentation to reflect the new billing plan features and usage tracking capabilities.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-16 20:10:47 +08:00
Innei
a5afd8b233 feat: add photo upload and sync limits configuration
- Introduced new system settings for maximum photo upload size, maximum data sync object size, and maximum photo library items.
- Updated the SystemSettingService to parse and manage these new settings.
- Enhanced the photo upload workflow to enforce these limits during asset uploads and data synchronization.
- Added UI schema components for configuring these settings in the admin interface.
- Integrated progress tracking for photo uploads with server event handling.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-16 16:35:51 +08:00
Innei
4529ff84f9 fix: multi update photo
Signed-off-by: Innei <tukon479@gmail.com>
2025-11-16 15:17:49 +08:00
Innei
1616f866e5 feat: upload modal
Signed-off-by: Innei <tukon479@gmail.com>
2025-11-16 02:09:36 +08:00
Innei
2f1b69f0bd feat: implement photo upload workflow with processing and error handling
- Add ProcessingPanel component to display processing stages and logs.
- Create UploadFileList component to show upload progress for each file.
- Define constants for workflow steps, file statuses, and processing stages.
- Implement steps for completed, error, processing, review, uploading, and uploading steps.
- Create a Zustand store for managing photo upload state and actions.
- Add utility functions for file handling, error messages, and tag sanitization.
- Update hooks to support new upload options and progress tracking.
- Integrate new components and store into the photo upload module.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-15 23:34:07 +08:00
Innei
796f9c960e feat(auth): implement site autofill functionality in registration wizard
Signed-off-by: Innei <tukon479@gmail.com>
2025-11-15 21:54:22 +08:00
Innei
dafc621033 feat(config): update site configuration and enhance author handling
- Changed default site name and URL to reflect new branding.
- Updated author information in the site configuration, including name, URL, and avatar.
- Removed author-related settings from the configuration schema to streamline the setup.
- Enhanced the SiteSettingService to resolve author details dynamically based on tenant context.
- Added a new endpoint to retrieve the status of photo synchronization, improving user feedback on sync operations.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-15 01:08:31 +08:00
Innei
0621909e49 feat(app): integrate Hono framework for improved routing and error handling
- Replaced the previous application instance with Hono for better routing capabilities.
- Updated OpenAPI route registration to use a new internal path structure.
- Enhanced error handling by utilizing Hono's built-in error management features.
- Adjusted logging to reflect the new route paths for OpenAPI documentation.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-14 23:37:16 +08:00
Innei
3f27b971f6 feat(manifest): add public controller and enhance manifest service
- Introduced `ManifestPublicController` to handle public requests for the manifest.
- Updated `ManifestModule` to include the new controller.
- Enhanced `ManifestService` to support additional sync statuses in the query logic.
- Updated type imports in `PhotoAssetService` for better type safety.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-14 23:27:30 +08:00
Innei
4391721d55 feat(auth): implement account unlinking validation and add tenant account deletion functionality
- Enhanced the AuthController to validate that at least one OAuth provider remains linked when unlinking accounts.
- Introduced a new endpoint in DataManagementController for deleting tenant accounts, ensuring proper checks for tenant slug and permissions.
- Updated DataManagementService to handle the deletion of tenant-related data across multiple tables in the database.
- Added user confirmation prompts in the DataManagementPanel for account deletion to prevent accidental data loss.
- Integrated new hooks and API functions to support tenant account deletion in the dashboard.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-14 23:03:00 +08:00
Innei
77f16490e4 chore: adjust docs and add cjk font
- Created a new documentation site under `apps/docs` using Vite, React, and MDX.
- Added essential files including `index.html`, `package.json`, and various configuration files.
- Implemented a file-system based routing system with automatic route generation from markdown files.
- Included support for syntax highlighting, responsive design, and TypeScript.
- Established a structure for documentation content with initial deployment guides and storage provider information.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-14 21:52:54 +08:00
Innei
c107aa49b3 fix(og.service): improve font loading error handling
- Updated the font loading logic in `OgService` to handle potential errors when checking file existence.
- Utilized optional chaining to ensure that the code does not throw an error if the stat call fails, enhancing reliability during font loading.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-14 21:07:54 +08:00
Innei
4e1b27625b feat(config): add development environment constant and enhance font loading logic
- 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>
2025-11-14 20:59:14 +08:00
Innei
ef19962eb2 feat(docker): optimize Dockerfile and enhance EXIF data extraction
- 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>
2025-11-14 20:04:53 +08:00
Innei
fa7b953d78 feat(logger): enhance logging functionality with tag support and message relaying
- 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>
2025-11-14 18:32:00 +08:00
Innei
51a5a51f20 feat(data-sync): enhance error handling in data synchronization process
- 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>
2025-11-14 17:54:01 +08:00
Innei
5e4b4bb4d1 feat(data-management): add data management module for photo asset maintenance
- 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>
2025-11-14 16:38:15 +08:00
Innei
2b30668072 feat(data-sync): ensure plugin hooks are ready before listing storage objects
- 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>
2025-11-14 14:41:18 +08:00
Wenzhuo Liu
f2658cf5a5 feat: support hdr motion photo (#155) 2025-11-14 14:26:03 +08:00
Innei
6085335242 chore(builder): update package version and adjust module exports
- 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>
2025-11-14 00:31:32 +08:00
Innei
3e60b382e1 feat(builder): integrate GitHub repository synchronization plugin and update configuration
- 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>
2025-11-14 00:23:26 +08:00
Innei
6a4f868a5a feat(docker): add Docker Compose configuration for database and caching services
- 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>
2025-11-13 23:43:22 +08:00
Innei
936666d8a2 refactor: remove unnecessary window checks across components
- 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>
2025-11-13 15:03:46 +08:00
Innei
76a4c251e4 feat(photo): enhance photo asset normalization and logging
- 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>
2025-11-13 14:52:00 +08:00
Innei
e8f967a7ea refactor(s3): replace AWS SDK S3 types with custom S3ObjectLike interface
- 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>
2025-11-13 13:53:54 +08:00
Innei
9f436c63d3 chore(docker): update Dockerfile to include runtime dependencies for image processing
- 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>
2025-11-13 00:46:25 +08:00
Innei
ff73de44c8 feat(data-sync): implement logging for data synchronization process
- 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>
2025-11-13 00:42:43 +08:00
Innei
42c217e2f8 chore(deps): update package versions across the project
- 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>
2025-11-12 23:57:37 +08:00
Innei
33cbbfe2b4 refactor(errors): simplify BizException and BizErrorResponse interfaces
- 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>
2025-11-12 23:30:58 +08:00
Innei
76d60fd672 feat(ui): introduce LinearBorderContainer component and enhance NotFound pages
- 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>
2025-11-12 22:47:56 +08:00
Innei
84fe2b70ec fix: response camelCaseKeys
- 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>
2025-11-12 21:56:17 +08:00
Innei
d15112293f feat(auth): refine tenant context handling and slug resolution
- 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>
2025-11-12 21:39:45 +08:00
Innei
6768e86327 fix: update oauth
Signed-off-by: Innei <tukon479@gmail.com>
2025-11-12 19:45:37 +08:00
Innei
a5ff9363af feat(auth): enhance tenant context resolution and error logging
- 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>
2025-11-12 19:23:24 +08:00
Innei
715dbf7077 refactor(oauth): remove redirect URI settings from system configuration
- 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>
2025-11-12 17:56:22 +08:00
Innei
66c57218e4 feat(oauth-gateway): add oauthGatewayUrl configuration and handling
- 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>
2025-11-12 17:14:04 +08:00