T1 Electrical SolutionsT1 Platform Docs
Platform

Source Map

Where the major platform concepts live in the Symfony codebase.

Application root

The production application is the Symfony app in app/. The Fumadocs site lives separately in docs-site/ so the Next.js documentation app does not collide with Symfony's existing app/ directory.

AreaPrimary filesPurpose
Web portalsapp/src/Controller/Portal/*Controller.phpBrowser flows for admin, client, electrician, supervisor, payroll, and finance users.
Mobile and APIapp/src/Controller/Api/*, app/src/Controller/Api/V2/*API Platform resources, mobile v2 endpoints, invitation APIs, and Xero submission APIs.
Payroll rulesapp/src/Service/Payroll/*Allowance matrix, award calculation snapshots, and recalculation orchestration.
Timesheet domainapp/src/Service/Timesheet/*, app/src/Entity/Timesheet.php, app/src/Entity/TimeEntry.phpHours calculation, edit policy, risk scoring, snapshots, approval sheets, and change logs.
Finance domainapp/src/Service/Portal/PayrollInvoiceService.php, app/src/Service/Portal/PortalFinanceService.php, app/src/Entity/PayrollInvoice*.phpInvoice preview, invoice generation, rate/allowance/material normalization, and finance portal data.
Integrationsapp/src/Service/Xero*, app/src/Service/Auth0ManagementService.php, app/config/packages/security.yamlXero OAuth/submission and Auth0 web/API authentication.
Notificationsapp/src/Service/TimesheetExpenseNotificationService.php, app/src/Service/ExpoPushNotificationService.php, app/src/Entity/InboxNotification.phpIn-app notifications and Expo push payloads after approval/rejection events.
Configurationapp/src/Entity/Client*, app/src/Entity/MasterConfigurationItem.php, app/src/Command/SeedMasterConfigurationCommand.phpClient-scoped and master data for rates, allowances, event rates, materials, categories, and work conditions.

Controller density

Graphify identified the biggest coupling points in the codebase:

Code nodeWhy it matters
ClientControllerCentral client portal controller. It touches projects, materials, cost codes, timesheets, expenses, rates, event rates, allowances, users, reports, payroll summaries, and invoices.
AdminClientManagementControllerAdmin's detailed client setup surface. It joins client setup, project setup, user assignment, and imported configuration.
FinanceController and PayrollFinanceControllerFinance and payroll finance invoice flows. They depend on invoice generation, PDF views, Xero statuses, and project/client scoping.
PayrollControllerPayroll dashboard, timesheet review, approval, weekly reports, payslips, expense review, and Xero handoff.
Timesheet, Project, and UserThe three entities most other features converge on. Timesheets connect users to projects and calculation outputs.

Route inventory from Symfony

php bin/console debug:router --format=json reports 427 routes. The broad route groups are:

GroupCountExamples
Admin portal108/admin/clients, /admin/clients/{id}/award-matrix, /admin/configuration
Client portal75/client/projects, /client/timesheetsv2, /client/finances/allowances
Payroll portal55/payroll/timesheets, /payroll/expenses, /payroll/finances/invoices
Supervisor portal26/supervisor/timesheets, /supervisor/timesheet-sheets/{id}, /supervisor/expenses
Finance portal18/finance/invoices, /finance/invoices/{id}/pdf, /finance/reports/weekly
Electrician portal14/electrician/timesheets, /electrician/expenses, /electrician/notifications
API v2 electrician12/api/v2/electrician/timesheets, /api/v2/electrician/expenses
API v2 supervisor10/api/v2/supervisor/timesheets/{id}/approve, /api/v2/supervisor/expenses/{id}/reject
API Xero submission4/api/xero/timesheets/{id}/submit, /api/xero/expenses/submit-batch
Registration4/register/invite/{token}, /register/client-user/{token}
Xero OAuth4/xero/auth, /xero/callback, /xero/disconnect

Practical reading order for developers

  1. Start at Timesheet, TimeEntry, Project, User, and Client entities.
  2. Read TimesheetHoursCalculator to understand raw working-hour breakdowns.
  3. Read AllowanceMatrixCalculator to understand calculated allowance lines.
  4. Read AwardTimesheetCalculationManager and AwardTimesheetCalculator to understand current calculation snapshots.
  5. Read PayrollInvoiceService to understand final invoice item amounts and fallback behavior.
  6. Read the portal controller for the role being changed, then push shared behavior into a service if the same rule appears in more than one portal.

On this page