João Victor Borges
Social monitoring dashboard
Context and problem

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.

My role

Built it solo: database model, REST API with authentication, interface with map and charts, unit and E2E tests, Docker and deployment.

Stack
Next.js 16TypeScriptTailwind 4shadcn/uiReact QueryLeafletRechartsExpress 5SQLiteJWTJestVitestPlaywrightDocker
Technical decisions
01

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.

02

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.

03

Summary computed in a single loop

The metrics endpoint walks the records once, O(n), regardless of how many indicators are computed.

04

Tests in three layers

Jest + Supertest on the API, Vitest + Testing Library on components and Playwright end to end, on desktop and mobile.

Screen gallery
login
dashboard
children list
Result

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.