[Feature] Ability to add parts #68

Closed
opened 2025-03-05 10:32:34 +01:00 by fidoriel · 13 comments

It seems like parts can only be added via sets. An independent part management would be nice.
For example, adding parts to different part collections.

It seems like parts can only be added via sets. An independent part management would be nice. For example, adding parts to different part collections.

I would also like this feature.

I would also like this feature.
FrederikBaerentsen added the Kind/Feature label 2025-09-14 18:52:27 +02:00
FrederikBaerentsen added the Out of Scope label 2025-09-14 18:53:45 +02:00
FrederikBaerentsen changed title from Ability to add parts to [Feature] Ability to add parts 2025-09-22 08:52:26 +02:00

Up Vote for this feature - bulk parts inventory, IMO is just as important as set inventory and is just as march part of any Lego collection as sets are. I think there could be multiple ways to do it. One option could be to define a "user set (or MOC)" and then stick all spare parts within that "set". Another option could be to require a storage (or collection) to be defined for bulk parts and then they could just be added to the storage and inventoried that way.

Up Vote for this feature - bulk parts inventory, IMO is just as important as set inventory and is just as march part of any Lego collection as sets are. I think there could be multiple ways to do it. One option could be to define a "user set (or MOC)" and then stick all spare parts within that "set". Another option could be to require a storage (or collection) to be defined for bulk parts and then they could just be added to the storage and inventoried that way.

Up Vote for this. I recently discovered BrickTracker and I am moving away from Rebrickable as this is much speedier while browsing. But I am missing parts...

Up Vote for this. I recently discovered BrickTracker and I am moving away from Rebrickable as this is much speedier while browsing. But I am missing parts...
Owner

I understand this is a big wish and I'll try to continue the work i started some some months ago on the feature/parts branch. This is a major feature though, as the logic for parts needs to be changed completely.

I understand this is a big wish and I'll try to continue the work i started some some months ago on the `feature/parts` branch. This is a major feature though, as the logic for parts needs to be changed completely.
FrederikBaerentsen added
Priority
Medium
and removed Out of Scope labels 2026-01-01 17:01:59 +01:00
Owner

This is what i have implemented on feature/parts (months ago), and i can try and finish and port to release/1.4. Any feedback or suggestions would be appreciated!

The idea is to have a new add section

You can then add a single part and it will show up like this on its details page

Or use a lot-mode where we can search for multiple parts and add them to a lot.

All colors of a part is downloaded and shown and you can add whichever color you want.

You can also search for a specific print

A lot (or single part) will show as this and have owner/purchase-info/storage/tags etc.

Minifigures would be added as a set (it checks if name starts with fig-, but this needs to be changed to something else after 41e61a2f41). Only one can be added at a time, but i might see if bulk add can be implemented like for sets. .

Minifigures also show up as individual ones and also have their own metadata

A lot cant be split after it's been added. It technically works as a set with a fixed inventory.

