How fatimabasem/itcs333-project-store works
Campus Marketplace is a modular PHP/JavaScript store. A visitor uses the shared frontend, which requests catalog data through the API router; the router dispatches each area to its module handler, and implemented handlers read or write shared database state and return JSON. The README also defines cart, checkout/order, and admin capabilities, but the real cart and admin handlers shown here are placeholders. The graph preserves those documented stages without implying they are implemented. Edges reflect the router and sampled handlers; unsampled page behavior is not inferred.
Main entry points: api.php API router · db.php PDO connector · m1_auth/handler.php Authentication · m2_catalog/handler.php Product catalog
Components 13
Frontend
- Web shell
public/index.html - Catalog loader
public/app.js
API routing
- API router
public/api.php - HTTP helpers
src/http.php
Store modules
- Authentication
modules/m1_auth/handler.php - Product catalog
modules/m2_catalog/handler.php - Shopping cart
modules/m3_cart/handler.php - Checkout and orders
modules/m4_orders/handler.php - Admin tools
modules/m5_admin/handler.php
Persistence
- PDO connector
src/db.php - Marketplace data
schema.sql - Initial data
seed.sql
Other components
- Visitor
Connections 20
- Visitor → Web shell: uses
README.md - Web shell → Catalog loader: loads shell
- Catalog loader → API router: requests catalog
public/app.js - API router → Authentication: dispatches
public/api.php - API router → Product catalog: dispatches
public/api.php - API router → Shopping cart: dispatches
public/api.php - API router → Checkout and orders: dispatches
public/api.php - API router → Admin tools: dispatches
public/api.php - API router → HTTP helpers: loads helpers
public/api.php - Authentication → PDO connector: opens connection
modules/m1_auth/handler.php - Product catalog → PDO connector: opens connection
modules/m2_catalog/handler.php - Checkout and orders → PDO connector: opens connection
modules/m4_orders/handler.php - Authentication → HTTP helpers: sends responses
modules/m1_auth/handler.php - Product catalog → HTTP helpers: sends responses
modules/m2_catalog/handler.php - Checkout and orders → HTTP helpers: sends responses
modules/m4_orders/handler.php - PDO connector → Marketplace data: bootstraps schema
src/db.php - PDO connector → Initial data: loads seed
src/db.php - Authentication → Marketplace data: reads and writes users
modules/m1_auth/handler.php - Product catalog → Marketplace data: reads products
modules/m2_catalog/handler.php - Checkout and orders → Marketplace data: reads and writes orders
modules/m4_orders/handler.php