Track parts while building LEGO® alternate models from one or more official set inventories.
Combine sets (including duplicates), mark pieces as used, and pick up where you left off. Projects save locally by default; optional cloud sync keeps progress across devices.
Live: rebuildmate.com
- Multi-set projects with quantities and merged part inventories
- Part usage tracking with sort/grid controls
- Local caching of BrickLink set inventories and thumbnails
- Export/import projects as JSON; export used parts as BrickLink XML
- Optional email/password account for cloud sync (Supabase)
- Requirements: Node.js 18+, BrickLink API credentials
- Copy
.env.example→.envand fill in BrickLink keys (and optional Supabase keys for auth/sync) - Install and start:
npm install npm run syncColors # one-time BrickLink color catalog npm start # http://localhost:3000
npm run dev # auto-restart on file changes
npm run typecheck| Area | Behavior |
|---|---|
| Projects | JSON files under data/projects/ (or synced to Supabase when signed in) |
| Set cache | First fetch from BrickLink → data/sets/ + data/images/; later loads are local |
| UI | Vanilla JS in public/; TypeScript Node server in src/ |
| Deploy | Vercel-ready (api/ serverless routes + static public/) |
RebuildMate is built to minimize BrickLink API calls. That keeps the app usable offline after sets are cached, and avoids unnecessary load on BrickLink’s servers.
BrickLink credentials stay on the server (.env). The browser never calls BrickLink directly; it hits your local/Vercel API, which proxies and caches responses.
When you add a set (e.g. 10281 or 10281-1):
- The server resolves the set number (box numbers like
10281map to BrickLink variants such as10281-1; aliases are remembered indata/setAliases.json). - If that set is already in
data/sets/, the inventory is read from disk (no BrickLink call). - On a cache miss, the server fetches set metadata and the part inventory from BrickLink, then writes a JSON file under
data/sets/. - Set and part thumbnails are downloaded once into
data/images/and served from/cache/images/...afterward.
Deleting a project (or using Clear Unused Images in Settings) prunes thumbnails that no project still needs. Set inventory JSON files stay until you remove them manually or clear that cache.
Reopening a project or adding the same set again uses the local cache. You only talk to BrickLink when loading a set for the first time (or after the cache was cleared).
Part color swatches use BrickLink’s color catalog (GET /colors), stored locally as data/bricklinkColors.json.
npm run syncColors
Run that once after setup (and occasionally later if BrickLink adds colors). The server loads the file at startup and maps each part’s color_id → hex / name when enriching inventories. That keeps color lookups off the live API during normal use.
A committed copy of bricklinkColors.json ships in the repo so the app works before you sync; syncColors refreshes it from BrickLink when you want an update.
public/ Web UI, styles, assets
src/ Local Node server + BrickLink client
api/ Vercel serverless handlers (config, sets)
data/ Local caches and projects (mostly gitignored)
bricklinkColors.json Color id → hex (committed; refresh with syncColors)
sets/ Cached set inventories (gitignored)
images/ Cached thumbnails (gitignored)
projects/ Saved projects (gitignored)
RebuildMate is not affiliated with, endorsed by, or sponsored by the LEGO Group or BrickLink. LEGO® is a trademark of the LEGO Group. BrickLink® is a trademark of BrickLink Limited.
