Appendix — Backend Controllers

Source: backend/controllers/ — Map routes to business logic

CEO Summary

Controllers contain the handler logic that routes call. They orchestrate services, models, and responses. Pattern: Route → Controller → Service → Model → DB.

Core Business

ControllerPurpose
auth.controller.jsLogin, logout, session
users.controller.jsUser CRUD
products.controller.jsProduct catalog
product.controller.jsProduct (alternate)
category.controller.jsCategory CRUD
categories.controller.jsCategories (alternate)
modifier.controller.jsModifiers
catalog.controller.jsCatalog, menus
orders.controller.jsOrders
posItem.controller.jsPOS item handling

Payments & Invoicing

ControllerPurpose
payments.controller.jsPayment processing
payments.internal.controller.jsInternal payment ops
tokenization.controller.jsCard tokenization

Inventory

ControllerPurpose
inventory.controller.jsInventory CRUD
inventory.controller.modes.jsInventory modes
inventory/items.controller.jsInventory items
serials.controller.jsSerial tracking
lotmatrix.controller.jsLot matrix
kits.controller.jsKits

HR & Payroll

ControllerPurpose
hr.controller.jsHR operations
staff.controller.jsStaff CRUD
time.controller.jsTime tracking
tenantTime.controller.jsTenant time
teamHours.controller.jsTeam hours
payroll.controller.jsPayroll
payrollPeriods.controller.jsPayroll periods

Reports & Analytics

ControllerPurpose
reports.controller.jsGeneral reports
reports.sales.controller.jsSales reports
reports.sales.controller.ENTERPRISE.jsEnterprise sales
reports.payments.controller.jsPayment reports
reports.accounting.controller.jsAccounting reports

Other

ControllerPurpose
tfv.controller.jsTFV (tax/fee/voucher?)