Inspiration

Legos are one of the most influential and successful toys of all time. But for many (myself included!), the sets we once owned now lay to rest in a dusty bin; unsorted and unnoticed, waiting for someone to rebuild what once was. So for anyone who wants to breathe new life into their old sets, the Lego Set Rebuilder application is the perfect program to use.

What it does

The Lego Set Rebuilder application lets you quickly and simultaneously rebuild your old sets. To start, find your bricks and the name of one set you previously owned. Go to the Add Set menu, input the Set ID, and start sorting! Take a brick, type out its ID (found on the brick), and the application will tell you which set it belongs to. Add it to that set's pile in real life, and you're good!

While it may seem slow to have to lookup each piece by it's ID, it's actually faster that way. While basic Lego bricks may have intuitive names, such as "Blue 2x4 Brick", it's pretty unlikely that you would know the name of "Tan Slope 45° 3 x 4 Double / 33°" off the top of your head (this is a real piece!). On top of that, some parts have too vague of a name to properly find them at all. The part ID can be found on any Lego brick, no matter the shape, color, or size, making it the fastest way to lookup each piece.

As you enter more pieces, the application can also determine the other sets you had. Once it finds another set you have that isn't in your list, it will notify you and add it to the set list. There's functionality for advanced part lookup and detailed info on each of your sets. The Lego Set Rebuilder takes what is usually a long, boring, very laborious task, and turns it in into an efficient activity!

How we built it

The application runs a locally hosted web server using React and JS for the frontend, while the backend is hosted on MongoDB and interfaced to using Python and Flask.

Challenges we ran into

Surprisingly, the hardest part wasn't the actual programming, but was coming up with the correct idea to go through the unsorted pieces. No matter what, if you wanted to rebuild all your old Lego sets, you would need to look at every piece your own, likely many times. You end up being the bottleneck. It doesn't make sense to try to find one piece out of thousands of pieces. So instead of rebuilding set by set, it's much faster to rebuild all your sets at once, going piece by piece. That way, at most you'll only have to look at each piece once. In efficiency terms, you're going from O(n^2), down to O(n).

Accomplishments that we're proud of

The website runs surprisingly fast, especially considering the volume of data it may have to sort through. Where other Lego Set tracker websites are slow, and very hard to use, the Lego Set Rebuilder runs fast and is far more intuitive.

What's next for Lego Set Rebuilder

If the website is deployed, it can be used by anyone. So next up is adding a user base to login/logout, and opening the program up to the world.

Share this project:

Updates