Add custom projects with LDraw part search and per-project part management#36
Draft
Add custom projects with LDraw part search and per-project part management#36
Conversation
…ts management Co-authored-by: scubar <9043529+scubar@users.noreply.github.com>
…in LDraw parser Co-authored-by: scubar <9043529+scubar@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add option to create custom projects with selected parts
Add custom projects with LDraw part search and per-project part management
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for custom projects not tied to a LEGO set number, with a searchable LDraw library index and full add/remove/quantity management for project parts.
Database
ldraw_part_indextable indexes local LDraw.datfiles (part_num + description from file header)project_partstable stores parts belonging to custom projects (part_num, quantity, color)is_customboolean column added toprojects002_custom_projectshandles all schema changes idempotentlyBackend
build_ldraw_part_index()/search_ldraw_part_index()inldraw.py— scanparts/*.dat, parse description from line-type-0 header, upsert into indexldraw_parts.pyexposes:GET /api/ldraw-parts/search?q=— full-text search on part_num and descriptionPOST /api/ldraw-parts/index— (re)build index by scanning local libraryGET /api/ldraw-parts/index/status— indexed countPOST /api/projectsnow acceptsis_custom: truewith noset_num/api/projects/{id}/parts— list, add (merges quantity if part already present), PATCH quantity, DELETEprocess_generation_custom()mirrors the existing generation pipeline but reads parts fromproject_partsinstead of calling RebrickableFrontend
+ Custom Projectbutton opens a modal to name and create a custom project+ Addper result−/+quantity controls and Remove buttonWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
rebrickable.com/usr/bin/python3 python3 -m pytest backend/tests/ -x -q(dns block)/usr/bin/python3 python3 -m pytest backend/tests/ -q(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.