Avoid on web search results
- Text-only pills such as “Black octagon warning” instead of icons
- Inline Sugar / Fat / Sat. fat / Sodium grids beside the label
- Long joined
reasonsparagraphs in the result card
Documentation
Current backend endpoints used by the LisheBora web admin console. These endpoints are read-only today and should be protected by admin authentication before broader team access.
The home-page product search shows Kenya Nutrient Profile Model (KNPM) results using octagon icons for warnings (same assets as the mobile app). Fit-for-consumption uses a green checkmark on web. An earlier layout crammed a text badge, a four-column nutrition grid, and long threshold explanations into one card — it read poorly on narrow screens and duplicated what the octagons already communicate.
Avoid on web search results
reasons paragraphs in the result cardCurrent web pattern
knpm_label.octagons)/products/search/recommendationsImplementation: app/_components/product-search-result.tsx and lib/knpm-ui.ts. Static assets live in public/images/octagons/.
/api/v1/admin/summary
Operational totals for users, scans, uploads, products, barcode mappings, and missing barcodes.
/api/v1/admin/users?limit=50
Registered users, BMI/profile fields, scan counts, and last scan date.
/api/v1/admin/scans?limit=50
OCR and barcode scan events with product name, KNPM label, nutrients, image URL, and date.
/api/v1/admin/products?limit=200
Reference nutrition catalogue, category/form fields, nullable price fields, nutrients, and quality flags.
/api/v1/admin/barcodes?limit=200
Resolved barcode mappings plus unresolved missing barcode rows.
/api/v1/admin/uploads?limit=50
Saved scan images, OCR source, product name, success state, user label, and created date.
/api/v1/admin/exports
List of admin export and analytics endpoints shown in the Exports page.
/api/v1/admin/analytics/health-summary?limit=25
Anonymized KNPM label distribution, scan type/source counts, and top products with nutrient averages.
/api/v1/admin/analytics/nutrients?limit=10
Observed nutrient counts, averages, max values, and highest sugar/fat/sodium product rows.
/api/v1/admin/exports/scans.csv?limit=5000
Anonymized scan export with product, source, KNPM label, nutrients, image URL, error, and date.
/api/v1/admin/exports/uploads.csv?limit=5000
Anonymized image-backed scan export for image review teams.
/api/v1/admin/exports/products.csv?limit=10000
Reference products with nutrition, category, package, quality, and nullable price fields.
/api/v1/admin/missing-products/export?format=csv
Pending barcode/product misses for supervisor review and product enrichment.
/api/v1/admin/missing-products?limit=1000
Missing barcode/product rows with search count, first seen, last seen, and notes.
/api/v1/uploads/scan_images/...
Serves saved scan images referenced by admin scans/uploads. Use only in authenticated admin review flows.
Prices are additive and nullable on reference products only. They do not change mobile scan responses.
After deploying the backend image that contains the script, run this once to populate reference product prices from the bundled source CSV.
docker compose -f docker-compose.prod.yml --env-file .env.prod exec backend python scripts/backfill_reference_prices.py