ITWYW (currently in beta), is a pretty standard CMS with a relational DB underneath. Like Wordle, it's best experienced on a desktop or tablet. First class objects are Clothing Items and Rules. Outfits = Clothing Items + Rules. Outfits can be randomnly or user generated and saved. The rest, as they say, is metadata...
Rules are created based on temperature range, suitability, style, and - if a specific piece of clothing is on view - subcategory. Each rule defines what to exclude based on subcategories, materials, and colors. Accessories, shoes, and bags are evaluated on suitability & style only.
Rules are user-generated, so there are no baked-in rules except for practical things like not pairing a skirt with a pair of pants...
For "Wear With" users can add occasion and/or temperature conditions to limit suggested outfits, and toggle Rules on or off to see what suggestions are returned. The temperature options always include one for whatever the weather is right now.
To create outfits, an initial query is made on subcategory exclusions to establish valid (parent) categories [top, bottom, dress/jumpsuit, pants, skirt]. From there, outfits are constructed from a pre-set template of [valid categories] + shoe + bag + coat + accessory. (If the selected top is not a sweater, and there are no temperature exclusions prohibiting it, a cardigan may be added at random.)
The components of an outfit are built by taking a seed category and building around it. If an item is on view, its category becomes the seed. If not, the seed is randomly selected from [valid categories].
If the seed is a dress, all top & bottom subcategories are automatically excluded. If not, a top and bottom category are selected at random and subcategories from non-selected categories are excluded. Now we have a randomly generated, valid outfit to apply our rules to.
In the event that the random seed & rules result in no valid clothing items returning for a particular category, an alternative [valid category] is selected. The chances of nothing coming back are slim, but it depends on how many rules are in place and how much inventory belongs to each category. Rules should be set up thoughtfully and sparingly.
The more rules a user creates, the less varied the outfit choices will be, which is why the 'Random' option exists.
The app currently allows for multiple users with separate wardrobes. Users can browse and save outfits, and like & comment on them. If users in their circle allow it, friends can suggest outfits for each other.
Future plans include a "swap" feature where users designate clothes they would be willing to exchange for clothes owned by friends, and a share feature where friends can mark items as "lendible." Lendible items from friends' closets can be set to show up in your own generated outfits.
-> ITWYW is built on Rails 5.0.7/Ruby 2.6.3
-> App was originally built in 2019 and refactored in October, 2021
-> Images are stored in S3 and managed via Paperclip
-> Database is MariaDB
-> Caching is brought to you by Redis via Redis Enterprise Cloud on AWS
-> Real-time weather forecasting uses the Open Weather Ruby Client
-> Metrics were implemented (in a rush) using Google Charts
-> Design is responsive (more or less) using standard @media tags
-> Code is managed via git on GitHub
-> Logs are managed by Papertrail
-> The app runs on Heroku 'hobby' dynos on a tiered plan shared with a custom social media platform called Pixelo. It is likely not scalable beyond a few dozen users.