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)

CatalogServiceInterface

getProduct($id)
isAvailable($productId, $qty)
Product Catalog
Group 2Two modules

SearchServiceInterface

search($query, $filters)
Search & Filters
Group 2Two modules

CartServiceInterface

getItems($userId)
getSubtotal($userId)
clear($userId)

OrderServiceInterface

createFromCart($userId)
find($orderId)
updateStatus($orderId, $status)
hasPurchased($userId, $productId)

PaymentServiceInterface

createPayment($order, $method)
handleWebhook($payload)
Payments
Group 6

InventoryServiceInterface

deductStock($order)
restoreStock($order)
lowStock()
Inventory & Stock
Group 5Two modules

ReportServiceInterface

salesSummary($from, $to)
Admin Dashboard & Reports
Group 5Two modules

NotificationServiceInterface

send($user, $template, $data)
Notifications
Group 9Two modules

ShippingServiceInterface

getShippingFee($address)
getTracking($orderId)
Shipping & Tracking
Group 9Two modules

ReviewServiceInterface

getAverageRating($productId)

VoucherServiceInterface

apply($code, $subtotal)
redeem($code, $orderId)
Vouchers & Discounts
Not assigned in this section

Events

EventFired byListeners
OrderPlacedCheckout & Orders
Group 4
inventory: deduct stock
notifications: confirmation email
shipping: create shipment
vouchers (stub): redeem
PaymentConfirmedPayments
Group 6
orders: set status to Paid
notifications: receipt
OrderCancelledCheckout & Orders
Group 4
inventory: restore stock
notifications: notice
OrderShippedShipping & Tracking
Group 9Two modules
orders: set status to Shipped
notifications: tracking email
StockLowInventory & Stock
Group 5Two modules
dashboard: alert
notifications: admin email

Core tables

TableOwnerColumns
usersUsers & Auth
Group 3
id, name, email, password, role (customer/admin)
categoriesProduct Catalog
Group 2Two modules
id, name, slug, parent_id
productsProduct Catalog
Group 2Two modules
id, category_id, name, slug, description, price, stock, image, is_active

only Inventory writes stock

ordersCheckout & Orders
Group 4
id, user_id, status, subtotal, discount, shipping_fee, total, payment_method, address_id
order_itemsCheckout & Orders
Group 4
id, order_id, product_id, product_name, quantity, unit_price