hrlw.dev

Case study / iOS

Wardrobe

A digital closet that builds outfits for the occasion.

Wardrobe is an iOS app I built for myself. I add each piece I own with its color, brand, size and style, then pick an occasion such as business casual or a dinner date and the app assembles an outfit from what is actually in the closet.

Status: working personal app, running on my own phone. It is not on the App Store.

01 How outfits are chosen

Outfit selection is a rules engine, not a language model. Every piece carries a category, a formality rating from 1 to 5, a warmth level, a fit and a color.

  • The closet is filtered to the occasion’s formality range before anything is combined.
  • Complete outfits are assembled: top, bottom and shoes, or a dress and shoes, with an optional jacket or coat.
  • Each combination is scored. Pieces close to the occasion’s target formality score higher; stacked patterns, clashing accent colors and mixed warmth are penalised; wide bottoms score better with a less voluminous top; recently worn pieces rank lower.
  • A little randomness keeps “show another” from repeating itself.

Because suggestions are built only from real pieces and explicit rules, the app never invents clothes you do not own.

02 Import from a product link

Typing every piece in by hand is tedious, so the add screen accepts a product page link. The app reads the page on the phone, with no server and no API key. It looks for the structured product data most shops publish for search engines, and falls back to the data a page embeds for itself. A small set of keyword rules then turns the name, material and description into the app’s fields.

For a pleated wide-leg trouser, for example, that yields category bottom, relaxed fit, formality 3, the brand, the material, and the product photo. I still enter the size and confirm the color, since a page lists every colorway.

03 Built with

  • SwiftUI and SwiftData, with all data stored on the device
  • PhotosUI for item photos
  • XcodeGen to generate the Xcode project from one config file

04 Next

An optional language-model step could pick among the top-scoring outfits and explain the choice in a sentence. The rules would still decide what is allowed.