Skip to content

Collaboration Education

Universidad de Colima

Sistema Generador de Folios

Official folio control for every department of a public university.

Visit site
Client
Universidad de Colima
Industry
Education
Year
2023
Status
Live

Context

Mexico’s Ley General de Archivos, and the Ley de Archivos del Estado de Colima with it, require every public institution to run a documented archive system: every official document enters a controlled chain — correspondence, then the active archive, then the intermediate archive, then the historical one — and the institution has to be able to show that chain holds. The Universidad de Colima created its Sistema Universitario de Archivos by Acuerdo No. 08 in 2019, and set its current rules by Acuerdo No. 25 in 2023. A university is not one office. It is dozens of organizational units, each of them producing oficios and official documents every day, and the law contemplates all of them.

The problem

The control was being kept by hand. There was no automatic register, so verifying anything meant going through the documents one by one. At the scale of an institution that is not only slow, it is unprovable. A folio register that lives in separate books across dozens of departments cannot demonstrate the two things the law actually asks of it: that no number is duplicated anywhere in the institution, and that any given document can be traced. The problem was never that the work was tedious. It was that the obligation could not be evidenced.

The solution

The folio is not a counter. It is the document’s archival classification, written as a code: function, then section, then series, then subject, followed by the issuing unit, a consecutive number and the year. Requesting one walks the operator down that tree, so a document is classified at the moment it is born rather than catalogued later by someone reading it cold. The consecutive restarts each January because it is derived from the documents of the current year, which means nothing has to run on New Year’s Eve for it to be correct.

A folio is never deleted. The delete method exists and is deliberately empty. Cancelling one records a reason and keeps the number spent, so a cancelled folio can never be reused and the series stays unbroken — which is the property an archive has to be able to demonstrate. Every action writes to a log with the user, the folio, the activity and the IP it came from. Sign-in goes through the university’s own identity provider over SAML, so the system holds no passwords.

It is worth being precise about what this is and is not. The Sistema Universitario de Archivos is the institutional system: the rules, the coordinating area under the Secretaría General, the correspondence area, the three archives and the interdisciplinary group that values the documents. The Sistema Generador de Folios is one tool inside it, and the one I built. That distinction is also the answer to why an internal tool runs in every department: not because it spread, but because the obligation reaches all of them, and a folio control covering part of an institution would not be a control.

What it does

  • Folio built from the archival classification tree: function, section, series and subject
  • Consecutive per subject, restarting with the calendar year
  • Cancellation with a recorded reason — the number stays spent, never reused
  • Audit log of every action with user, folio, activity and originating IP
  • Single sign-on through the university’s identity provider over SAML; no passwords held
  • Each unit sees its own history; the coordinating role sees all of them, filterable by unit
  • History searchable by year range, status and folio code

Architecture

The server it had to live on could not run a modern runtime, so there was no framework to reach for. I wrote the minimum that deserves the name: a front controller routing the request, an abstract data class over PDO prepared statements that every model extends, and the audit log and pagination built into that base so no model can forget them. Four controllers, three models, and nothing that is not used. The constraint is the interesting part. A hand-rolled framework is usually the wrong answer and a liability the moment its author leaves. It was the right one here because the alternative was not a better framework — it was not shipping, or shipping something the university could not host.

My role

Sole developer. The framework, the data layer, the folio logic and the interface, inside the Dirección de Sistemas of the university’s General Technologies Coordination.

Built with

PHP (MVC)MySQL (PDO)JavaScript ES6
Custom SoftwareEnterprise Systems

Related services

Other work

Built, shipped, and still running.

View the full portfolio

Something similar on your side?

If this looks like the problem you have, the first conversation costs nothing.