Skip to content
Edson Francisco
  • Reliability, DevOps & legacy

SIGA – Instituto Politécnico Planalto

Maintaining and modernising an inherited PHP academic and finance system, without rewriting it.

Period
2026
Status
In development
Role
Maintainer responsible for evolving the system (security, finance module, database and deployment)
Client
Instituto Politécnico Planalto (IPP)

Problem

IPP runs enrolment, registration, classes, internships, fees and student accounts on a procedural PHP system I did not write. It had security flaws, mixed collations in the database and inconsistent finance rules for fines, fees and deposits.

Solution

I took over maintenance: I imported the inherited code into git and handle the institution's requests in numbered batches. I ran a security audit and fixed authentication and SQL injection flaws, wrote tests for the finance module, normalised the database and moved deployment to Coolify. Deliveries include paying fees from the account balance, deposit checks by the registry office and a student portal with online enrolment.

Technical decisions

  1. 01

    Fix instead of rewrite

    The system handles student money and is in daily use. A rewrite would stall the institution; fixing it module by module, with tests, keeps it running while it improves.

  2. 02

    A dedicated test suite for the finance module

    Command-line PHP scripts cover refunds, deductions, balance payments, duplicate-slip prevention and provisional receipts, and exit 0/1 so they can run in CI. The tests found wrongly waived fines and a broken batch invoice generator.

  3. 03

    One collation: utf8mb4 and InnoDB

    Versioned migrations standardised the database on utf8mb4_unicode_ci and InnoDB, ending the "Illegal mix of collations" errors between local MySQL 8 and the server's MariaDB. Accented ENUMs were converted before the charset change.

  4. 04

    Modern deployment for framework-less PHP

    A nixpacks.toml and a router.php run plain PHP on Coolify, forcing the PHP provider. Uploads moved to a single persistent root so they survive redeploys.

Images

01 / 03 — Sign-in page of IPP's new Student Portal, using an ID number or student code

Technologies

  • PHP
  • MySQL
  • Bootstrap
  • JavaScript
  • Coolify

Verifiable results

cases in one run of the finance test suite
317
versioned SQL migrations
26

What I learned

In an inherited system, reproducing the bug against a local copy of the database beats guessing. And the problem is often in the data (NULL years, duplicated invoices) rather than the code.

SDGs

  • SDG 4 · Quality Educationprimary

    Online enrolment, a student portal and a tested finance module: the institute manages registrations and fees with fewer errors, and students handle their own process without visiting the office.

  • SDG 9 · Industry, Innovation and Infrastructurecomplementary

    A security audit, a normalised database and Coolify deployment modernise the digital infrastructure of an inherited PHP system, without rewriting it.