How ait0xin/carousell-vvip-catalogue-studio works
VVIP Catalogue Studio is a local Streamlit app for checking and rebuilding Carousell merchant catalogues. Users upload a catalogue PDF and VVIP master sheet, review cross-check and QR findings, approve proposed changes, then generate a corrected PDF. The graph preserves the separate extraction, matching, verification, and card-building stages, plus the app’s session state and background-thread runner. The README documents the main wiring; some engine internals were not sampled, so uncertain call links are omitted.
Main entry points: app.py Streamlit app · generate.py Approved generation · qr.py QR check · crosscheck.py Cross-check
Components 23
Studio UI
- Streamlit app
app.py
Catalogue Checks
- Cross-check
studio/crosscheck.py - PDF extraction
qrcheck/extract.py - Master ingest
qrcheck/ingest.py - Handle normalization
qrcheck/normalize.py - QR check
studio/qr.py - QR decoding
qrcheck - Live verification
qrcheck/verify/carousell.py - Annotated preview
qrcheck/preview.py
Catalogue Building
- Approved generation
studio/generate.py - Profile fetching
catbuilder/fetcher.py - HTTP profile fetch
studio/profile_http.py - Merchant descriptions
catbuilder/describer.py - QR generation
catbuilder/qrgen.py - PDF rendering
catbuilder/pdf_render.py
Shared Runtime
- Session state
studio/state.py - Engine wiring
studio/sources.py - Background runner
studio/runner.py
Other components
- Catalogue editor
- Corrected catalogue
- VVIP master sheet
- Carousell profiles
- Configured AI provider
Connections 32
- Catalogue editor → Streamlit app: uploads and reviews
- Streamlit app → Session state: updates state
- Streamlit app → Engine wiring: wires engines
- Streamlit app → Cross-check: runs check
- Streamlit app → QR check: runs check
- Streamlit app → Approved generation: runs approved build
- Streamlit app → Background runner: dispatches stages
- VVIP master sheet → Streamlit app: uploaded to
- Corrected catalogue → Streamlit app: uploaded to
- Cross-check → PDF extraction: extracts catalogue
- Cross-check → Master ingest: loads master
- VVIP master sheet → Master ingest: ingested by
- PDF extraction → Handle normalization: normalizes handles
- Master ingest → Handle normalization: normalizes handles
- Cross-check → Session state: stores findings
- QR check → PDF extraction: extracts QR rows
- QR check → QR decoding: decodes QR codes
- QR check → Live verification: checks live profiles
- Live verification → Carousell profiles: renders profiles
- QR check → Session state: stores verdicts
- Streamlit app → Annotated preview: shows annotations
- Approved generation → Session state: reads approvals
- Approved generation → Profile fetching: fetches merchant data
- Profile fetching → Carousell profiles: fetches profiles
- Approved generation → HTTP profile fetch: may fetch profiles
- HTTP profile fetch → Carousell profiles: fetches profiles
- Approved generation → Merchant descriptions: creates descriptions
- Merchant descriptions → Configured AI provider: requests descriptions
- Approved generation → QR generation: creates fresh QR
- Approved generation → PDF rendering: renders edition
- PDF rendering → Corrected catalogue: writes PDF
- Approved generation → Background runner: dispatches threaded stage