T
15

Hit 150 reusable component variants in my design system library and suddenly realized I'd created a monster

I was so proud of building out all those button states and icon sizes for our e-commerce checkout flow, but then I tried to onboard a new front-end dev and watching him scroll through 30 dropdown variations just to pick a simple input field made me question every life choice I've made, has anyone else accidentally over-engineered their library to the point it's less useful than starting from scratch?
3 comments

Log in to join the discussion

Log In
3 Comments
matthew_morgan
Have you tried locking down your core components and putting everything else in a separate experimental section? That’s what helped me when my library got bloated. I started treating the most used 20% as the real library and everything else as just extras you gotta dig for. You might also want to run a quick audit on what actually gets used in production versus what you just built because it looked cool. Trust me, cutting out the low usage stuff makes onboarding way less painful.
6
the_blake
the_blake1mo ago
Started doing exactly that a few years back when my own project was getting out of hand. I literally made a new folder called “core” and moved over the 10 or so functions that got called every single day, then shoved everything else into a “vault” folder no new dev even needed to peek at unless they got curious. Ended up trimming about 40% of the codebase once I actually looked at usage stats and saw stuff I wrote drunk at 2am never got touched. Made a mental note to kill any feature that didn't hit 5% usage over a couple months, and onboarding went from a two day nightmare to a quick afternoon chat.
10
tyler822
tyler8228d agoMost Upvoted
That approach makes a lot of sense. I had a similar mess a while back where my personal project just kept growing and nobody could find the important stuff. What really worked for me was taking a weekend and literally renaming the most critical half dozen files with a "core_" prefix so they'd sort right to the top of the folder. Then I tagged everything else with a date and put it in an archive folder. It forced me to actually ask if each piece still mattered. After three months I deleted anything nobody had opened, which ended up being nearly 60 percent of the code. It sounds harsh but it saved me hours every week because new people could jump right into the good stuff without wading through dead weight.
5