Case Study
The manufacturing module manages projects, drawing revisions and individual pipe spools, which are prefabricated pipe assemblies. ERP project data enriches the view. Stage bookings and history are stored in the intranet database.
Project P-014
Three requests. One entry.
-
First transmissionExample ARecorded
-
Sent againExample AAlready recorded
-
Obsolete revisionExample BRejected
Booking A is recorded once.
- Record on mobileSpool + manufacturing stage
- Validate & recordPermission, revision, booking ID
- History & progressIntranet database
The problem
One booking arrives twice
A mobile transmission may be retried. A booking that has already been saved must not create a second entry in the manufacturing history.
The decision
Each booking has a unique ID
The API recognizes known booking IDs and checks permission, manufacturing stage and active revision for new bookings. The write logic also protects the same ID at database level.
The result
A result for each booking
The API reports recorded, already recorded or rejected. Valid new bookings are saved in a transaction per project, and progress is recalculated.
My role
My contribution covers architecture, the Symfony backend, Twig frontend, database integration and server operations. It also involves translating business requirements into maintainable modules.
Result
Project views, status history and progress calculations use shared manufacturing data and status rules. This connects recording work on the shop floor with a traceable overview in the intranet.
Tech stack
- Backend: PHP 8.2+, Symfony 7.4 (Security, Messenger, Scheduler, Notifier, LDAP, Mailer)
- Frontend: Twig, Tailwind CSS, Symfony UX / Stimulus, Turbo and Chart.js
- Data access: Doctrine DBAL, SQL Server and separate connections for ERP and intranet data
- Access: Web-server/LDAP authentication, a mobile API with Entra bearer tokens and role-based permissions
- Documents: mPDF, TCPDF, FPDI, Browsershot (PDF); PhpSpreadsheet (Excel)
Challenges & solutions
1. Read ERP data, write manufacturing data
Project information is read from the ERP. The manufacturing module uses Doctrine DBAL to write new stage bookings into its own tables. These different responsibilities use separate database connections.
2. Check permissions and drawing revisions
A mobile booking requires write access and permission for the selected manufacturing stage. The API rejects new bookings for spools that no longer belong to the active revision.
3. Backfilled entries must not move progress backwards
The current status uses the highest booked manufacturing stage since the last reset. Recording an earlier stage afterwards does not move progress backwards. Cancelled bookings remain in the history but no longer count towards the active status.
4. Preserve a piece’s identity across revisions
Unaffected pieces can be carried from a superseded drawing revision into the active revision. Their original ID remains, preserving the references used by status history, QR labels and packaging. Checks prevent replacing target positions that already have current status or active packaging.