IT 312 / SIAE-Commerce Project Guide
Your section

Contracts & events

Shared interfaces are the boundaries between modules. Build against the contract, not another group’s implementation.

Frozen contracts

Frozen from day 3. A change needs an issue labelled contract-change, approval from every group whose module uses it, and the instructor's merge.

Integration styles

StyleWhen to useExampleLocation
Interface call (synchronous)You need an answer nowOrders asks Cart for the items: CartServiceInterface::getItems()app/Contracts
Event (asynchronous)Something happened and others may reactOrders fires OrderPlaced; Inventory deducts stockapp/Events
External API / webhookTalking to a system outside the appPayment gateway posts to /payments/webhookPayments, Notifications, Shipping

Interfaces 12

UserServiceInterface

find($id)
currentUser()
getDefaultAddress($userId)
Users & Auth
Across all sections

CatalogServiceInterface

getProduct($id)
isAvailable($productId, $qty)
Product Catalog
Across all sections

SearchServiceInterface

search($query, $filters)
Search & Filters
Across all sections

CartServiceInterface

getItems($userId)
getSubtotal($userId)
clear($userId)
Cart & Wishlist
Across all sections

OrderServiceInterface

createFromCart($userId)
find($orderId)
updateStatus($orderId, $status)
hasPurchased($userId, $productId)
Checkout & Orders
Across all sections

PaymentServiceInterface

createPayment($order, $method)
handleWebhook($payload)
Payments
Across all sections

InventoryServiceInterface

deductStock($order)
restoreStock($order)
lowStock()
Inventory & Stock
Across all sections

ReportServiceInterface

salesSummary($from, $to)
Admin Dashboard & Reports
Across all sections

NotificationServiceInterface

send($user, $template, $data)
Notifications
Across all sections

ShippingServiceInterface

getShippingFee($address)
getTracking($orderId)
Shipping & Tracking
Across all sections

ReviewServiceInterface

getAverageRating($productId)
Reviews & Ratings
Across all sections

VoucherServiceInterface

apply($code, $subtotal)
redeem($code, $orderId)
Vouchers & Discounts
Across all sections

Events

EventFired byListeners
OrderPlacedCheckout & Orders
Across all sections
inventory: deduct stock
notifications: confirmation email
shipping: create shipment
vouchers (stub): redeem
PaymentConfirmedPayments
Across all sections
orders: set status to Paid
notifications: receipt
OrderCancelledCheckout & Orders
Across all sections
inventory: restore stock
notifications: notice
OrderShippedShipping & Tracking
Across all sections
orders: set status to Shipped
notifications: tracking email
StockLowInventory & Stock
Across all sections
dashboard: alert
notifications: admin email

Core tables

TableOwnerColumns
usersUsers & Auth
Across all sections
id, name, email, password, role (customer/admin)
categoriesProduct Catalog
Across all sections
id, name, slug, parent_id
productsProduct Catalog
Across all sections
id, category_id, name, slug, description, price, stock, image, is_active

only Inventory writes stock

ordersCheckout & Orders
Across all sections
id, user_id, status, subtotal, discount, shipping_fee, total, payment_method, address_id
order_itemsCheckout & Orders
Across all sections
id, order_id, product_id, product_name, quantity, unit_price