Selected work

Case study 03

Production planning. A daily system for a weaving and embroidery factory.

Finite-capacity planning for a textile and embroidery factory: cycles, stages, machine queues, daily follow-up, and rescheduling from actual output.

Sector
Textile and embroidery manufacturing
Type
Daily production planning and follow-up
Role
End-to-end owner: factory method, data model, scheduling engine, Arabic and English UI, database, and release

The business problem

Each item passes through weaving, embroidery, appliqué, and other department stages. Every stage has minutes per piece, a headcount, and machines. Before the system, the plan was spread by hand.

  • There was no real calculation of the day’s capacity. Quantity was split across days without working hours, efficiency, headcount, or the factory calendar. Friday is off. Saturday is a working day.
  • Who runs which machine, who is paused, and who is stopped did not live in one place.
  • The next stage was scheduled as if it were independent.
  • If a department produced less or more than required, later dates did not move on their own.

What the system changes

Operating timings are not listed. No percentage is stated without a measurement.

A plan in minutes

The cycle, the items, and the queues generate a stage schedule: start, finish, planned quantity, and working days.

Capacity is a constraint

Daily quantity comes from department hours × efficiency × headcount ÷ minutes per piece.

Daily supervision

Each item is on time, late, or not started. Follow-up compares plan with actual.

The plan moves with reality

After actual output is recorded, rolling reschedule closes the finished part and recalculates the rest, with a preview and a rollback.

The machine decision is recorded

Each weaving or embroidery machine has a queue, with pause, resume, and a final stop.

How the engine works

  • A stage does not start before the previous stage finishes, or before the worker or machine is free.
  • Queues set the order of items on a machine. A pause or a final stop changes the quantity and the schedule.
  • Reschedule closes recorded days, rebuilds the rest, and keeps the last version for rollback.

Define the factory

  1. Departments and efficiency
  2. Machines
  3. Stage templates

The cycle

  1. Create a cycle
  2. Items and quantities
  3. Queues
  4. Generate the schedule

Execution

  1. Daily follow-up
  2. Plan versus actual
  3. Gantt

Correction

  1. Preview
  2. Apply or roll back
  3. Delay board

Technical architecture

No cycle names, item codes, quantities, or delivery dates are shown.

InterfaceNext.js 16, React 19, TypeScript, Tailwind CSS 4, Arabic RTL and English
ServerNext.js Route Handlers
DataPostgreSQL on Supabase, JSONB for stages, queues, and the follow-up log
EngineFinite-capacity scheduling written for this line
CalendarLocal working days, Friday off
HostingVercel, with a longer limit for rescheduling