Wardrobe: The Local-First AI Closet That Turns Photos Into a Living Asset Pipeline

Behind the scenes, one upload becomes a staged job, a reviewed cutout, a modeled preview, and a searchable library that never leaves your machine.

9 min read • View on GitHub • More from tandpfun

A desktop machine transforms a messy stack of clothing photos into clean garment cutouts, color swatches, and an organized grid of wardrobe assets. The scene explains Wardrobe as a production pipeline for personal fashion data, not just a gallery app.
Wardrobe treats clothing photos like assets that can be processed, reviewed, and stored locally.
Key Takeaways

From Closet Photos to a Managed Asset Pipeline

Most closets are digital junk drawers. You have photos, screenshots, and maybe a few tags, but nothing that behaves like a working inventory. Wardrobe starts from a sharper premise: clothing photos are raw material, and the real job is to turn them into assets you can search, review, and reuse.

That is why the repo feels closer to a production system than a consumer app. One upload does not end in a thumbnail. It moves through staged jobs, local persistence, image cleanup, modeled previews, and a permanent record in data/.

Why This Is Local-First, Not SaaS-First

Wardrobe uses cloud AI for the heavy lifting, but it does not turn your closet into someone else’s database. The source library and processed images stay on disk. In practical terms, that means the app can feel private, durable, and inspectable instead of opaque.

The app uses cloud inference as a processing layer while the durable wardrobe lives locally in a file-backed store.

WorkflowWhere the data livesHow the AI is usedHuman review?Best forMain tradeoff
Manual photo foldersYour device, but unstructuredNoneNoQuick dumping of picturesSearch and reuse are weak
Generic cloud closet appsMostly on a vendor serverOften for tags or recommendationsSometimesEasy sync across devicesPrivacy and long-term ownership are limited
WardrobeLocal files in data/ plus generated assetsFor extraction and modeled previewsYes, between stagesPrivate, structured clothing librariesYou still manage a local app and its imports

See the original post → Quick start ⚠️ The importer stays disabled until you add OPENAIAPIKEY to .env and place a PNG reference photo of yourself at data/model-reference.png.

Project README, Repository documentation · tandpfun/wardrobe README

The Heart of the Repo: A Job State Machine

The real engine sits in scripts/import-job-api.mjs. It creates a UUID-backed job directory inside data/, then moves the upload through three stages: crop, garment, and modeled. Each step writes intermediate files, which means the import is not just a transient operation. It is a sequence of durable artifacts.

// Conceptual shape of the import flow
upload -> crop detection -> garment cutout -> modeled preview
        -> save each stage under data/<uuid>/
        -> expose progress through Vite middleware
        -> wait for human approval between stages

That design matters because it turns the import into a recoverable process. If a stage fails, the job still has a footprint. If the review approves a result, the next stage can reuse the saved output instead of starting from scratch.

A single upload moves through three transparent chambers labeled crop, garment, and modeled. Each chamber saves an artifact to a local folder, and a reviewer hand approves progression between stages. The image explains the job state machine and its human-in-the-loop checkpoints.
Every stage writes a new artifact to the local job directory, so the pipeline is both inspectable and resumable.

Why Human Review Is Built Into the Flow

Wardrobe does not pretend the AI is the authority. The UI maps backend state into readable statuses, then stops for approval at the points where judgment matters. That makes the product feel less like automation theater and more like a careful production tool.

This is a strong product choice. Automatic systems are fast, but they are often brittle when the output becomes personal. Clothing is personal. A review gate turns the pipeline from a guess into a conversation.

The Frontend Treats Images Like Data, Not Decoration

The frontend is not a pile of cards and thumbnails. It uses image optimization, canvas-based palette extraction, and responsive rendering so that garments remain useful as the library grows. The UI is built around the assets themselves, not just around a catalog view.

// The browser helps turn pixels into metadata
const palette = extractPalette(image)
const swatches = sampleImageColor(image)
const thumbnail = OptimizedImage({ src, widths: [240, 480, 960] })

// Result: faster browsing and richer filtering without a separate media backend

That matters because Wardrobe is not trying to be a prettier photo wall. It is trying to make each item queryable. Color, cutout, modeled preview, and source photo all become facets of the same record.

The Agent-Ready Repo Is the Quietly Radical Part

The .agents directory is a clue about the project's intent. Wardrobe is not only organized for humans reading the codebase. It is organized so an AI tool can operate the same workflows through structured scripts and skills.

Import with Codex This repo includes two Codex skills: one imports clothes and generates modeled item photos; the other styles complete outfits and generates a modeled lookbook.

Project README, Repository documentation · tandpfun/wardrobe README

That is more than a convenience layer. It suggests a future where software exposes a clear operating surface for both people and agents. The repo keeps that interface small, explicit, and close to the filesystem.

Wardrobe vs. the Usual Closet App

PatternWhat it optimizes forWhat you give up
Manual closet foldersSimplicitySearch, structure, and scale
Typical closet SaaSConvenience and syncOwnership and local control
WardrobePrivate structure plus AI assistanceA local app workflow and import discipline

The broader lesson is bigger than fashion. Personal software is drifting toward a split architecture: local state, cloud inference, and human oversight. Wardrobe is a clean example of that pattern because it does not hide the machinery. It makes the machinery the product.