CIPTEA Fácil
Shipped
Overview
A multi-tenant, white-label SaaS that lets Brazilian city halls issue the CIPTEA — the national ID card for people with autism — end to end: from a request filed on the citizen's phone to the official PDF with a QR code anyone can verify.
Problem
Most city halls still issue the CIPTEA through an in-person, manual process: a paper protocol, a medical report checked over the counter, a card printed at a print shop. The result is queues, rework, sensitive health documents at risk of being lost and no reliable statistics — while Federal Law 13.977/2020 guarantees the card as a right.
Solution
Three modules over one code base. The citizen uses a Nuxt PWA: sign-up by CPF and password, a five-step request wizard with a saved draft, tracking by protocol number and a digital card available offline. The municipal officer uses a Laravel + Inertia panel: triage queue, one-click approval, return with a reason, PDF issuance, renewal and reissue, reports and the white-label settings. And anyone can verify a card on a public page, with no login, that reads the QR code and shows only the minimum: photo, name, number, municipality, status and validity.
Architecture
An npm-workspaces monorepo: a Laravel 13 application (JSON API + Inertia panel) and a Nuxt 4 PWA, sharing a design-tokens package consumed by both apps and by the PDF — switching a city's theme is runtime, with no rebuild. Plain Laravel conventions, no extra layers: business rules live in single-purpose Actions under app/Actions/<Area>/, states are PHP enums with guarded transitions, and Cpf, Cep and NumeroCiptea are value objects cast by Eloquent. Multi-tenancy is a single database with a tenant_id discriminator resolved by subdomain through one abstraction — every unique index is composite with the tenant, no domain query filters the tenant by hand, and files live under tenants/{tenant}/, so moving to a database or bucket per city stays a localized change.
Challenges
The card carries sensitive health data — ICD code, medical report, issuing doctor — so the design starts there: fields and files encrypted at rest, private storage behind short-lived signed URLs, an immutable audit trail of who viewed or changed what and from which IP, and public verification through an opaque, non-sequential token that never exposes the CPF or the internal id. The CPF is stored encrypted, with a sibling deterministic-hash (HMAC) column carrying search and uniqueness. And because a city hall can rebrand, the theme is versioned alongside the card: reprinting an old one reproduces the layout it was issued with.
Results
MVP complete and in validation with the pilot municipality — the twenty planned phases are closed, the pilot city is provisioned and the end-to-end flow is proven by the test suite. Forty-one tables, forty-five user stories and fifty-four design references drive the build; quality runs through Pint, Larastan level 6, ESLint, Prettier, vue-tsc and Pest on every GitHub Actions run. Next up: gov.br sign-in, an ICP-Brasil signature on the PDF and a free-form visual editor for the card layout.
Gallery
Click the image to view it full screen
Citizen portal, carrying the city's own brand