How hlua4312-hub/pr-marketplace works
PR Marketplace is a campus peer-to-peer marketplace delivered as an installable web app and an Android WebView wrapper. The main user journey is browse/search listings, inspect a listing, then sign in when needed to post, message, or contact a seller; optional branches cover wanted requests, reviews, and direct UPI payment claims. The browser app orchestrates feature modules, which use a shared API and device-local state. Supabase supplies backend services. Several module links are supported by the SOURCE INDEX or README; unsampled implementation details are not inferred.
Main entry points: app.js App coordinator · api.js Marketplace API · sell.js Create listings · payments.js Payment claims
Components 21
Client shell
- Android WebView
android_app/app/src/main/java/com/prmarketplace/app/MainActivity.java - App coordinator
js/app.js - PWA worker
sw.js - Shared UI
js/ui.js - Update checks
js/updates.js
Marketplace features
- Browse and search
js/feed.js - Listing details
js/detail.js - Create listings
js/sell.js - Photo cropper
js/cropper.js - Wanted board
js/requests.js - Campus setup
js/campus.js
Accounts and engagement
- Student accounts
js/auth.js - Profile and account
js/account.js - Messaging
js/messaging.js - Payment claims
js/payments.js - UPI utilities
js/upi.js
Data and integrations
- Marketplace API
js/api.js - Local state
js/store.js - Supabase services
Other components
- Marketplace user
- UPI apps
Connections 37
- Marketplace user → Android WebView: opens app
README.md - Marketplace user → App coordinator: uses
README.md - Android WebView → App coordinator: wraps web app
README.md - App coordinator → Browse and search: initializes
js/app.js - App coordinator → Listing details: routes listing
js/app.js - App coordinator → Create listings: initializes
js/app.js - App coordinator → Messaging: initializes
js/app.js - App coordinator → Student accounts: initializes
js/app.js - App coordinator → Profile and account: initializes
js/app.js - App coordinator → Payment claims: initializes
js/app.js - App coordinator → Wanted board: closes board
js/app.js - App coordinator → Local state: sets tab
js/app.js - App coordinator → Marketplace API: purges sold items
js/app.js - App coordinator → Update checks: manages updates
js/app.js - App coordinator → Campus setup: initializes
js/app.js - Browse and search → Marketplace API: fetches listings
js/feed.js - Browse and search → Local state: reads filters
js/feed.js - Create listings → Photo cropper: opens cropper
js/sell.js - Create listings → UPI utilities: validates UPI
js/sell.js - Listing details → Marketplace API: listing actions
- Wanted board → Marketplace API: request actions
- Messaging → Marketplace API: sends messages
- Payment claims → Marketplace API: files payment claim
- Payment claims → UPI utilities: renders QR
js/payments.js - Payment claims → UPI apps: opens payment link
README.md - Profile and account → Marketplace API: loads account data
- Student accounts → Supabase services: authenticates
README.md - Marketplace API → Supabase services: uses backend
README.md - Messaging → Supabase services: uses Realtime
README.md - Create listings → Supabase services: uploads listing photos
js/sell.js - App coordinator → PWA worker: registers worker
- Update checks → PWA worker: checks worker updates
js/updates.js - Browse and search → Shared UI: renders with helpers
js/feed.js - Create listings → Shared UI: uses shared UI
js/sell.js - Photo cropper → Shared UI: uses image helpers
js/cropper.js - Payment claims → Shared UI: uses shared UI
js/payments.js - Profile and account → Update checks: checks Android build
js/account.js