Back to Programming

Case study · Collaboration

Construction Gantt Planner

Scheduling app for construction projects. I joined an AI-assisted prototype built by a non-developer and helped take it to production.

Mar — Jun 2026 Client anonymized · screenshots use seeded test data
React
TypeScript
Vite
gantt-task-react
@react-pdf/renderer
Node.js
Express
PostgreSQL
Docker
Railway
Download PDF

From prototype to maintainable code

60 commits over 12 weeks. The AI-assisted frontend lived in two huge untyped components.

Main component

2,893 <450

lines, after extracting hooks, utils, panels and modals

Frontend files

18 JS 89 TS

full migration to TypeScript with domain and API types, 0 JS files left

Gantt chart logic

1 file 24

typed hooks and handler modules instead of a 601-line component

The app

Task hierarchy, dependencies (FS, SS, FF), progress and costs per task, rolled up to stages.

Gantt chart of a residential building project with a task tree, dates and costs on the left and dependent bars on the timeline (opens full-size image in a new tab)
Tap to open full size

Bugs I fixed

Most issues came from approximating the behavior of the gantt-task-react library instead of matching it exactly.

Ctrl+drag on macOS

Problem

Ctrl+click opened the context menu, and a lost keyup left the chart stuck in move mode.

Fix

Blocked the native menu on the chart and re-synced the Ctrl state on every mousemove.

Move vs. resize

Problem

In day view the library returns 00:00 / 23:59 dates, so moving a task was detected as resizing it.

Fix

Normalized dates to 12:00 before classifying the drag.

Misaligned weekends

Problem

Weekend highlights drifted from the grid because of an approximated px-per-day.

Fix

Reproduced the library's exact date-to-x mapping: pixel-perfect alignment.

PDF export engine

Replaced screenshot-based html2canvas with @react-pdf/renderer: paper sizes, pagination, timeline density and numbered dependency arrows across pages.

Print and PDF export dialog with paper size, orientation, timeline zoom and a live PDF preview (opens full-size image in a new tab)
Tap to open full size

Exported PDF

A page of the exported schedule: dependency arrows that leave the page are numbered so they can be matched on the next one.

Exported PDF page of the Gantt chart with dependency arrows and numbered markers at the page edge (opens full-size image in a new tab)
Tap to open full size

My role

  • Joined a project started as an AI-assisted prototype and made it maintainable: refactoring and TypeScript migration
  • Took part in client meetings, gathered requirements and turned feedback into features
  • Built new features: PDF export engine, multi-select drag with dependency validation, live progress bars
  • Fixed the deployment: backend dependencies on Railway, DATABASE_URL support, Docker scripts for the database
  • The app is running in production and the project is complete

Technical details

Paginating a Gantt chart into a PDF

The old export took a screenshot of the page with html2canvas. The new one renders the schedule with @react-pdf/renderer: horizontal and vertical pagination that cuts at gaps between tasks, an adjustable timeline density, the task hierarchy, and dependency arrows that continue across pages with numbered markers.

Matching the library instead of approximating it

The prototype guessed how gantt-task-react maps dates to pixels and which time of day it uses. I reproduced the library's exact date-to-x mapping and its date convention, which fixed weekend overlays, drag classification and the drag-to-link target bar.

Multi-select and deployment

Added multi-select with synchronized moving and dependency validation, live progress bars with a visibility toggle, and locked manual progress on summary tasks (it is computed from children). On the backend side, fixed the Railway build, added DATABASE_URL support and Docker scripts for the database.

© 2026 Oskar T.T