diff --git a/apps/ssr/next-env.d.ts b/apps/ssr/next-env.d.ts index c4e7c0eb..c4b7818f 100644 --- a/apps/ssr/next-env.d.ts +++ b/apps/ssr/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import './.next/types/routes.d.ts' +import "./.next/dev/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/be/apps/core/.env b/be/apps/core/.env new file mode 120000 index 00000000..c7360fb8 --- /dev/null +++ b/be/apps/core/.env @@ -0,0 +1 @@ +../../.env \ No newline at end of file diff --git a/be/apps/core/src/modules/photo/photo.service.ts b/be/apps/core/src/modules/photo/photo.service.ts index fbf7c91b..c287838f 100644 --- a/be/apps/core/src/modules/photo/photo.service.ts +++ b/be/apps/core/src/modules/photo/photo.service.ts @@ -22,21 +22,12 @@ export type ProcessPhotoOptions = { livePhotoMap?: Map processorOptions?: Partial builder?: AfilmoryBuilder + builderConfig?: BuilderConfig } @injectable() export class PhotoBuilderService { - private readonly defaultBuilder: AfilmoryBuilder - - constructor() { - this.defaultBuilder = new AfilmoryBuilder() - } - - getDefaultBuilder(): AfilmoryBuilder { - return this.defaultBuilder - } - - createBuilder(config?: Partial): AfilmoryBuilder { + createBuilder(config: BuilderConfig): AfilmoryBuilder { return new AfilmoryBuilder(config) } @@ -56,8 +47,8 @@ export class PhotoBuilderService { object: StorageObject, options?: ProcessPhotoOptions, ): Promise>> { - const { existingItem, livePhotoMap, processorOptions, builder } = options ?? {} - const activeBuilder = builder ?? this.defaultBuilder + const { existingItem, livePhotoMap, processorOptions, builder, builderConfig } = options ?? {} + const activeBuilder = this.resolveBuilder(builder, builderConfig) const mergedOptions: PhotoProcessorOptions = { ...DEFAULT_PROCESSOR_OPTIONS, @@ -75,6 +66,20 @@ export class PhotoBuilderService { return await processPhotoWithPipeline(context, activeBuilder) } + private resolveBuilder(builder?: AfilmoryBuilder, builderConfig?: BuilderConfig): AfilmoryBuilder { + if (builder) { + return builder + } + + if (builderConfig) { + return this.createBuilder(builderConfig) + } + + throw new Error( + 'PhotoBuilderService requires a builder instance or configuration. Pass builder or builderConfig in ProcessPhotoOptions.', + ) + } + private toLegacyObject(object: StorageObject): _Object { return { Key: object.key, diff --git a/be/apps/dashboard/agents.md b/be/apps/dashboard/agents.md index c0c67236..621711c3 100644 --- a/be/apps/dashboard/agents.md +++ b/be/apps/dashboard/agents.md @@ -169,6 +169,193 @@ export const Component = () => { } ``` +UI Design Guidelines: + +This dashboard follows a **linear design language** with clean lines and subtle gradients. The design emphasizes simplicity and clarity without rounded corners or heavy visual effects. + +Core Design Principles: + +- **No rounded corners**: All elements use sharp, clean edges +- **Linear gradient borders**: Use subtle gradient borders for visual separation +- **Minimal backgrounds**: Use solid colors (`bg-background`, `bg-background-tertiary`) +- **Clean typography**: Clear hierarchy with appropriate font sizes +- **Subtle interactions**: Focus rings and hover states with minimal animation + +Form Elements (Inputs, Textareas, Selects): + +- **Shape**: **NO** `rounded-xl` - use straight edges +- **Background**: Use `bg-background` for standard inputs +- **Border**: Use `border border-fill-tertiary` for default state +- **Padding**: Standard padding is `px-3 py-2` for inputs +- **Text Size**: Use `text-sm` for consistency +- **Text Colors**: + - Input text: `text-text` + - Placeholder: `placeholder:text-text-tertiary/70` + - Labels: `text-text` with `font-medium` +- **Focus State**: + - Remove default outline: `focus:outline-none` + - Add focus ring: `focus:ring-2 focus:ring-accent/40` +- **Error State**: + - Border: `border-red/60` + - Focus ring: `focus:ring-red/30` + - Error message: `text-xs text-red` with `mt-1` spacing +- **Transitions**: Use `transition-all duration-200` for smooth interactions + +Example (text input): + +```tsx +
+ + + {error &&

{error}

} +
+``` + +Example (textarea): + +```tsx +