How jeightz/test works
Priceter is a login-free, crowdsourced local-price verification app. Consumers search by text or image, inspect a product’s community reports and DTI SRP, then submit a price report or rate another report; receipt scanning offers an alternate submission path. Product-detail computation compares reports with SRP and local medians and summarizes trust. The graph preserves the documented nearby-price, trust, and daily-limit capabilities. Some UI-to-API links are dashed because sampled excerpts do not show those requests; unsampled routes are represented by their exact tree paths.
Main entry points: analyze/route.js Receipt analysis · reports/route.js Price reporting · page.js Product details · [id]/route.js Price analysis
Components 34
Consumer experience
- Search page
app/search/page.js - Search controls
components/SearchBar.jsx - Camera search
components/CameraSearch.jsx - Image matching
app/api/search-by-image/route.js - Product search
app/api/products/route.js - Product results
components/ProductGrid.jsx - Product details
app/product/[id]/page.js - Price analysis
app/api/products/[id]/route.js - Price indicator
components/PriceIndicator.jsx - Local median
components/LocalMedian.jsx - Trust summary
components/TrustScore.jsx
Reporting and trust
- Receipt upload
app/receipt-upload/page.js - Receipt workflow
components/ReceiptUpload.jsx - Receipt analysis
app/api/receipts/analyze/route.js - Receipt submission
app/api/receipts/submit/route.js - Price reporting
app/api/reports/route.js - Report rating
app/api/ratings/route.js - Recent reports
components/ReportList.jsx - Location picker
components/LocationPicker.jsx
Domain services
- Session endpoint
app/api/session/route.js - Anonymous session
lib/session.js - Daily limits
lib/limits.js - Price calculations
lib/price.js - Nearby distances
lib/location.js - Location fields
lib/locationFields.js - Trust calculations
lib/trust.js - Report helpers
lib/reportHelpers.js - Image embeddings
lib/embedding.js - Receipt extraction
lib/gemini.js - Image hosting
lib/cloudinary.js - Product images
lib/productImages.js
Persistence
- PostgreSQL
lib/db.js
Other components
- Consumer
- Jina embeddings
Connections 48
- Consumer → Search page: searches
app/search/page.js - Search page → Search controls: renders
app/search/page.js - Search page → Product results: renders
app/search/page.js - Search controls → Camera search: renders
components/SearchBar.jsx - Search controls → Image matching: posts image
components/SearchBar.jsx - Search page → Product search: requests results
- Product results → Price indicator: renders
components/ProductGrid.jsx - Product details → Price analysis: loads details
- Price analysis → PostgreSQL: queries
app/api/products/[id]/route.js - Price analysis → Price calculations: classifies prices
app/api/products/[id]/route.js - Price analysis → Nearby distances: builds nearby query
app/api/products/[id]/route.js - Price analysis → Anonymous session: gets session
app/api/products/[id]/route.js - Price analysis → Trust calculations: builds distribution
app/api/products/[id]/route.js - Product details → Price indicator: renders
app/product/[id]/page.js - Product details → Local median: renders
app/product/[id]/page.js - Product details → Recent reports: renders
app/product/[id]/page.js - Product details → Trust summary: renders
app/product/[id]/page.js - Product details → Product images: formats product image
app/product/[id]/page.js - Consumer → Receipt upload: uploads receipt
app/receipt-upload/page.js - Receipt upload → Receipt workflow: renders
app/receipt-upload/page.js - Receipt workflow → Location picker: uses
components/ReceiptUpload.jsx - Receipt workflow → Receipt analysis: submits for analysis
- Receipt workflow → Receipt submission: submits reports
- Receipt analysis → Receipt extraction: extracts products
app/api/receipts/analyze/route.js - Receipt analysis → Report helpers: matches products
app/api/receipts/analyze/route.js - Receipt analysis → Image hosting: uploads receipt
app/api/receipts/analyze/route.js - Receipt analysis → Anonymous session: gets session
app/api/receipts/analyze/route.js - Receipt analysis → Daily limits: checks scan limit
app/api/receipts/analyze/route.js - Receipt analysis → PostgreSQL: reads matches
app/api/receipts/analyze/route.js - Consumer → Price reporting: reports price
- Price reporting → Anonymous session: gets session
app/api/reports/route.js - Price reporting → Daily limits: checks report limit
app/api/reports/route.js - Price reporting → Image embeddings: embeds photo
app/api/reports/route.js - Price reporting → Report helpers: inserts report
app/api/reports/route.js - Price reporting → Image hosting: uploads photo
app/api/reports/route.js - Price reporting → PostgreSQL: opens transaction
app/api/reports/route.js - Consumer → Report rating: rates report
- Report rating → Anonymous session: gets session
app/api/ratings/route.js - Report rating → Daily limits: checks rating limit
app/api/ratings/route.js - Report rating → PostgreSQL: saves rating
app/api/ratings/route.js - Recent reports → Price indicator: renders
components/ReportList.jsx - Recent reports → Trust summary: renders
components/ReportList.jsx - Session endpoint → Anonymous session: gets session
app/api/session/route.js - Anonymous session → PostgreSQL: reads and writes
lib/session.js - Daily limits → PostgreSQL: counts and logs
lib/limits.js - Report helpers → Image embeddings: uses vector helper
lib/reportHelpers.js - Image embeddings → Jina embeddings: requests vectors
lib/embedding.js - Location picker → Location fields: uses location fields
components/LocationPicker.jsx