- 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.
About
Forgery is a local-first application designed to help you build a digital wardrobe and generate stunning new looks for your characters. It specializes in two key workflows: extracting equipment from existing images and fitting that equipment onto your characters.
Unlike traditional character generators, Forgery focuses on consistency and customization. You start by uploading a base image for your character, then use the powerful "Fitting Room" to generate new variations (Looks) by mixing and matching extracted equipment, poses, and expressions.
Features
- Equipment Extraction: Analyze images to identify and extract equipment (outfits, weapons, accessories) into your library.
- Look Generation: Generate new images of your character wearing selected equipment.
- Character Management: Organize your characters and their base reference images.
- Fitting Room: The core studio interface for combining characters, equipment, poses, and expressions into new Looks.
- Pose & Expression Control: Fine-tune your generation with a library of poses and facial expressions.
- Local & Private: All data, including your image library and generated results, is stored locally on your machine.
- Flexible AI Integration: seamlessly switch between Google Gemini and OpenAI models for different stages of the extraction and generation pipeline.
Prerequisites
Getting Started
1. Clone the Repository
git clone https://github.com/yourusername/forgery.git
cd forgery
2. Install Dependencies
bun install
3. Initialize the Database
Forgery uses a local SQLite database. Run the following command to set up the schema:
bun run prisma migrate dev
4. Run the Application
Start the development server:
bun run dev
Open your browser and navigate to http://localhost:3000.
Running with Docker
You can also run Forgery using Docker Compose.
docker compose up -d
The application will be available at http://localhost:3000.
Data (database and generated files) will be persisted in the ./data directory on your host machine.
Configuration
Forgery requires API keys for AI generation services (Google Gemini and/or OpenAI).
- Launch the application and go to the Settings page (accessed via the sidebar).
- Enter your Google API Key and/or OpenAI API Key.
- Configure your preferred models for text and image generation.
- (Optional) Customize the "Extraction Flow" to choose specific models for different steps of the asset analysis and generation process.