This is what i have implemented on `feature/parts` (months ago), and i can try and finish and port to `release/1.4`. Any feedback or suggestions would be appreciated! The idea is to have a new add section ![](https://xbackbone.baerentsen.space/LaMU8/beZAqIki81.png/raw) You can then add a single part and it will show up like this on its details page ![](https://xbackbone.baerentsen.space/LaMU8/ZApAlapU95.png/raw) Or use a lot-mode where we can search for multiple parts and add them to a lot. ![](https://xbackbone.baerentsen.space/LaMU8/fILEweve50.png/raw) All colors of a part is downloaded and shown and you can add whichever color you want. ![](https://xbackbone.baerentsen.space/LaMU8/BozUvOXU97.png/raw) You can also search for a specific print ![](https://xbackbone.baerentsen.space/LaMU8/pADIwEXi31.png/raw) A lot (or single part) will show as this and have owner/purchase-info/storage/tags etc. ![](https://xbackbone.baerentsen.space/LaMU8/fozoMovi34.png/raw) Minifigures would be added as a set (it checks if name starts with `fig-`, but this needs to be changed to something else after 41e61a2f41). Only one can be added at a time, but i might see if bulk add can be implemented like for sets. ![](https://xbackbone.baerentsen.space/LaMU8/QOhabiDe41.png/raw). Minifigures also show up as individual ones ![](https://xbackbone.baerentsen.space/LaMU8/pejUCUqA43.png/raw) and also have their own metadata ![](https://xbackbone.baerentsen.space/LaMU8/goGoxiru97.png/raw) A lot cant be split after it's been added. It technically works as a set with a fixed inventory.
Owner

I've been working a lot over the last couple of days on this. As my Christmas break nears its end, I wont have as much time when i go back to work, so I wanted to implement as much functionality as possible.

This is the status so far:

Add

  • Add menu now has a dropdown for add sets, bulk add and add parts.
  • Bulk Add and Add Parts are side by side on the add page.

Adding a minifigure uses the same route (/add) as sets. The minifigure info it loaded and the you can confirm or dismiss.

Bulk Add

Bulk Add works with both sets and minifigures

Add Parts

Adding parts can be done 3 ways:

  1. Single part
  2. Lot/bulk-mode
  3. Rebrickable CSV upload

Single part number


This loads all available colors and you can add whichevery color you want in the quantity you want.

When the part is added. The add interface is reset and you can search and add a new part.

Lot/bulk-mode


You can search and add part as many times as you want. When you are done, you can add all the parts as a lot.

Rebrickable CSV upload

You can upload a CSV file from Rebrickable (or make your own using the standard format)

Part,Color,Quantity
15395,15,5
15395,179,10
15395,308,5
15573,15,11

Uploading a CSV file enables lot/bulk-mode and you can manually search and add more parts to the lot or simply complete it and add the lot.

Parts

Individual parts (in a lot or as singles) will be shown in the Parts table. Here we can see if a part is in a set or not.


A new button to only show individual parts (eg. parts not in a set, but in a lot or as singles) in the parts list.

Part Details


New fold out accordions for:

  • Individual part instances

  • Lot instances

Parts overview

Theres a new route /individual-parts for all the individual parts


This will most likely be redesigned or removed, as we can filter in the normal parts list now. But I created this months ago, when i first started the feature.

Theres a new route /individual-parts/lot/ for all the lots.

I want to add the same style and feature to as /sets. Could be i remove it too. I'm not sure how useful it is, as you can go to a specific lot from the parts details page.

Metadata

Lots and Individual parts have the same metadata as sets.

Lots also have a title field, that changes the title of the lot everywhere.

Lots works as sets, with a part list and it is possible to mark as damaged/missing/checked and the info will show up on /parts/problem as normals sets does.

It is not possible to delete a part from a lot instance. But the whole instance can be deleted.

Minifigures

Minifigures works much the same way. We can see them in /minifigures and see the quantity and how many sets they are in.


We can also filter on just individual minifigures.

The details page shows individual lots.

The individual minifigure has all the metadata as sets.

Missing functionality

  • Badges aren't consistent.
  • /statistics doesn't include individual parts/minifigures/lots
  • /storage doesn't show individual parts/minifigures/lots
  • Part Lot doesn't have a cover image

Any feedback is appreciated!

I've been working a lot over the last couple of days on this. As my Christmas break nears its end, I wont have as much time when i go back to work, so I wanted to implement as much functionality as possible. This is the status so far: ## Add - Add menu now has a dropdown for add sets, bulk add and add parts. - Bulk Add and Add Parts are side by side on the add page. ![](https://xbackbone.baerentsen.space/LaMU8/DaXuYAFI85.png/raw) Adding a minifigure uses the same route (/add) as sets. The minifigure info it loaded and the you can confirm or dismiss. ![](https://xbackbone.baerentsen.space/LaMU8/ZiwApOGo44.png/raw) ## Bulk Add Bulk Add works with both sets and minifigures ![](https://xbackbone.baerentsen.space/LaMU8/NEVEmoCa32.png/raw) ## Add Parts ![](https://xbackbone.baerentsen.space/LaMU8/nIGUfotU99.png/raw) Adding parts can be done 3 ways: 1. Single part 2. Lot/bulk-mode 3. Rebrickable CSV upload ### Single part number ![](https://xbackbone.baerentsen.space/LaMU8/kuMokabU42.png/raw) This loads all available colors and you can add whichevery color you want in the quantity you want. When the part is added. The add interface is reset and you can search and add a new part. ### Lot/bulk-mode ![](https://xbackbone.baerentsen.space/LaMU8/LONOWApA87.png/raw) You can search and add part as many times as you want. When you are done, you can add all the parts as a lot. ### Rebrickable CSV upload ![](https://xbackbone.baerentsen.space/LaMU8/JoSEsexa84.png/raw) You can upload a CSV file from Rebrickable (or make your own using the standard format) ``` Part,Color,Quantity 15395,15,5 15395,179,10 15395,308,5 15573,15,11 ``` Uploading a CSV file enables lot/bulk-mode and you can manually search and add more parts to the lot or simply complete it and add the lot. ## Parts ![](https://xbackbone.baerentsen.space/LaMU8/ROGESOKi38.png/raw) Individual parts (in a lot or as singles) will be shown in the Parts table. Here we can see if a part is in a set or not. ![](https://xbackbone.baerentsen.space/LaMU8/rEyafuVo15.png/raw) A new button to only show individual parts (eg. parts not in a set, but in a lot or as singles) in the parts list. ### Part Details ![](https://xbackbone.baerentsen.space/LaMU8/BeRIpewO32.png/raw) New fold out accordions for: - Individual part instances ![](https://xbackbone.baerentsen.space/LaMU8/hiLOvIPa69.png/raw) - Lot instances ![](https://xbackbone.baerentsen.space/LaMU8/XICAtAME99.png/raw) ### Parts overview Theres a new route /individual-parts for all the individual parts ![](https://xbackbone.baerentsen.space/LaMU8/coNAzEzi89.png/raw) This will most likely be redesigned or removed, as we can filter in the normal parts list now. But I created this months ago, when i first started the feature. Theres a new route /individual-parts/lot/ for all the lots. ![](https://xbackbone.baerentsen.space/LaMU8/DEJAfoCO86.png/raw) I want to add the same style and feature to as /sets. Could be i remove it too. I'm not sure how useful it is, as you can go to a specific lot from the parts details page. ### Metadata Lots and Individual parts have the same metadata as sets. ![](https://xbackbone.baerentsen.space/LaMU8/LOMeCUGO43.png/raw) Lots also have a title field, that changes the title of the lot everywhere. ![](https://xbackbone.baerentsen.space/LaMU8/NuYAxEJO05.png/raw) Lots works as sets, with a part list and it is possible to mark as damaged/missing/checked and the info will show up on /parts/problem as normals sets does. It is not possible to delete a part from a lot instance. But the whole instance can be deleted. ![](https://xbackbone.baerentsen.space/LaMU8/coqeFOva36.png/raw) ## Minifigures ![](https://xbackbone.baerentsen.space/LaMU8/PecEKuYO52.png/raw) Minifigures works much the same way. We can see them in /minifigures and see the quantity and how many sets they are in. ![](https://xbackbone.baerentsen.space/LaMU8/hESUSOxE55.png/raw) We can also filter on just individual minifigures. The details page shows individual lots. ![](https://xbackbone.baerentsen.space/LaMU8/zAHEXAyo17.png/raw) The individual minifigure has all the metadata as sets. ![](https://xbackbone.baerentsen.space/LaMU8/JeYuzaRo20.png/raw) ## Missing functionality - Badges aren't consistent. - /statistics doesn't include individual parts/minifigures/lots - /storage doesn't show individual parts/minifigures/lots - Part Lot doesn't have a cover image Any feedback is appreciated!
FrederikBaerentsen added this to the Version 1.4 milestone 2026-01-04 17:28:21 +01:00
FrederikBaerentsen added this to the General Improvements project 2026-01-04 17:28:23 +01:00
FrederikBaerentsen moved this to In Progress in General Improvements on 2026-01-04 17:42:44 +01:00

This is really great, thank you!
One thing I think might be really useful would be the ability to add individual parts directly from a set's part inventory; not to add them to the set's contents, but as a shortcut for identifying the part and adding X number of them to the general parts inventory. Similarly, being able to update the quantity of parts from the parts view would also be really helpful.
The general idea in my mind, is to minimize the number of cases in which I have to look up a part number; I think for the vast majority of my own lego collection, the individual parts I've got aren't anything I didn't already also have as part of a set.

Also, for the bulk add, would it be possible to bulk add individual parts without making them part of a lot?

This is really great, thank you! One thing I think might be really useful would be the ability to add individual parts directly from a set's part inventory; not to add them to the set's contents, but as a shortcut for identifying the part and adding X number of them to the general parts inventory. Similarly, being able to update the quantity of parts from the parts view would also be really helpful. The general idea in my mind, is to minimize the number of cases in which I have to look up a part number; I think for the vast majority of my own lego collection, the individual parts I've got aren't anything I didn't already also have as part of a set. Also, for the bulk add, would it be possible to bulk add individual parts without making them part of a lot?
Owner

@commenter

Something like this, where a set has an extra column (can be turned on/off) Screenshot_20260108_222445-2.png

And it will give a popup where you can add that part? Screenshot_20260108_222511.png

This doesn't call the API, as we already have the part info. But it doesn't support adding a different color.

Looking at bulk add for individual parts not in a lot next.

@commenter Something like this, where a set has an extra column (can be turned on/off) ![Screenshot_20260108_222445-2.png](/attachments/4d8f5a56-3fb6-4821-8861-055b37e99be3) And it will give a popup where you can add that part? ![Screenshot_20260108_222511.png](/attachments/947aeff7-0d35-4af9-9bf1-2aa5453bd5a3) This doesn't call the API, as we already have the part info. But it doesn't support adding a different color. Looking at bulk add for individual parts not in a lot next.

I was thinking something more like the way damaged/missing parts are added, but what you're showing is great, too.
Totally reasonable that this wouldn't work for adding a part in a different color.

I was thinking something more like the way damaged/missing parts are added, but what you're showing is great, too. Totally reasonable that this wouldn't work for adding a part in a different color.
Owner

I was thinking something more like the way damaged/missing parts are added, but what you're showing is great, too.
Totally reasonable that this wouldn't work for adding a part in a different color.

The issue with using the same style as damaged/missing parts is that those are just flags (boolean columns) in the row of the part belonging to that specific set. We can't simply flag a part as "now an individual part" because individual parts are fundamentally different entities that need their own records. When you mark a part as damaged or missing, you're updating a field in the bricktracker_parts table for that specific set instance.
But when you add a part to your individual parts collection, we need to:

  • Create a new entity in the bricktracker_individual_parts table
  • Link it to metadata (storage location, purchase info, etc.)
  • Optionally associate it with a part lot
  • Track its own condition independently

Here's how the database relationships differ:

Set Parts:

┌─────────────────────┐         ┌──────────────────────┐
│ bricktracker_sets   │         │ rebrickable_parts    │
├─────────────────────┤         ├──────────────────────┤
│ id (PK)             │         │ part_num (PK)        │
│ set                 │         │ name                 │
│ ...                 │         │ part_cat_id          │
└──────┬──────────────┘         └──────────┬───────────┘
       │                                   │
       │   ┌────────────────────────────┐  │
       └───┤ bricktracker_parts         ├──┘
           ├────────────────────────────┤
           │ id (FK → sets)             │
           │ part (FK → rebrickable)    │
           │ checked (flag)             │
           │ damaged (flag)             │
           │ missing (flag)             │
           └────────────────────────────┘

Individual Parts:

┌─────────────────────────────────┐         ┌──────────────────────┐
│ bricktracker_individual_parts   │         │ rebrickable_parts    │
├─────────────────────────────────┤         ├──────────────────────┤
│ id (PK)                         │─────────│ part_num (PK)        │
│ part (FK → rebrickable)         │         │ name                 │
│ color                           │         │ part_cat_id          │
│ quantity                        │         └──────────────────────┘
│ lot_id (optional)               │
│ storage_id (optional)           │
│ purchase_location_id (optional) │
│ checked (flag)                  │
│ damaged (flag)                  │
│ missing (flag)                  │
└─────────────────────────────────┘

As you can see, bricktracker_parts rows are children of a specific set instance, while bricktracker_individual_parts are independent entities with their own lifecycle. That's why we need a dedicated interface to create them rather than just toggling a flag.

I totally understand if you'd prefer a one-click approach, but would the current implementation work for you? Alternatively, I could add a second option to quick add a single quantity individual part with no storage or purchase information, and then you can add metadata and quantity later?

> I was thinking something more like the way damaged/missing parts are added, but what you're showing is great, too. > Totally reasonable that this wouldn't work for adding a part in a different color. The issue with using the same style as damaged/missing parts is that those are just flags (boolean columns) in the row of the part belonging to that specific set. We can't simply flag a part as "now an individual part" because individual parts are fundamentally different entities that need their own records. When you mark a part as damaged or missing, you're updating a field in the `bricktracker_parts` table for that specific set instance. But when you add a part to your individual parts collection, we need to: - Create a new entity in the `bricktracker_individual_parts` table - Link it to metadata (storage location, purchase info, etc.) - Optionally associate it with a part lot - Track its own condition independently Here's how the database relationships differ: Set Parts: ``` ┌─────────────────────┐ ┌──────────────────────┐ │ bricktracker_sets │ │ rebrickable_parts │ ├─────────────────────┤ ├──────────────────────┤ │ id (PK) │ │ part_num (PK) │ │ set │ │ name │ │ ... │ │ part_cat_id │ └──────┬──────────────┘ └──────────┬───────────┘ │ │ │ ┌────────────────────────────┐ │ └───┤ bricktracker_parts ├──┘ ├────────────────────────────┤ │ id (FK → sets) │ │ part (FK → rebrickable) │ │ checked (flag) │ │ damaged (flag) │ │ missing (flag) │ └────────────────────────────┘ ``` Individual Parts: ``` ┌─────────────────────────────────┐ ┌──────────────────────┐ │ bricktracker_individual_parts │ │ rebrickable_parts │ ├─────────────────────────────────┤ ├──────────────────────┤ │ id (PK) │─────────│ part_num (PK) │ │ part (FK → rebrickable) │ │ name │ │ color │ │ part_cat_id │ │ quantity │ └──────────────────────┘ │ lot_id (optional) │ │ storage_id (optional) │ │ purchase_location_id (optional) │ │ checked (flag) │ │ damaged (flag) │ │ missing (flag) │ └─────────────────────────────────┘ ``` As you can see, `bricktracker_parts` rows are children of a specific set instance, while `bricktracker_individual_parts` are independent entities with their own lifecycle. That's why we need a dedicated interface to create them rather than just toggling a flag. I totally understand if you'd prefer a one-click approach, but would the current implementation work for you? Alternatively, I could add a second option to quick add a single quantity individual part with no storage or purchase information, and then you can add metadata and quantity later?

I think what you've got already is good. I appreciate the deep dive into the schema as way of explaining why what I was thinking of wouldn't be feasible.

I think what you've got already is good. I appreciate the deep dive into the schema as way of explaining why what I was thinking of wouldn't be feasible.
Owner

Version 1.4 with individual parts, lots and minifigures is now available for testing using the Docker tag pre-1.4!

To test this release, update your compose file with the new tag.

Backup Your Database Before Upgrading!

This release includes database migrations (v20 -> v27) with NO automatic rollback capability.

It is recommended to make a copy of your install and test on that.

# Create a new test folder
mkdir bricktracker-test
cd bricktracker-test

# Copy your compose.yaml
cp /path/to/original/compose.yaml .

# Copy your data folder (includes database)
cp -r /path/to/original/data ./data

# Update compose.yaml image to: gitea.baerentsen.space/frederikbaerentsen/bricktracker:pre-1.4
# Then start the test instance
docker compose up -d

OR manually download a copy of your database from the admin page.

What's New in 1.4

  1. Individual Minifigures Tracking
  2. Individual Parts Tracking
  3. Part Lots System
  4. Environment Variables for Flexibility
    Control visibility and functionality:
  • BK_HIDE_INDIVIDUAL_MINIFIGURES - Hide UI elements
  • BK_DISABLE_INDIVIDUAL_MINIFIGURES - Block write operations
  • BK_HIDE_INDIVIDUAL_PARTS - Hide UI elements
  • BK_DISABLE_INDIVIDUAL_PARTS - Block write operations

Full changelog available here: CHANGELOG

What to Test

  • Database Migration: Verify upgrade completes successfully
  • Existing Data: Confirm all your sets, minifigures, and parts still display correctly
  • Set Operations: Add, edit, delete sets (ensure nothing breaks)

New Individual Minifigures Feature

  • Add an individual minifigure
  • View individual minifigure details
  • Track parts for an individual minifigure
  • Mark parts as missing/damaged/checked
  • Assign metadata (owner, tags, storage, purchase info)
  • Delete an individual minifigure
  • Test with feature flags (hide/disable)

New Individual Parts Feature

  • Add individual parts via "Add Parts" page
  • Quick-add parts from a set's parts table
  • Create a part lot to group related parts
  • View all parts in a lot
  • Assign storage and purchase info to parts/lots
  • Search and filter individual parts
  • Mark parts as missing/damaged/checked
  • Test with feature flags (hide/disable)

Other features

  • Statistics page shows correct purchase and part info
  • Export functionality works
  • Search across all items (sets, individual minifigures, individual parts)

Report Issues

If you encounter problems:

  1. Check Docker logs: docker compose logs -f
  2. Check database version: Admin > Database (should show v27)
  3. Please create a individual Gitea issues and note in the title that this is [1.4] we are talking about
Version 1.4 with individual parts, lots and minifigures is now available for testing using the Docker tag `pre-1.4`! To test this release, update your compose file with the new tag. ## Backup Your Database Before Upgrading! This release includes database migrations (v20 -> v27) with NO automatic rollback capability. It is recommended to make a copy of your install and test on that. ```bash # Create a new test folder mkdir bricktracker-test cd bricktracker-test # Copy your compose.yaml cp /path/to/original/compose.yaml . # Copy your data folder (includes database) cp -r /path/to/original/data ./data # Update compose.yaml image to: gitea.baerentsen.space/frederikbaerentsen/bricktracker:pre-1.4 # Then start the test instance docker compose up -d ``` OR manually download a copy of your database from the admin page. ## What's New in 1.4 1. Individual Minifigures Tracking 2. Individual Parts Tracking 3. Part Lots System 4. Environment Variables for Flexibility Control visibility and functionality: - `BK_HIDE_INDIVIDUAL_MINIFIGURES` - Hide UI elements - `BK_DISABLE_INDIVIDUAL_MINIFIGURES` - Block write operations - `BK_HIDE_INDIVIDUAL_PARTS` - Hide UI elements - `BK_DISABLE_INDIVIDUAL_PARTS` - Block write operations Full changelog available here: [CHANGELOG](https://gitea.baerentsen.space/FrederikBaerentsen/BrickTracker/src/branch/release/1.4/CHANGELOG.md#14) ## What to Test - [ ] Database Migration: Verify upgrade completes successfully - [ ] Existing Data: Confirm all your sets, minifigures, and parts still display correctly - [ ] Set Operations: Add, edit, delete sets (ensure nothing breaks) ### New Individual Minifigures Feature - [ ] Add an individual minifigure - [ ] View individual minifigure details - [ ] Track parts for an individual minifigure - [ ] Mark parts as missing/damaged/checked - [ ] Assign metadata (owner, tags, storage, purchase info) - [ ] Delete an individual minifigure - [ ] Test with feature flags (hide/disable) ### New Individual Parts Feature - [ ] Add individual parts via "Add Parts" page - [ ] Quick-add parts from a set's parts table - [ ] Create a part lot to group related parts - [ ] View all parts in a lot - [ ] Assign storage and purchase info to parts/lots - [ ] Search and filter individual parts - [ ] Mark parts as missing/damaged/checked - [ ] Test with feature flags (hide/disable) ### Other features - [ ] Statistics page shows correct purchase and part info - [ ] Export functionality works - [ ] Search across all items (sets, individual minifigures, individual parts) ### Report Issues If you encounter problems: 1. Check Docker logs: `docker compose logs -f` 2. Check database version: Admin > Database (should show v27) 3. Please create a individual Gitea issues and note in the title that this is `[1.4]` we are talking about
Owner

Closing as 1.4 is now released and this has been implemented.

Closing as 1.4 is now released and this has been implemented.
Sign in to join this conversation.
6 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: FrederikBaerentsen/BrickTracker#68