Candela: Product and Document Catalogue
A catalogue search for lighting distributors. It takes BMEcat 2005 / ETIM product data and the manufacturer's PDF documents, puts them in one SQLite database with full-text search, and serves the result through a small web interface.
In production
I wrote Candela for ENDA, a lighting distributor in Turkey. It runs there today as the internal catalogue for the TRILUX range they represent. Every feature was built against their real data feed and day-to-day use.
On the 5th of each month it fetches TRILUX's new price list by itself. It downloads the file through the manufacturer portal, rebuilds the database and relinks the catalogues, and nobody has to touch the server.
The production instance is private because it holds a licensed dealer price list. The public demo runs the same code on a made-up dataset.
Technical details
- The product XML is a single 1.4 GB file. I parse it with
iterparse, one product at a time, so memory stays flat however big the file gets. - Search handles exact article numbers and EANs as well as prefix search over descriptions and series, using two FTS5 indexes with diacritics folded.
- PDFs are indexed page by page. Results show highlighted excerpts, and catalogue links open a brochure at the right page.
- Adding a brand means adding a directory, with no code changes. Product text is stored in German and English, with a language switch.
- It deploys with Docker Compose and binds to localhost, behind a reverse proxy that handles TLS. The monthly refresh logs in to the manufacturer portal with Playwright. Accounts have per-person roles and scrypt-hashed passwords.
The demo uses an invented brand and generated documents, so no manufacturer's real data is in it. Sign-in details are in the README.