How rw-tafe/coffee works
Rossco’s Coffee is a PHP coffee-shop application. The main customer journey is browsing the coffee catalog, adding items to a cart, and checking out; account registration and login support that journey. Separate admin workflows manage coffees, while subscription pages and forms let visitors subscribe to category updates. The graph also includes the shared data-access and page-rendering layers. Relationships are limited to those shown in excerpts or SOURCE INDEX references; unsampled controller details are not inferred.
Main entry points: coffees.php Coffee catalog · checkout_process.php Checkout · functions_users.php User data · nav.php Shared navigation
Components 24
Coffee shop
- Coffee catalog
view/coffees.php - Coffee management
controller/coffee_add_process.php - Cart view
view/cart.php - Cart actions
controller/cart_add_process.php - Checkout
controller/checkout_process.php - Cart data
model/functions_cart.php - Coffee data
model/functions_coffees.php - Order data
model/functions_order.php - Checkout logic
model/functions_checkout.php
Accounts
- Account page
view/account.php - Login and registration
view/login_form.php - Authentication actions
controller/authentication.php - Registration action
controller/registration_process.php - User data
model/functions_users.php
Subscriptions
- Subscription settings
view/subscription.php - Subscription actions
controller/subscription_add_process.php - Subscription data
model/functions_subscription.php
Shared runtime
- Shared header
view/header.php - Shared navigation
view/nav.php - Shared footer
view/footer.php - User messages
model/functions_messages.php - Database connection
model/database.php
Other components
- Shop visitor
- MySQL database
Connections 26
- Shop visitor → Coffee catalog: browses
view/coffees.php - Coffee catalog → Coffee data: loads coffees
view/coffees.php - Coffee catalog → Cart actions: adds item
view/coffees.php - Cart actions → Cart data: updates cart
controller/cart_add_process.php - Cart view → Cart data: loads cart
view/cart.php - Cart view → Checkout: submits checkout
- Checkout → Checkout logic: processes checkout
controller/checkout_process.php - Checkout → User data: loads user
controller/checkout_process.php - Checkout → Order data: uses order data
- Coffee management → Coffee data: manages coffees
controller/coffee_add_process.php - Login and registration → Authentication actions: submits login
- Authentication actions → User data: checks credentials
controller/authentication.php - Registration action → User data: creates user
controller/registration_process.php - Account page → Order data: loads orders
view/account.php - Subscription settings → Subscription data: loads subscription
view/subscription.php - Subscription actions → Subscription data: updates subscription
controller/subscription_add_process.php - Shared header → Subscription data: loads categories
view/header.php - Shared footer → Subscription actions: submits subscription
view/footer.php - Shared navigation → User data: loads user
view/nav.php - Shared navigation → Cart data: counts cart
view/nav.php - Coffee catalog → Shared header: renders
view/coffees.php - Coffee catalog → Shared navigation: renders
view/coffees.php - Coffee catalog → Shared footer: renders
view/coffees.php - Coffee catalog → User messages: displays messages
view/coffees.php - Database connection → MySQL database: connects
model/database.php - Database connection → Database connection: renders connection error
model/database.php