Getting started
MedScan is a multi-role platform for product authentication, supply-chain tracking, and regulatory monitoring.
- Visit the home page and log in with your credentials.
- Choose your dashboard based on role (Consumer, Distributor, Manufacturer, Regulator, Admin).
- Use the navigation to access scanning, reports, analytics, and configuration.
User roles
Consumers
- Scan products to verify authenticity.
- View simple results and guidance.
Distributors
- Verify units, packages, and batches.
- Record scan location (lat/lng + address) and device info.
- Scan history with filtering and export.
Manufacturers
- Manage products, generate codes, oversee distributions.
- Reports and recall management.
Regulators
- Real-time alerts with evidence and reporter info.
- Confidence scoring and geo clusters.
Admins
- User management, security, and platform configuration.
Scanning & verification
Scanning uses the device camera with back-camera preference and supports camera switching.
- In Distributor > Scan Verification, click New Scan.
- Allow camera access. Use Switch Camera when multiple cameras exist.
- Supports JSON QR payloads and raw unique codes.
- Results include authentic, suspicious (flagged), expired, or recalled.
Package & batch verification
Packages
- Scan a package QR (JSON with
product_id+package_numberor code like...-P001). - All units in the package are verified in one action.
- Result view offers Show details to see unit-by-unit outcomes.
Batches
- Scan a batch code (e.g.,
BR-…) to verify all units. - Processing is paged (default 500 units/page) with chunked writes and a progress bar.
- Use Verify next … units to continue until the batch is complete.
Locations & maps
- When permitted, scans store latitude/longitude and reverse-geocoded address.
- Addresses are resolved via Google Maps Geocoding API using
VITE_GOOGLE_MAPS_API_KEY. - Results appear in scan history and regulator alerts.
Regulator alerts & confidence
- Alerts show evidence images and reporter details.
- Confidence scoring uses multiple signals (evidence, location, freshness, reporter trust).
- Geographic clusters help identify hotspots.
Notifications
- Notifications use validated routes to avoid navigation errors.
- Access via the bell icon in dashboards.
Environment & configuration
- Create
.envfrom.env.example. - Set
VITE_GOOGLE_MAPS_API_KEYfor reverse geocoding. - Keys should be domain-restricted or proxied via an Edge Function for better security hygiene.
Troubleshooting
- Camera not working: Ensure permissions, switch camera, or use manual code entry.
- Address shows coordinates: Geocoding may be rate-limited or key missing; check env.
- Batch too large: Use the resume flow to process the next page.
- PGRST116/406: We use safe
maybeSingle()queries and code fallbacks; retry or check QR format.
FAQ
What QR formats are supported?
JSON payloads with
unique_code, package pairs
(product_id + package_number), batch codes, and direct unique
codes.How do I continue a big batch?
After the first page, click Verify next … units to fetch
and verify the next page until complete.
Where do I see scan locations?
In Distributor > Scan History, each entry shows the recorded
address and device info.
Support
For help or feedback, contact your administrator or support channel.
Last updated: