HumanAIz
AI-assisted verification of sick leave certificates, first place at the Grupo Rocío Hackathon. The AI reads the certificate, rules in code validate it and Human Resources decides.

- Role
- Two-day team hackathon, first place; I later rewrote the current version on my own
- Period
- Nov 2025
- Status
- Completed
- Stack
- FastAPI
- Python
- PostgreSQL
- React
- TypeScript
- Tailwind CSS
- Docker
HumanAIz was born at the Grupo Rocío Hackathon, two days in November 2025. The challenge was for an AI to read a sick leave certificate and give its analysis of whether it was valid, as support for the person reviewing it and without deciding for anyone. Our team took first place, and that result was also my way into Grupo Rocío.
The prototype of those two days was put together with an app generator, Supabase and an n8n workflow. Later I rewrote it from scratch on my own to leave it in good shape, with its own backend, and published it as an open demo in English and Spanish, with test accounts and fictitious data only.
The hackathon
There were two days to build the prototype and present it. The awards were on 22 November 2025.

How it works

- The collaborator uploads a photo or screenshot of the certificate. No dates or details to type.
- The collaborator or the Human Resources analyst can ask for an AI reading, each with their own key.
- Human Resources reviews the document and the reading, confirms the dates and approves or rejects.
In the Human Resources queue, the suggestion of the reading sits next to the status, which a person always decides:

The AI reads, the code decides
The model receives the image and returns fields against a strict schema: ID number, name, dates, days, contingency, CITT number and the doctor’s license number. It gives no verdict. The 13 checks are done by plain code, with tests, and they tell the critical from the informative: the ID number matching the employee’s record is critical; the stated days adding up with the dates, or the doctor’s license number being present, only call for a review.
The result is one of three suggestions: no issues found, needs review or problems found. The reading does not change the sick leave, and the dates it read are proposed for Human Resources to confirm. No text from the document is copied into the result, so a certificate with written instructions cannot influence it.
This is a real reading of one of the fictitious certificates of the demo, the one that carries inconsistencies on purpose: it states five days for a three-day period and has no doctor’s license number.

In a test on 15 November 2026, the three sample variants gave the expected result and each reading took between 3 and 5 seconds.
Bring your own key
The demo has no central AI key. Whoever asks for a reading uses their own, from any of seven providers, and the usage goes to their account.

- The key is not stored. It lives in the memory of the tab, travels in a header with each request, and the API builds the provider client for that request only. Only the result is saved.
- The URL of each provider is fixed in the code. The user chooses the model, never the server their document is sent to.
- Nothing logs it. The proxy and the API do not log headers, errors do not echo what they received, and a strict content security policy keeps third-party scripts out.
- A canary test checks it. It sends a recognizable fake key through the whole system and then looks for it in the responses, the logs, a full dump of the database and the file volume.
One limit remains that code cannot remove: while the call lasts, the key is in the memory of the API process.
A public demo that accepts files
- Images only, and only a clean copy. The type is decided by the leading bytes, not by the name. An isolated process decodes the image under time, memory and pixel limits and encodes it again; the original is discarded, along with anything hidden in it.
- No public URLs. Every image goes through an endpoint that checks who is asking, each browser only sees what it uploaded itself, and everything expires after 24 hours.
- Layered limits. Per user, per IP and a shared overall cap, which is the one that protects the server when someone changes IP.
- Sample certificates. The demo generates fictitious, watermarked certificates to try the reading without using real documents.
Quality and delivery
- Tests. 162 backend tests, across unit, integration on a real PostgreSQL with a simulated provider and end to end on the full stack, and 45 on the frontend. None of them uses a real key.
- Contract. The frontend generates its types from the OpenAPI of the API, and a test fails if the saved contract stops matching.
- CI. GitHub Actions runs lint, formatting, migrations and tests for the backend, and lint, types, tests and build for the frontend.
- Deployment. On your own server it runs with Docker Compose: Caddy, the API and PostgreSQL. The public demo uses a single image on Vercel with PostgreSQL on Neon, and its infrastructure is defined with Terraform in a separate repository.
From the hackathon to the current version
- From a generated frontend, Supabase and an n8n workflow to FastAPI, PostgreSQL and React in containers, with no proprietary dependencies.
- From a verdict that came out of the AI workflow to rules in the repository, with tests.
- From a central key to each user’s own key, which is not stored.
- From no tests to 207 tests and CI.
Limits
- The rules are a reconstruction, because the original workflow could not be recovered. They need a review with Human Resources before being given weight.
- It does not query EsSalud or the medical board: it checks that the CITT and the license number are present, not that they are genuine.
- There is no automatic moderation of what the images show; the terms of use and the expiry cover that.
- Medical certificates are sensitive data. The demo only accepts fictitious data, and real use would first require defining the legal basis and the retention of the documents.