
Technical challenge inspired by Rio's city hall: case workers need to see each child's health, education and social-assistance alerts in one place and mark which cases were reviewed.
Built it solo: database model, REST API with authentication, interface with map and charts, unit and E2E tests, Docker and deployment.
SQLite instead of PostgreSQL
No extra server in Docker Compose and WAL enabled for concurrent reads. Documented trade-off: with many concurrent writers, PostgreSQL would be the choice.
JWT in a SameSite=Strict cookie
Next.js middleware redirects to login before rendering, with no flash of protected content, and the cookie reduces CSRF risk.
Summary computed in a single loop
The metrics endpoint walks the records once, O(n), regardless of how many indicators are computed.
Tests in three layers
Jest + Supertest on the API, Vitest + Testing Library on components and Playwright end to end, on desktop and mobile.
Published app, with a README documenting architecture, decisions and trade-offs. The free backend may take up to 60 s to wake up on first access.