100 Commits
Author SHA1 Message Date
google-labs-jules[bot] 6e5c303650 Update model recommendations in READMEs (#62)
- Update `README.md` to recommend "Nano Banana (non-Pro)" for Asset Extraction, with "Nano Banana Pro" as a fallback.
- Update `README_CN.md` with the same recommendation translated into Chinese.
- Fix typo "Nanao" to "Nano" in `README_CN.md` and ensure consistent use of "Nano Banana Pro".

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-02-22 17:31:20 +08:00
google-labs-jules[bot] 31771d0ffa feat: Add EnlargableImage component for ExtractionStage (#61)
- Created `EnlargableImage` component in `src/ui/components/EnlargableImage.tsx`.
- Updated `ExtractionStage` to use `EnlargableImage` for displaying extraction results.
- Supports full-screen image viewing with zoom-in/out cursors and click-to-close behavior.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-02-22 17:15:47 +08:00
google-labs-jules[bot]andyiling ji a44ab5168d Refactor Extractor Workflow (#60)
* Refactor Extractor workflow to use atomic extraction

* Refactor Extractor workflow to use atomic extraction

* Refactor Extractor workflow to use atomic, sequential extraction

* fix(extractor): resolve overflow issues in SelectionStage

- Constrain `ScrollArea` in `SelectionStage` with `min-h-0` to ensure proper scrolling within flex container.
- Add `overflow-hidden` to `SelectionStage` container.
- Add `overflow-hidden` to `ExtractorDialog` content area to prevent content spillover.
- Ensure header in `SelectionStage` does not shrink (`shrink-0`).

* fix: ensure equipment is updated on re-extraction

- Verified that `src/api/extract.ts` uses `equipmentService.updateEquipment` when `previousEquipmentId` is provided.
- Confirmed that `src/service/equipment.ts` performs an SQL UPDATE and cleans up the old asset file.
- No new code changes were needed as the previous submission already covered this requirement.

* fix: use default extract model in re-extract dialog

- Updated `ExtractorDialog` to fetch `default_extract_model` from settings.
- Passed `defaultModel` to `ExtractionStage`.
- Updated `ExtractionStage` to initialize the re-extract model selection with `defaultModel`.

* fix: correct setting key for default extract model

- Updated `ExtractorDialog` to use `step_refine_model` instead of `default_extract_model` to fetch the default extraction model from settings, as confirmed by the `ExtractionFlowDesigner` configuration.

* fix: update extraction stage layout and buttons

- Enforced a square aspect ratio for the image container in extraction cards using `aspect-square`.
- Removed the "Cancel" button from the footer in `ExtractionStage`.
- Updated the footer to be always visible.
- Changed the "Finish" button to display "Extracting..." and be disabled while extraction is in progress, and "Finish" when complete.

* fix: resolve lint errors and refine extraction UI

- Removed unused `onCancel` prop from `ExtractionStage` to fix linting error.
- Updated `ExtractorDialog` to remove the unused `onCancel` callback passed to `ExtractionStage`.
- Ensured consistent image sizing (square aspect ratio) in extraction cards.
- Refined footer behavior to always show actions, with dynamic "Extracting..." state.

* refine ui

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yiling ji <njjyl723@gmail.com>
2026-02-22 16:37:03 +08:00
google-labs-jules[bot] 8421238d79 fix(build): use absolute paths for built assets (#59)
Configures `Bun.build` with `publicPath: '/'` to ensure that generated script and style tags in `index.html` use absolute paths (e.g., `/chunk-....js`). This fixes "Failed to load module script" errors when accessing the application via deep links (e.g., `/characters/...`) in production environments where the browser would otherwise attempt to load assets relative to the nested path.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-02-20 12:56:32 +08:00
google-labs-jules[bot] b99d1c6e06 Add Chinese README and language switcher (#58)
* Add Chinese README and language switcher

* Add Chinese README and language switcher

* Update READMEs with model recommendation for Refine Asset step

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-02-20 11:28:54 +08:00
google-labs-jules[bot] 7b5ff3d4b1 feat: fix RefineStage overflow and update extraction prompts (#57)
- Fix `RefineStage` overflow by applying `overflow-hidden` to the parent container and `min-h-0` to the `ScrollArea`.
- Update `generateTextureSheet` to use Chroma Green background.
- Update `refineAsset` prompt to extract the main equipment into a white background, using name and description for context.
- Update tests and API to support these changes.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-02-20 10:18:12 +08:00
google-labs-jules[bot]andyiling ji 32324464b0 Update Look Details Dialog with Image Zoom and Scrollable List (#54)
* Update Look Details Dialog with image zoom and scrollable list

* add missing migration

* minor change

* fix test

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yiling ji <njjyl723@gmail.com>
2026-02-19 17:27:34 +08:00
google-labs-jules[bot] f7af709826 Simplify extraction grid dimensions logic (#52)
- Updated `getGridDimensions` in `src/service/extraction.ts` to use a 2x2 grid for 4 or fewer assets, and a 3x3 grid otherwise.
- Updated `src/service/extraction.test.ts` to reflect the new grid dimensions in the `cropAssets` test.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-02-19 16:04:32 +08:00
google-labs-jules[bot] 7121ea4084 Fix scanline animation race condition in AnalyzeStage (#51)
Renamed the keyframes in `AnalyzeStage.tsx` to `scanline-analyze` to prevent conflict with the global `scanline` animation.
Also removed unused `scanline` keyframes from `RefineStage.tsx` to avoid potential future conflicts.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-02-19 15:53:25 +08:00
google-labs-jules[bot] 9758a7785e Use OpenAI Image Edit API for generation (#50)
* feat(ai): use OpenAI Image Edit API instead of Responses API

Replaces the deprecated/unofficial Responses API usage for image generation with the standard `client.images.edit` API.
This change supports multi-image inputs and follows the user's provided example for `gpt-image-1.5` model compatibility.

- Updates `generateImageOpenAI` in `src/service/ai.ts` to use `client.images.edit`.
- Handles conversion of text prompts and inline/reference images to the required format using `toFile`.
- Updates `src/service/ai.test.ts` to mock the new API call and verify correct behavior.

* feat(ai): use OpenAI Image Edit API instead of Responses API

Replaces the deprecated/unofficial Responses API usage for image generation with the standard `client.images.edit` API.
This change supports multi-image inputs and follows the user's provided example for `gpt-image-1.5` model compatibility.

- Updates `generateImageOpenAI` in `src/service/ai.ts` to use `client.images.edit`.
- Removes `response_format` parameter as it's not supported/needed for GPT image models (which default to base64).
- Handles conversion of text prompts and inline/reference images to the required format using `toFile`.
- Updates `src/service/ai.test.ts` to mock the new API call and verify correct behavior.

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-02-19 15:42:59 +08:00
google-labs-jules[bot]andyiling ji 3209e088e5 Fix toast visibility and Create Look dialog error handling (#49)
* Fix toast visibility z-index issue and Create Look dialog error handling

- Moved `<Toaster />` outside of `SidebarProvider` in `Layout.tsx` and increased z-index to ensure toasts appear above dialog overlays.
- Updated `CreateLookDialog.tsx` to use `toast.error()` for API errors instead of displaying them inline at the bottom of the dialog.

* Fix Extractor error handling, toast visibility, and Create Look dialog errors

- Updated `ExtractorDialog.tsx` to reset the stage to `'selection'` on refinement error, preventing infinite loading.
- Updated `CreateLookDialog.tsx` to use `toast.error()` for API errors instead of inline text.
- Moved `<Toaster />` in `Layout.tsx` outside of `SidebarProvider` to ensure toasts appear above dialog overlays.
- Ensured `package.json` and `sonner.tsx` remain clean (reverted temporary changes).

* fix sonner

* fix lint

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yiling ji <njjyl723@gmail.com>
2026-02-19 13:45:58 +08:00
google-labs-jules[bot] fe67119b50 Refactor GitHub icon to Icons component and resize
- Moved `GithubIcon` to `src/ui/components/Icons.tsx` as `Icons.Github`.
- Updated `src/ui/Layout.tsx` to use the new `Icons.Github` component.
- Increased icon size to `h-7 w-7`.
- Deleted `src/ui/components/GithubIcon.tsx`.
2026-02-19 04:35:08 +00:00
google-labs-jules[bot] 83b6c497e2 Refactor: API Key masking, settings UI improvements, and subCategory removal
- Removed `subCategory` field from Equipment model (DB), API, and UI.
- Generated Prisma migration `20260219022619_remove_subcategory_and_update_settings`.
- Implemented API Key masking (******) in settings service and UI.
- Updated Settings page to show 'Saved' state for API Key/URL buttons.
- Renamed 'Extraction Flow Defaults' to 'Default Models' in Settings.
- Fixed Fitting Room scrolling issue by adding `min-h-0` constraints.
- Updated tests and verifying scripts.
2026-02-19 02:35:28 +00:00
google-labs-jules[bot] bb4f6f61fb feat: add download option to VibeCard and Fitting Room looks
- Added download option to VibeCard dropdown menu when an image is present.
- Added download option to Fitting Room generated look card dropdown menu.
- Implemented client-side download logic using temporary anchor tag.
- Verified with typecheck and tests.
2026-02-18 14:44:27 +00:00
google-labs-jules[bot] 7da8e28f32 Update Docker Compose to use latest image and add standalone run instructions to README
- Updated `docker-compose.yml` to pull `yilingj/forgery:latest` instead of building locally.
- Updated `README.md` with instructions for using Docker Compose with the pre-built image.
- Added instructions for standalone `docker run` execution in `README.md`.
2026-02-18 13:19:56 +00:00
google-labs-jules[bot] 068dc39d39 chore: add release workflow for docker hub
- Added `.github/workflows/release.yml` for multi-platform Docker builds.
- Configured triggers for `main` branch pushes and `v*` tags.
- Uses `docker/metadata-action` for tagging:
  - `latest` is only updated on semantic version tags (e.g., `v1.0.0`).
  - `main` branch pushes are tagged with `main` and commit SHA.
- Supports `linux/amd64` and `linux/arm64`.
- Uses hardcoded `yilingj` username and `DOCKERHUB_TOKEN` secret.
2026-02-18 12:59:14 +00:00
google-labs-jules[bot] e7bdaf75d2 chore: add release workflow for docker hub
- Added `.github/workflows/release.yml` for multi-platform Docker builds.
- Configured triggers for `main` branch pushes and `v*` tags.
- Uses `docker/metadata-action` for tagging:
  - `latest` is only updated on semantic version tags (e.g., `v1.0.0`).
  - `main` branch pushes are tagged with `main` and commit SHA.
- Supports `linux/amd64` and `linux/arm64`.
- Requires `DOCKERHUB_USERNAME` and `DOCKERHUB_TOKEN` secrets.
2026-02-18 12:47:53 +00:00
google-labs-jules[bot] 7aca5c1ff9 chore: add release workflow for docker hub
- Added `.github/workflows/release.yml` to build and push Docker images to Docker Hub.
- Configured trigger on `push` to `main` branch and `v*` tags.
- Enabled multi-platform builds for `linux/amd64` and `linux/arm64`.
- Uses `docker/metadata-action` for automatic tagging (`latest`, semver).
- Requires `DOCKERHUB_USERNAME` and `DOCKERHUB_TOKEN` secrets.
2026-02-18 12:31:11 +00:00
google-labs-jules[bot] b292548d6e Improve Outfit List and Create Outfit Dialog UI 2026-02-18 07:22:46 +00:00
google-labs-jules[bot] 1761bed9ce feat(ui): Enhance Outfit list UI and add Edit functionality
- Update `VibeCard` to support custom `children` content and ensure text readability with a gradient overlay.
- Refactor Outfit list in `Equipments.tsx` to use a grid of `VibeCard` components.
- Implement a 3x3 equipment preview grid inside Outfit cards, with overflow (+N) handling.
- Center the preview grid to 80% height as per design requirements.
- Update `CreateOutfitDialog` to support editing existing outfits (PUT request).
- Change category selection in `CreateOutfitDialog` to single-select.
- Update equipment selection grid in `CreateOutfitDialog` to fixed 3 columns.
- Add "Edit" action to Outfit cards.
2026-02-18 05:07:13 +00:00
google-labs-jules[bot] 599f566f80 Remove verification artifacts
- Deleted `verification/fitting_room_v2.png`
- Deleted `verification/verify_fitting_room_v2.py`
2026-02-18 03:24:08 +00:00
google-labs-jules[bot] 219d9224d0 Fix Fitting Room UI, add Extractor outfit save, update Dockerfile
- Fitting Room:
  - Constrain page height to viewport.
  - Use `ScrollArea` for "Generated Looks".
  - Ensure character image uses `object-contain` and empty state is centered.
- Extractor:
  - Add "Save as Outfit" checkbox and name input to `RefineStage`.
  - Implement API call to create outfit upon completion.
- Dockerfile:
  - Copy `example-data` directory to final image.
2026-02-18 03:05:10 +00:00
google-labs-jules[bot] 7f12e5f909 Fix Fitting Room overflow and add Save as Outfit to Extractor
- Fixed Fitting Room page overflow by constraining height and using ScrollArea for the Generated Looks section.
- Added "Save as Outfit" checkbox and input to the Refine stage of the Extractor dialog.
- Installed @radix-ui/react-checkbox and added Shadcn Checkbox component.
- Updated Dockerfile to include example-data directory in the final image.
2026-02-18 02:50:22 +00:00
google-labs-jules[bot] 58fd8fa537 Refactor poses and expressions to be fully database-driven
- Removed hardcoded `BUILTIN_POSES` and `BUILTIN_EXPRESSIONS` constants.
- Updated `PoseService` and `ExpressionService` to only list and delete items from the database.
- Removed the `type` field ('builtin' | 'custom') from `PoseItem` and `ExpressionItem`.
- Updated `GenerationService` to resolve pose and expression assets strictly from the database (`data/files`) instead of falling back to `public/`.
- Updated `Poses.tsx` and `Expressions.tsx` to remove "SYSTEM" vs "CUSTOM" UI distinction and enable deletion for all items.
- Updated `pose.test.ts` and created `expression.test.ts` to verify the new behavior.
- Fixed `generation.test.ts` to mock database calls correctly for pose/expression lookups and avoid polluting other tests.
2026-02-17 09:18:04 +00:00
google-labs-jules[bot] 14d23144c4 Refactor poses and expressions to be fully database-driven
- Removed hardcoded `BUILTIN_POSES` and `BUILTIN_EXPRESSIONS` constants.
- Updated `PoseService` and `ExpressionService` to only list and delete items from the database.
- Removed the `type` field ('builtin' | 'custom') from `PoseItem` and `ExpressionItem`.
- Updated `GenerationService` to resolve pose and expression assets strictly from the database (`data/files`) instead of falling back to `public/`.
- Updated `Poses.tsx` and `Expressions.tsx` to remove "SYSTEM" vs "CUSTOM" UI distinction and enable deletion for all items.
- Updated `pose.test.ts` and created `expression.test.ts` to verify the new behavior.
2026-02-17 04:59:16 +00:00
google-labs-jules[bot] 3908637ff5 feat: allow direct equipment upload
- Added `POST /api/equipments` endpoint to create equipment from an existing asset.
- Created `UploadEquipmentDialog` component with drag-and-drop and clipboard paste support.
- Added "Upload" button to the Equipments page header.
- Verified new equipment creation flow via frontend verification script.
2026-02-17 03:13:15 +00:00
google-labs-jules[bot] 5fb845914c feat: allow direct equipment upload
- Added `POST /api/equipments` endpoint to create equipment from an existing asset.
- Created `UploadEquipmentDialog` component with drag-and-drop and clipboard paste support.
- Added "Upload" button to the Equipments page header.
- Verified new equipment creation flow via frontend verification script.
2026-02-17 03:05:36 +00:00
google-labs-jules[bot] e66917d716 Refactor schema to use @default(ulid()) and remove manual assignment
- Update prisma/schema.prisma to use @default(ulid()) for all relevant models
- Remove manual ulid() calls from all service files
- Update list APIs to order by id descending
- Update AssetService tests to match new behavior
- Update AGENTS.md with new conventions
- Remove empty migration file (20260217022222_add_ulid_default)
2026-02-17 02:37:20 +00:00
google-labs-jules[bot] 384262e309 I have refactored ExtractorDialog to use DialogFooter and moved the stage actions. Here is a summary of the changes I made:
*   I added `DialogFooter` to `ExtractorDialog`.
*   I moved the action buttons (Start, Cancel, and the finish button) from `AnalyzeStage`, `SelectionStage`, and `RefineStage` to the `ExtractorDialog` footer.
*   I lifted the `selectedIndices` state from `SelectionStage` to `ExtractorDialog`.
*   I updated `AnalyzeStage` to show the status in the primary action button.
*   I enabled cancellation during analysis.
*   I ensured that `onSuccess` is called only when the user clicks the finish button in the Refine stage.
2026-02-16 11:34:08 +00:00
google-labs-jules[bot] b5296e8a08 Delete image-refine-vibe reference folder
- Removed the `image-refine-vibe` directory as the redesign based on it has been successfully implemented and approved.
2026-02-16 08:18:06 +00:00
google-labs-jules[bot] 180408b883 Redesign ExtractorDialog with vibe reference workflow and light mode
- Refactor `ExtractorDialog.tsx` into modular stages: `UploadStage`, `AnalyzeStage`, `SelectionStage`, `RefineStage`.
- Implement new UI flow: Upload -> Analyze -> Select -> Refine.
- Adapt "vibe" reference visuals to application's Light Mode theme (Slate/Cyan/Amber).
- Implement real-time status updates for analysis and refinement steps using backend streams.
- Add drag-and-drop and paste support for image upload.
- Visualize candidate selection grid and refinement progress.
- Implement manual confirmation for analysis start.
- Increase dialog size to `max-w-[98vw]` and `h-[95vh]`.
- Simplify title bar and adjust candidate grid cell size to 140px.
- Adjust refinement grid cell size to 160px.
2026-02-16 07:49:38 +00:00
google-labs-jules[bot] 39bcda5b0e Redesign ExtractorDialog with vibe reference workflow and light mode
- Refactor `ExtractorDialog.tsx` into modular stages: `UploadStage`, `AnalyzeStage`, `SelectionStage`, `RefineStage`.
- Implement new UI flow: Upload -> Analyze -> Select -> Refine.
- Adapt "vibe" reference visuals to application's Light Mode theme (Slate/Cyan/Amber).
- Implement real-time status updates for analysis and refinement steps using backend streams.
- Add drag-and-drop and paste support for image upload.
- Visualize candidate selection grid and refinement progress.
- Implement manual confirmation for analysis start.
- Increase dialog size to `max-w-[98vw]` and `h-[95vh]`.
- Simplify title bar and adjust candidate grid cell size to 140px.
2026-02-16 07:41:20 +00:00
google-labs-jules[bot] c3752a1c93 Redesign ExtractorDialog with vibe reference workflow and light mode
- Refactor `ExtractorDialog.tsx` into modular stages: `UploadStage`, `AnalyzeStage`, `SelectionStage`, `RefineStage`.
- Implement new UI flow: Upload -> Analyze -> Select -> Refine.
- Adapt "vibe" reference visuals to application's Light Mode theme (Slate/Cyan/Amber).
- Implement real-time status updates for analysis and refinement steps using backend streams.
- Add drag-and-drop and paste support for image upload.
- Visualize candidate selection grid and refinement progress.
2026-02-16 07:19:08 +00:00
google-labs-jules[bot] d4ddb43e00 test: update extraction service prompt expectations
Updates the test expectations in `src/service/extraction.test.ts` to match the actual prompt content used in `src/service/extraction.ts`. The previous test was asserting the presence of specific instructions regarding cropping artifacts that are no longer present in the codebase. The updated test now verifies the presence of the task name and the instruction to return only the image.
2026-02-16 06:33:05 +00:00
google-labs-jules[bot] 85e633d201 Docs: Revamp README with improved structure, correct tech stack, and restored logo
- Restored the centered logo `<div>` block at the top as requested.
- Replaced generic intro with "Why Forgery?", "Highlights", and "Core Concepts" sections derived from marketing copy.
- Corrected tech stack information (Bun, Hono, React, SQLite) to match the codebase.
- Replaced incorrect `curl` demos with a UI-focused "How It Works" workflow.
- Updated installation instructions to use `bun` commands.
- Added "Architecture Overview" to explain the modular pipeline.
2026-02-16 06:12:45 +00:00
google-labs-jules[bot] 017b4587f6 Docs: Revamp README with improved structure and correct tech stack
- Replaced generic intro with "Why Forgery?", "Highlights", and "Core Concepts" sections derived from marketing copy.
- Corrected tech stack information (Bun, Hono, React, SQLite) to match the codebase.
- Replaced incorrect `curl` demos with a UI-focused "How It Works" workflow.
- Updated installation instructions to use `bun` commands.
- Added "Architecture Overview" to explain the modular pipeline.
2026-02-16 06:07:57 +00:00
google-labs-jules[bot] 79fdf41915 fix(ui): improve delete button visibility and remove equipment labels in Fitting Room
- Add semi-transparent dark background to delete button for better visibility on light images.
- Remove equipment labels from generation cards in Fitting Room.
2026-02-16 06:02:43 +00:00
google-labs-jules[bot] e75377ef3b Update refine prompt and add crop padding to remove border artifacts 2026-02-16 05:23:57 +00:00
google-labs-jules[bot] 46cc219b58 Update refine prompt and add crop padding to remove border artifacts 2026-02-16 05:17:49 +00:00
google-labs-jules[bot] 54a168bcb4 Update refine prompt and add crop padding to remove border artifacts 2026-02-16 04:53:20 +00:00
google-labs-jules[bot] be3fc30f33 Update refine prompt to remove border artifacts 2026-02-16 04:39:54 +00:00
google-labs-jules[bot] bb49929a63 feat: Add example data seeding on startup
- Implement `ExampleDataService` to export/import Characters, Equipments, Poses, Expressions, and Generations.
- Add `generate-example` script to `package.json` to generate example data from current DB.
- Add startup logic in `src/index.ts` to seed example data if system is uninitialized and no data exists.
- Store system initialization state in `Setting` table.
- Add comprehensive tests for `ExampleDataService` in `src/service/example-data.test.ts` mocking `Bun` file API and `node:fs`.
- Refactor `src/service/example-data.ts` to use `Bun.file` and `Bun.write` for file I/O, ensuring better compatibility with Bun's test runner.
2026-02-16 04:19:27 +00:00
google-labs-jules[bot] efc3b9b554 feat: Add example data seeding on startup
- Implement `ExampleDataService` to export/import Characters, Equipments, Poses, Expressions, and Generations.
- Add `generate-example` script to `package.json` to generate example data from current DB.
- Add startup logic in `src/index.ts` to seed example data if system is uninitialized and no data exists.
- Store system initialization state in `Setting` table.
- Add comprehensive tests for `ExampleDataService` in `src/service/example-data.test.ts` mocking filesystem and database operations.
- Refactor `src/service/example-data.ts` to use default `node:fs` import for better test compatibility.
2026-02-16 04:09:40 +00:00
google-labs-jules[bot] 8986dd6b81 feat: Add example data seeding on startup
- Implement `ExampleDataService` to export/import Characters, Equipments, Poses, Expressions, and Generations.
- Add `generate-example` script to `package.json` to generate example data from current DB.
- Add startup logic in `src/index.ts` to seed example data if system is uninitialized and no data exists.
- Store system initialization state in `Setting` table.
- Add comprehensive tests for `ExampleDataService` in `src/service/example-data.test.ts` mocking filesystem and database operations.
2026-02-16 03:44:57 +00:00
google-labs-jules[bot] b04a011c2b feat: Add example data seeding on startup
- Implement `ExampleDataService` to export/import Characters, Equipments, Poses, Expressions, and Generations.
- Add `generate-example` script to `package.json` to generate example data from current DB.
- Add startup logic in `src/index.ts` to seed example data if system is uninitialized and no data exists.
- Store system initialization state in `Setting` table.
- Add comprehensive tests for `ExampleDataService` in `src/service/example-data.test.ts` mocking filesystem and database operations.
2026-02-16 03:38:04 +00:00
google-labs-jules[bot] dcfb885a01 feat: Add example data seeding on startup
- Implement `ExampleDataService` to export/import Characters, Equipments, Poses, Expressions, and Generations.
- Add `generate-example` script to `package.json` to generate example data from current DB.
- Add startup logic in `src/index.ts` to seed example data if system is uninitialized and no data exists.
- Store system initialization state in `Setting` table.
- Add comprehensive tests for `ExampleDataService` in `src/service/example-data.test.ts` mocking filesystem and database operations.
2026-02-16 03:32:05 +00:00
google-labs-jules[bot] 45f7d0b2ef fix: allow deleting equipment
- Add `DELETE /api/equipments/:id` endpoint.
- Add `deleteEquipment` method to `EquipmentService` which also cleans up associated assets and generation references.
- Implement delete action in `Equipments` page UI.
- Pass `actions` prop to `VibeCard` to enable context menu.
2026-02-16 02:55:09 +00:00
google-labs-jules[bot] b2f6869563 feat: add confirmation step to equipment extraction
Split the equipment extraction process into two phases:
1. Analyze & Split: Generates texture sheet and crops assets.
2. Refine & Save: Allows user to select which assets to keep before refining and saving.

- Refactored `src/api/extract.ts` to expose `/analyze` and `/refine` endpoints.
- Updated `src/ui/components/ExtractorDialog.tsx` to handle the multi-step flow and selection UI.
- Added `CandidateAsset` type and updated `ExtractionStatus` in `src/ui/types.ts`.
2026-02-16 02:39:37 +00:00
google-labs-jules[bot] 8e22e3808c feat: implement deletion and ui tweaks
- Added `deleteFile` to `FileService` and `deleteAsset` to `AssetService` to support file deletion.
- Implemented cascading deletion in `CharacterService` (delete looks -> delete character image -> delete character).
- Updated `GenerationService`, `PoseService`, and `ExpressionService` to delete associated image assets upon deletion.
- Added `DELETE /api/generations/:id` endpoint.
- Created `DropdownMenu` and `DeleteConfirmDialog` UI components.
- Updated `VibeCard` to include an internal `DropdownMenu` driven by a new `actions` prop.
- Updated `Characters`, `Poses`, and `Expressions` pages to use the new `VibeCard` `actions` prop for deletion.
- Updated `FittingRoom` page to use the `DropdownMenu` and `DeleteConfirmDialog` for deleting looks.
- Updated `CreateLookDialog` to enforce single selection for equipment categories.
- Added necessary tests adjustments.
2026-02-16 01:58:45 +00:00
google-labs-jules[bot] 0373a8b43c feat: implement character/asset deletion and ui tweaks
- Added `deleteFile` to `FileService` and `deleteAsset` to `AssetService` to support file deletion.
- Implemented cascading deletion in `CharacterService` (delete looks -> delete character image -> delete character).
- Updated `GenerationService`, `PoseService`, and `ExpressionService` to delete associated image assets upon deletion.
- Added `DELETE /api/generations/:id` endpoint.
- Created `DropdownMenu` and `DeleteConfirmDialog` UI components.
- Updated `Characters`, `Poses`, `Expressions`, and `FittingRoom` pages to use the new delete UI (3-dot menu + confirmation).
- Updated `CreateLookDialog` to enforce single selection for equipment categories.
- Added necessary tests adjustments.
2026-02-16 01:41:32 +00:00
google-labs-jules[bot] a433927de7 Optimize image uploads to 2k webp 2026-02-15 14:10:07 +00:00
google-labs-jules[bot] b228376598 Refactor backup tests to mock fs and prevent CI race conditions
- Update `src/service/backup.test.ts` to fully mock `node:fs` methods (`existsSync`, `renameSync`, `mkdirSync`, `rmSync`).
- This prevents the test from interacting with the real file system, eliminating the `ENOENT` race condition error observed in CI pipelines.
- Ensures the test is idempotent and safely verifies the service logic without side effects.
- Verified all 49 tests pass locally.
2026-02-15 07:26:59 +00:00
google-labs-jules[bot] a452d79802 Refactor backup/restore to Service Layer and add comprehensive tests
- Create `BackupService` in `src/service/backup.ts` to encapsulate tar stream creation and restore logic (db connection, fs operations).
- Refactor `src/api/backup.ts` and `src/api/restore.ts` to use `BackupService`.
- Add unit tests for `BackupService` in `src/service/backup.test.ts`.
- Add API tests for backup and restore endpoints in `src/api/backup.test.ts` and `src/api/restore.test.ts`.
- Maintain existing functionality: uncompressed tar streaming, safe restore with rollback.
2026-02-15 05:30:33 +00:00
google-labs-jules[bot] a8f1ae7686 Add backup and restore system (tar only)
- Implement `GET /api/backup` to stream `data` directory as a tarball using `node-tar`.
- Implement `POST /api/restore` to accept and extract tarballs to the `data` directory.
- Update `BackupRestoreDialog` to accept `.tar` files and remove gzip references.
- Ensure safe restore with database connection management and rollback.
- Disabled Gzip compression as requested since assets are already compressed WebP files.
2026-02-15 05:22:01 +00:00
google-labs-jules[bot] 588a48e7f9 Add backup and restore system with gzip support
- Implement `GET /api/backup` to stream `data` directory as a gzipped tarball using `node-tar`.
- Implement `POST /api/restore` to accept and extract gzipped tarballs to the `data` directory, handling database disconnection/reconnection and rollbacks.
- Add `BackupRestoreDialog` UI component for downloading backups and uploading restore files.
- Integrate backup dialog trigger into the AppSidebar logo.
- Ensure type safety and add temporary integration tests for verification.
2026-02-15 05:16:03 +00:00
google-labs-jules[bot] 7381400d79 Add backup and restore functionality
- Add `GET /api/backup` endpoint to stream `data` directory as a tar file.
- Add `POST /api/restore` endpoint to handle tar file upload and restore.
- Implement `BackupRestoreDialog` in the UI for user interaction.
- Integrate backup/restore dialog into the sidebar via the logo.
- Ensure safe restore with rollback on failure and database connection management.
2026-02-15 05:07:36 +00:00
google-labs-jules[bot] 6952100ad6 docs: update README with project details, setup instructions, and key features 2026-02-15 04:03:45 +00:00
google-labs-jules[bot] a9c754a6bd docs: update README with project details and setup 2026-02-15 03:53:58 +00:00
google-labs-jules[bot] 703badd7a2 feat: Add Dockerfile and production build support 2026-02-15 03:39:37 +00:00
google-labs-jules[bot] 8270715f5b Refactor data storage to data/ folder and remove env files
- Consolidate SQLite database and file storage into `data/` directory.
- Update `src/index.ts` to ensure `data` and `data/files` directories exist on startup.
- Update `src/db.ts` to use hardcoded `file:./data/data.db` path.
- Update `prisma.config.ts` to use absolute path to `data/data.db` for CLI compatibility.
- Update `.gitignore` to ignore `data/` directory entirely.
- Remove `.env.example` and `.env.test` as they are no longer needed.
- Fix TS2307 typecheck error by adding `*.webp` declaration to `src/env.d.ts`.
2026-02-15 03:02:24 +00:00
google-labs-jules[bot] bedf5670a8 Refactor data storage to data/ folder and remove env files
- Consolidate SQLite database and file storage into `data/` directory.
- Update `src/index.ts` to ensure `data` and `data/files` directories exist on startup.
- Update `src/db.ts` to use hardcoded `file:./data/data.db` path.
- Update `prisma.config.ts` to use absolute path to `data/data.db` for CLI compatibility.
- Update `.gitignore` to ignore `data/` directory entirely.
- Remove `.env.example` and `.env.test` as they are no longer needed.
2026-02-15 02:39:31 +00:00
google-labs-jules[bot] 261ba90ca4 feat: implement infinite scroll for all lists and set api limit to 20
- Added `useInfiniteScroll` hook using `react-intersection-observer`.
- Updated `PoseService` and `ExpressionService` to support pagination with mixed built-in and DB items.
- Updated `OutfitService` to support pagination.
- Updated `src/api/pose.ts`, `src/api/expression.ts`, `src/api/outfit.ts`, `src/api/character.ts` to accept `page`/`limit` (default limit 20).
- Refactored `Equipments`, `Characters`, `Poses`, `Expressions` pages to use infinite scroll.
- Refactored `CreateLookDialog` and `LoadOutfitDialog` to use infinite scroll.
- Updated `AGENTS.md` with new guidelines.
2026-02-14 15:18:02 +00:00
google-labs-jules[bot] 3e6ef3c7ab Refactor CreateLookDialog to use compact sidebar and 2-column grid
This change refines the `CreateLookDialog` layout to be more compact and user-friendly.

Key changes:
- Replaced the sidebar with a text-only vertical navigation bar (`w-32`) to maximize content space.
- Adjusted the equipment, pose, and expression grids to a fixed 2-column layout (`grid-cols-2`) for better item visibility and reduced density.
- Removed icons from sidebar buttons to streamline the interface.
- Updated `ScrollArea` components to correctly fill available height (`h-full`) to enable proper scrolling.
- Maintained the tabbed structure (Equipment, Pose, Expression, Instructions) and footer layout from the previous iteration.
2026-02-14 08:45:33 +00:00
google-labs-jules[bot] db22c3f271 Refactor CreateLookDialog to use compact sidebar and 2-column grid
This change refines the `CreateLookDialog` layout to be more compact and user-friendly.

Key changes:
- Replaced the sidebar with a text-only vertical navigation bar (`w-32`) to maximize content space.
- Adjusted the equipment grid to a fixed 2-column layout (`grid-cols-2`) for better item visibility and reduced density.
- Removed icons from sidebar buttons to streamline the interface.
- Maintained the tabbed structure (Equipment, Pose, Expression, Instructions) and footer layout from the previous iteration.
2026-02-14 08:26:08 +00:00
google-labs-jules[bot] aecad49192 feat: add expression customization
- Rename public/expressions files to expression_*.webp
- Add Expression model to Prisma schema
- Add expression field to Generation model
- Implement ExpressionService and API
- Update GenerationService to support expressions in AI prompt
- Add Expressions page and dialogs
- Update CreateLookDialog to include expression selector
- Add Expressions to sidebar and routing
2026-02-14 06:36:45 +00:00
google-labs-jules[bot] 6738e7f125 feat: add custom poses support
- Moved builtin poses to `public/poses`
- Added `Pose` model to schema and updated `Generation` model
- Created Pose Service and API
- Added Poses page to Frontend
- Updated CreateLookDialog to allow pose selection
- Updated Generation Service to handle pose instructions
- Added tests for Pose Service and Generation Service update
2026-02-14 04:51:24 +00:00
google-labs-jules[bot] a9dfa41083 feat: single select equipment category and updated fitting room header
- Refactored `Equipments` page to use single category selection.
- Updated `FittingRoom` page to use `PageHeader` component.
- Added `backButton` prop to `PageHeader` component to support navigation controls.
- Removed "Manage looks for" hint text from Fitting Room header.
2026-02-13 13:17:55 +00:00
google-labs-jules[bot] 50c0b0a943 Enhance extraction prompt for detail preservation
- Updated texture generation and refinement prompts to emphasize capturing and maintaining all details, materials, and patterns.
- Reverted analyze prompt to original state to avoid over-constraint.
2026-02-13 11:40:57 +00:00
google-labs-jules[bot] d18c4e771c Return texture sheet to client in extraction flow
- API: Emit 'texture_generated' event with sheet image and grid dimensions
- UI: Render generated texture sheet with grid overlay in ExtractorDialog
- Service: Expose getGridDimensions method publicly
2026-02-13 11:12:34 +00:00
google-labs-jules[bot] c887f6ebf0 Return texture sheet to client in extraction flow
- API: Emit 'texture_generated' event with sheet image and grid dimensions
- UI: Render generated texture sheet with grid overlay in ExtractorDialog
- Service: Expose getGridDimensions method publicly
2026-02-13 09:26:36 +00:00
google-labs-jules[bot] 2670930334 Refactor extraction to use grid-based splitting
- Removed AI-based bounding box detection
- Implemented deterministic grid calculation (1x3, 2x2, 2x3, 3x3)
- Updated extraction prompts to request specific grid layouts and white background
- Removed color assignment logic
- Updated ExtractedAsset interface
- Updated API to stream grid splitting status instead of detection status
- Updated tests to verify new logic and mock removal of color fields
- Removed "Detect Bounding Boxes" step from ExtractionFlowDesigner UI
2026-02-13 09:18:12 +00:00
google-labs-jules[bot] cfe624c5aa Refactor extraction to use grid-based splitting
- Removed AI-based bounding box detection
- Implemented deterministic grid calculation (1x3, 2x2, 2x3, 3x3)
- Updated extraction prompts to request specific grid layouts and white background
- Removed color assignment logic
- Updated ExtractedAsset interface
- Updated API to stream grid splitting status instead of detection status
- Updated tests to verify new logic and mock removal of color fields
2026-02-13 08:37:03 +00:00
google-labs-jules[bot] cf03f3e3d1 feat: switch details dialogs to top-down layout
- Updated `LookDetailsDialog` to use a top-down layout (image top, details bottom).
- Updated `EquipmentDetailsDialog` to use a top-down layout (image top, form bottom).
- Ensured images are contained and details are scrollable.
2026-02-13 07:58:03 +00:00
google-labs-jules[bot] f9407b0f27 feat: add clickable details dialogs for looks and equipment
- Added `LookDetailsDialog` to display full look image, prompt, and used equipment thumbnails.
- Updated `FittingRoom` page to open `LookDetailsDialog` on look click.
- Added `EquipmentDetailsDialog` to display full equipment image and allow editing name/description.
- Updated `Equipments` page to open `EquipmentDetailsDialog` on equipment click.
- Updated `GenerationService` to include equipment images in look details.
- Added `updateEquipment` to `EquipmentService` and `PATCH /equipments/:id` API endpoint.
- Added unit tests for equipment update functionality.
2026-02-13 07:52:30 +00:00
google-labs-jules[bot] f9919107dd fix: make page header background opaque with background color 2026-02-13 03:05:05 +00:00
google-labs-jules[bot] 91303941c1 chore: remove verification files and update AGENTS.md 2026-02-13 02:50:30 +00:00
google-labs-jules[bot] 5192a4a9b4 fix: make page header background transparent and add separator 2026-02-13 02:47:26 +00:00
google-labs-jules[bot] a33545be6e feat: Add Outfit system and update docs
- Added `Outfit` model and migration.
- Implemented backend service and API for outfits.
- Added frontend support for outfits management (create, list, delete, load, save).
- Updated `AGENTS.md` with Prisma migration guidelines.
2026-02-11 09:20:40 +00:00
google-labs-jules[bot] d630c6cc59 style: update VibeCard image style
- Update `src/ui/components/VibeCard.tsx` to use `object-cover object-top` for the image, ensuring it fills the card area nicely.
2026-02-10 15:00:36 +00:00
google-labs-jules[bot] c51a29d0ca refactor: extract VibeCard component
- Create `src/ui/components/VibeCard.tsx` as a reusable component for the "vibe coded" card UI.
- Refactor `src/ui/pages/Characters.tsx` to use `VibeCard`.
- Refactor `src/ui/pages/Equipments.tsx` to use `VibeCard`.
2026-02-10 14:54:02 +00:00
google-labs-jules[bot] 9b7cc76cab feat: update character list UI with vibe coded design
- Update `CharacterService` to include generation counts (`_count.generations`) in the list response.
- Update `CharacterAPI` to map `_count.generations` to a flat `looksCount` field.
- Add new CSS classes (`clip-path-slant`, `clip-path-hex`, `scanline`, `font-display`) to `src/ui/index.css`.
- Revamp `src/ui/pages/Characters.tsx` to use the new card design with color bars, looks count, and improved visuals.
- Replaced "System // Operator_Select" with "System // Character_Select", "Select Operator" with "Characters", and "UNITS" with "COUNT".
- Remove `src/ui/CharacterListDemo.tsx`.
2026-02-10 14:15:10 +00:00
google-labs-jules[bot] 3d4caeb971 feat: update character list UI with vibe coded design
- Update `CharacterService` to include generation counts (`_count.generations`) in the list response.
- Update `CharacterAPI` to map `_count.generations` to a flat `looksCount` field.
- Add new CSS classes (`clip-path-slant`, `clip-path-hex`, `scanline`, `font-display`) to `src/ui/index.css`.
- Revamp `src/ui/pages/Characters.tsx` to use the new card design with color bars, looks count, and improved visuals.
- Remove `src/ui/CharacterListDemo.tsx`.
2026-02-10 13:22:35 +00:00
google-labs-jules[bot] 272c06c585 feat: add user prompt to generation
- Update `Generation` model to include `userPrompt`.
- Update `GenerationService` to accept and use `userPrompt` in AI prompt.
- Update `Generation` API to accept `userPrompt`.
- Update `CreateLookDialog` to include an input for `userPrompt`.
- Add tests for `userPrompt` functionality.
- Install `dotenv` for prisma migrations.
2026-02-10 02:34:01 +00:00
google-labs-jules[bot] de31b29404 Rename "Outfit" to "Look" in Fitting Room
Renames the terminology in the Fitting Room feature from "Outfit" to "Look" to better align with future feature plans (where "Outfit" will refer to equipment combinations).

Changes include:
- Renaming `CreateOutfitDialog.tsx` to `CreateLookDialog.tsx`.
- Updating the route from `/characters/:id/outfits` to `/characters/:id/looks`.
- Updating all UI text and internal variable names in the affected components.
- Updating navigation in `Characters.tsx`.
2026-02-10 01:54:28 +00:00
google-labs-jules[bot] aba5b72659 Fix sticky header and add generation model selector to settings 2026-02-10 01:23:23 +00:00
google-labs-jules[bot] 4f0977c33e Refactor GenerationService to use UnifiedAIService.generateImage with OpenAI Responses API support 2026-02-10 01:07:28 +00:00
google-labs-jules[bot] d260dbb198 feat: Add AI provider settings and update UI layout
- Add `Setting` model to Prisma schema for storing API keys and model configs.
- Implement `SettingService` and API for managing application settings.
- Refactor `src/service/ai.ts` to `UnifiedAIService` supporting dynamic OpenAI and Google provider selection.
- Add Settings page (`src/ui/pages/Settings.tsx`) to configure providers and default models.
- Update `AppSidebar` to include Settings, use text-under-icon style, and decrease sidebar width to 4.5rem.
- Update `Layout` to move "Forgery" title to header and add GitHub link.
- Add unit tests for `SettingService` and `UnifiedAIService`, mocking database interactions to resolve test environment issues.
- Fix API URL path for settings in frontend client.
2026-02-09 14:58:16 +00:00
google-labs-jules[bot] ee4ab2d9d1 feat: Add AI provider settings and update UI layout
- Add `Setting` model to Prisma schema for storing API keys and model configs.
- Implement `SettingService` and API for managing application settings.
- Refactor `src/service/ai.ts` to `UnifiedAIService` supporting dynamic OpenAI and Google provider selection.
- Add Settings page (`src/ui/pages/Settings.tsx`) to configure providers and default models.
- Update `AppSidebar` to include Settings, use text-under-icon style, and increase icon size.
- Update `Layout` to move "Forgery" title to header and add GitHub link.
- Add unit tests for `SettingService` and `UnifiedAIService`.
2026-02-09 14:28:31 +00:00
google-labs-jules[bot] f052e1bf8f feat: add character creation and fitting room ui
- Implemented `Character Creation` flow with dialog and image upload.
- Implemented `Fitting Room` page with split view (Character Preview / Generations).
- Implemented `Create Outfit` dialog with equipment filtering and selection.
- Added `POST /api/generations` to handle outfit generation.
- Updated `AIService` to support complex prompt structure with interleaved text and images.
- Updated `CharacterService` to support fetching single character.
- Added frontend routes and components.
- Added relevant tests.
- Fixed lint issues and updated UI sizing to 150px.
2026-02-09 08:56:04 +00:00
google-labs-jules[bot] cc024a0aea feat: add character creation and fitting room ui
- Implemented `Character Creation` flow with dialog and image upload.
- Implemented `Fitting Room` page with split view (Character Preview / Generations).
- Implemented `Create Outfit` dialog with equipment filtering and selection.
- Added `POST /api/generations` to handle outfit generation.
- Updated `AIService` to support complex prompt structure with interleaved text and images.
- Updated `CharacterService` to support fetching single character.
- Added frontend routes and components.
- Added relevant tests.
2026-02-09 00:10:59 +00:00
google-labs-jules[bot] 7f837ead71 feat: add sidebar, characters page, and equipments page with filter
- Add `react-router-dom` for client-side routing.
- Add `shadcn` components: `Sidebar`, `Dialog`, `Button`, `ScrollArea`, `Avatar`, `Badge`, `Card`, `Sheet`, `Tooltip`, `Separator`, `Input`, `Label`.
- Implement `AppSidebar` with navigation to Characters and Equipments.
- Implement `Characters` page displaying character avatars.
- Implement `Equipments` page with:
  - Horizontal scrollable category filter (multi-select).
  - Equipment grid layout.
  - "Extract Equipment" button opening a `Dialog` (refactored from `Extractor` component, maintaining original UI design).
  - Added support for pasting images directly into the Extractor Dialog.
- Update `Equipment` API and Service to support filtering by multiple categories.
- Add database index to `Equipment` table on `[category, subCategory]`.
- Refactor `App.tsx` and `Layout.tsx` to use the new routing and sidebar structure.
- Remove legacy `Stash` and `Extractor` components.
2026-02-08 14:39:35 +00:00
google-labs-jules[bot] 6991642f69 feat: add sidebar, characters page, and equipments page with filter
- Add `react-router-dom` for client-side routing.
- Add `shadcn` components: `Sidebar`, `Dialog`, `Button`, `ScrollArea`, `Avatar`, `Badge`, `Card`, `Sheet`, `Tooltip`, `Separator`, `Input`, `Label`.
- Implement `AppSidebar` with navigation to Characters and Equipments.
- Implement `Characters` page displaying character avatars.
- Implement `Equipments` page with:
  - Horizontal scrollable category filter (multi-select).
  - Equipment grid layout.
  - "Extract Equipment" button opening a `Dialog` (refactored from `Extractor` component but maintaining original UI design).
- Update `Equipment` API and Service to support filtering by multiple categories.
- Add database index to `Equipment` table on `[category, subCategory]`.
- Refactor `App.tsx` and `Layout.tsx` to use the new routing and sidebar structure.
- Remove legacy `Stash` and `Extractor` components.
2026-02-08 14:00:47 +00:00
google-labs-jules[bot] bc3102a660 feat: add sidebar, characters page, and equipments page with filter
- Add `react-router-dom` for client-side routing.
- Add `shadcn` components: `Sidebar`, `Dialog`, `Button`, `ScrollArea`, `Avatar`, `Badge`, `Card`, `Sheet`, `Tooltip`, `Separator`, `Input`, `Label`.
- Implement `AppSidebar` with navigation to Characters and Equipments.
- Implement `Characters` page displaying character avatars.
- Implement `Equipments` page with:
  - Horizontal scrollable category filter (multi-select).
  - Equipment grid layout.
  - "Extract Equipment" button opening a `Dialog` (refactored from `Extractor` component).
- Update `Equipment` API and Service to support filtering by multiple categories.
- Add database index to `Equipment` table on `[category, subCategory]`.
- Refactor `App.tsx` and `Layout.tsx` to use the new routing and sidebar structure.
- Remove legacy `Stash` and `Extractor` components.
2026-02-08 12:26:17 +00:00
google-labs-jules[bot] 44291666e7 feat: replace Category table with string fields in Equipment
- Removed Category table from schema.prisma
- Updated Equipment table to use string `category` and `subCategory`
- Created `src/lib/categories.ts` with hardcoded categories
- Updated `ExtractionService` to use hardcoded categories and "Others" fallback
- Updated `Extract` API to stream `asset_refined` events
- Updated Frontend to handle new data structure and SSE events
- Updated tests to reflect changes
2026-02-08 09:10:22 +00:00
google-labs-jules[bot] f903873f16 Remove unused global mocks from extraction service tests
- Removed unused `mock.module` calls for `file`, `category`, `asset`, and `equipment` services in `src/service/extraction.test.ts`.
- These mocks were causing global pollution and interfering with `src/service/file.test.ts`, causing it to fail.
- Verified that `extraction.test.ts` and `file.test.ts` now pass independently and together.
2026-02-08 05:19:33 +00:00
google-labs-jules[bot] ed54192f4a refactor: Convert service methods from static to instance methods
- Refactored `AssetService`, `CategoryService`, `CharacterService`, `EquipmentService`, `FileService`, `ExtractionService`, `GenerationService` to use instance methods.
- Exported singleton instances for each service.
- Updated all API routes to use the exported service instances.
- Updated all tests to use and mock service instances.
- Updated `AGENTS.md` to reflect the new service layer pattern.
- Verified changes with lint, format, typecheck, and test.
2026-02-08 04:13:21 +00:00
google-labs-jules[bot] 36d917eadd Refactor Hono API routes for typed RPC client & lint fixes 2026-02-08 03:05:02 +00:00
google-labs-jules[bot] c944cff76b Fix lint/typecheck/test issues and refactor UI types
- Add `.env` to `.gitignore` and create `.env.example`.
- Install `@modelcontextprotocol/sdk` to fix type errors.
- Fix linting issues (unused vars, error handling) in `src/api/extract.ts` and `src/service/ai.ts`.
- Fix typecheck errors in `src/service/file.ts` (Buffer types) and `src/service/ai.ts` (GenAI types).
- Update `tsconfig.json` to use React JSX and skip lib checks.
- Fix tests in `src/service/asset.test.ts` (mocking `Bun.write`) and `src/api/equipment.test.ts`.
- Refactor `src/ui/components/Stash.tsx` and `src/ui/components/Extractor.tsx` to infer types from Hono client.
- Simplify `src/ui/types.ts` by removing redundant types.
2026-02-08 01:58:12 +00:00
google-labs-jules[bot] 7194663eb5 feat: Integrate Extraction UI Demo with Hono Backend
- Migrated frontend demo to `src/ui` as a Bun-native React app.
- Implemented `ExtractionService` with 5-step AI extraction flow (Analyze, Generate, Detect, Crop, Refine).
- Implemented `FileService` for image processing and storage using `sharp`.
- Implemented `EquipmentService` and `CategoryService` for managing game assets.
- Set up Hono RPC (`hc`) for type-safe frontend-backend communication.
- Configured `Bun.serve` to handle both API routes and frontend static files/SPA routing.
- Added `zod` validation for API endpoints.
- Updated `AGENTS.md` with new architecture details.
2026-02-07 14:45:29 +00:00
google-labs-jules[bot] 5f8de096a6 feat: backend infra setup with prisma, services, and apis
- Added Prisma schema with Asset, Character, Equipment, Generation, Category models
- Configured SQLite with LibSQL adapter
- Implemented Service layer (src/service) with unit tests
- Implemented API layer (src/api) with Hono and integration tests
- Added static file serving for assets
- Configured CI/CD with GitHub Actions
- Added Developer Guide (AGENTS.md)
- Removed Format Check from CI
2026-02-07 13:02:46 +00:00