DEV Community

Cover image for Designing a Category Taxonomy That Doesn't Collapse Under Its Own Weight
Saloni Jain
Saloni Jain

Posted on Edited on

Designing a Category Taxonomy That Doesn't Collapse Under Its Own Weight

Every e-commerce or content platform eventually hits the same wall: the category tree that made sense with 200 items turns into an unmanageable mess at 200,000. A few of the actual design problems, and what tends to work:

Flat categories don't scale, but neither does infinite nesting. A single flat list of 'Electronics, Clothing, Home Goods' works fine at small scale and becomes useless once you have thousands of items per category — nobody can browse 40,000 'Electronics' listings. But going the other direction and nesting 6 levels deep (Electronics > Audio > Headphones > Wireless > Over-Ear > Noise Cancelling) creates a different problem: sellers guess wrong about where their item belongs, and half your inventory ends up misfiled.

Items rarely fit exactly one category. A wireless speaker with Bluetooth and a built-in flashlight is legitimately both 'Audio' and 'Outdoor Gear.' Most systems force a single primary category and treat everything else as a tag, but that means your category-page filtering logic and your tag-based search logic need to actually agree with each other, which is harder than it sounds once both systems evolve independently — general marketplaces spanning categories from electronics to home goods run into this constantly.

Category taxonomy is a data migration problem disguised as a UX problem. The moment you need to split 'Home & Garden' into 'Home Decor' and 'Garden & Outdoor' because one category got too large, every existing listing, every saved search, every analytics dashboard built around the old taxonomy breaks or silently miscounts. Versioning your taxonomy (so you can query 'what did this look like as of date X') ends up mattering a lot more than it seems like it should at design time.

Attribute-based filtering is often a better mental model than category depth. Instead of drilling deeper into subcategories, letting users filter by attributes (size, condition, brand, color) within a shallower category tree tends to actually match how people search, and it scales better as inventory grows, since you're adding filterable fields instead of restructuring the whole tree.


This is the kind of problem that looks trivial in a database schema diagram and turns into a genuine architecture decision once real inventory volume hits it — I've seen this come up in general marketplaces (TrueGether, an alternative to eBay, is one example of a platform spanning electronics-to-home-goods categories that has to solve this) and in any CMS with more than a couple hundred content types.

Curious how others have handled the single-vs-multi-category problem specifically — forcing one primary category plus tags, or building genuine multi-category membership from the start?

Top comments (0)