Skip to main content
joão

2025 — Case Study

Censo Operacional

Statewide operational school census — secure collection, validation, consolidation, and administrative analysis for SEDUC-PA

Go 1.24Next.js 16TypeScriptPostgreSQL 16chipgxDockerDocker ComposeGoogle Sheets APIGoogle Drive APIexcelize
01

Context

SEDUC-PA needs structured operational data from schools across the state: infrastructure, staffing, services, equipment, and school profile information. I built the data-collection application as its sole author and was the original builder of the administrative dashboard. The system replaces fragmented form-and-spreadsheet flows with a versioned application backed by a Go API and PostgreSQL, while retaining Google Workspace integrations for operational reporting.

02

Architecture

Polyglot monorepo with a Next.js frontend, Go API, PostgreSQL persistence, and containerized local infrastructure. Business rules and administrative analytics remain separated from the UI layer.

/web

Next.js + TypeScript + React Hook Form + Zod — multi-step, schema-driven data collection and administrative interfaces

/api

Go 1.24 with chi and pgx — authentication, validation, persistence, analytics, exports, and Google integrations

/infra

PostgreSQL 16, migrations, Docker Compose, environment configuration, and reproducible local infrastructure

Google Workspace

Sheets and Drive integrations preserve reporting workflows used by administrative teams

03

Engineering Decisions

01

Go for the backend boundary

The API uses Go as an explicit backend boundary instead of placing server logic inside the frontend application. This keeps validation, persistence, integrations, and administrative analytics independently testable and gives the project a small, predictable runtime surface.

02

pgx directly — no ORM

Database access uses pgx directly so complex analytics and aggregation queries remain visible, reviewable, and tunable as SQL. Transaction boundaries and query behavior stay explicit instead of being hidden behind an ORM abstraction.

03

Google Workspace remains an integration, not the database

PostgreSQL is the source of truth. Sheets and Drive are used as operational reporting and export integrations, preserving familiar analyst workflows without making spreadsheets responsible for application integrity.

04

Schema-driven multi-step collection

The census flow is divided into 14 logical sections and validated across client and server boundaries. The form supports partial progress while keeping submitted data structured and consistent for downstream analytics.