How ash01-forge/uiu-used-textbook-marketplace works
BookBridge is a campus used-textbook marketplace. Its principal workflow is that students browse listings or submit and manage a purchase request; sellers respond and complete the meetup, after which sales and reviews can be tracked. The graph includes the documented guest, buyer, seller, and admin capabilities, plus shared authentication, request protection, response formatting, and database access. The README describes the overall frontend-to-API flow; several endpoint implementations are unsampled, so their detailed internal calls are not inferred.
Main entry points: frontend-integration.js API-connected behavior · db.php PDO connection · review-listing.php Moderation and reporting · login.php Accounts and sessions
Components 25
Frontend
- Marketplace interface
app.js - Authentication UI
auth.js - API-connected behavior
frontend-integration.js - Buyer UI
buyer.js - Seller UI
seller.js - Guest browsing UI
guest.js - Admin UI
admin.js
Identity and shared API
- Accounts and sessions
api/auth/login.php - Session and access control
includes/auth.php - CSRF protection
includes/csrf.php - JSON request responses
includes/response.php
Marketplace and sales
- Public catalog and details
api/marketplace/listings.php - Catalog query helpers
api/marketplace/_common.php - Seller listings and images
api/seller/add-listing.php
Buyer and seller services
- Purchase request lifecycle
api/buyer/seller-request-action.php - Buyer wishlist
api/buyer/wishlist.php - Buyer-seller messaging
api/messages/send.php - Seller reviews
api/reviews/seller-reviews.php
Administration and storage
- Moderation and reporting
api/admin/review-listing.php - Admin validation
includes/admin.php - Sales and activity reporting
includes/sales.php - PDO connection
config/db.php - MySQL database
Other components
- Student
- Administrator
Connections 32
- Student → Marketplace interface: uses
README.md - Administrator → Admin UI: uses
README.md - Marketplace interface → API-connected behavior: loads
README.md - Authentication UI → API-connected behavior: connects through
- Buyer UI → API-connected behavior: connects through
- Seller UI → API-connected behavior: connects through
- Guest browsing UI → API-connected behavior: connects through
- Admin UI → API-connected behavior: connects through
- API-connected behavior → Accounts and sessions: requests APIs
README.md - API-connected behavior → Public catalog and details: requests APIs
README.md - API-connected behavior → Seller listings and images: requests APIs
README.md - API-connected behavior → Purchase request lifecycle: requests APIs
README.md - API-connected behavior → Buyer wishlist: requests APIs
README.md - API-connected behavior → Buyer-seller messaging: requests APIs
README.md - API-connected behavior → Seller reviews: requests APIs
README.md - API-connected behavior → Moderation and reporting: requests APIs
README.md - Accounts and sessions → Session and access control: uses sessions
includes/auth.php - Accounts and sessions → CSRF protection: uses protection
includes/csrf.php - Accounts and sessions → JSON request responses: formats responses
includes/response.php - Public catalog and details → Catalog query helpers: uses helpers
api/marketplace/listings.php - Catalog query helpers → PDO connection: imports connection
api/marketplace/_common.php - Seller listings and images → PDO connection: imports connection
api/seller/add-listing.php - Purchase request lifecycle → PDO connection: imports connection
api/buyer/seller-request-action.php - Buyer wishlist → PDO connection: imports connection
api/buyer/wishlist.php - Buyer-seller messaging → PDO connection: imports connection
api/messages/send.php - Seller reviews → PDO connection: imports connection
api/reviews/seller-reviews.php - Moderation and reporting → Admin validation: uses validation
api/admin/review-listing.php - Moderation and reporting → PDO connection: imports connection
api/admin/review-listing.php - Moderation and reporting → CSRF protection: requires token
api/admin/review-listing.php - Moderation and reporting → Session and access control: requires admin role
api/admin/review-listing.php - PDO connection → MySQL database: opens PDO connection
config/db.php - Moderation and reporting → Sales and activity reporting: uses reporting