Open Source
web
5 starsTicketHub
2014-era Russian osTicket fork migrated to PHP 8.4 + MySQL 8.0 — with Kanban, REST API, inventory, and Docker on top
By the numbers
0%
Query speedup
0
DB indices added
0
Test classes
0
PHPStan level
The Problem
What I was solving
The original osTicket v1.6 codebase (a Russian fork) barely ran on PHP 7. Modern browsers tripped over Bootstrap 3 layouts, the admin panel had no API, and simple dashboard queries took 2-3 seconds because there were almost no indices. Anyone wanting to host a ticketing system in 2025 had to fight the code before even configuring SMTP.
My Approach
How I built it
Rebuilt in three passes. First: migrated to PHP 8.4 with strict types, swapped mysqli for PDO with prepared statements everywhere, and ran PHPStan at level 7 over the whole codebase. Second: replaced Bootstrap 3 with Tailwind CSS — rewrote templates component-by-component while keeping all backend behavior intact. Third: added 28 database indices informed by EXPLAIN ANALYZE on real production queries, and wrapped everything in Docker for single-command deploy. Wrote 50+ PHPUnit test classes covering business logic before touching SMTP/POP3/IMAP wiring.
Tech choices
- PHP 8.4— Strict types + readonly classes caught 40+ bugs that the PHP 7 codebase had silently lived with for years.
- Tailwind CSS— Swapping Bootstrap 3 for Tailwind cut CSS bundle from 180KB to 22KB and made dark mode a 10-line diff.
- PHPUnit 10.5— 50+ test classes ran under 4 seconds with the new Attribute-based API — fast enough for pre-commit hooks.
- Docker— Single docker compose up spins PHP-FPM, MySQL 8.0, and Nginx. No more "works on my machine".
Outcome
What came out of it
Dashboard query times dropped from 2-3 seconds to 150-200ms — a 92.5% reduction. PHPStan level 7 clean across the repo. A full REST API with Bearer token auth opened the door for integrations (Slack bots, Zapier). Ships as a Docker Compose stack that spins up in under 30 seconds. Knowledge base with full-text search and CAPTCHA protects the client portal. Admin side now has Kanban boards, a calendar view, and time tracking — modern features the old code never had.