Portfolio for Matheus Paiva — Platform & Infrastructure Engineer. Infrastructure case studies with the reasoning attached: context, architecture diagram, the decisions and what they were chosen over, the delivery pipeline, and results.
Live at matheuspaiva.dev.
noUncheckedIndexedAccesspnpm install
pnpm dev # http://127.0.0.1:3000
pnpm check # lint + typecheck + test + build
pnpm test:coverage
pnpm security:audit
The image builds the static export and serves it with nginx — the same files GitHub Pages serves, plus the security headers a static host cannot set.
pnpm docker:build
pnpm docker:up # http://localhost:3011
pnpm docker:logs
pnpm docker:down
src/app Routes, metadata, error boundaries, SEO files
src/components Reusable primitives, theme, motion, diagrams
src/config Public site configuration and navigation
src/content content.json (published from the panel) and the Zod schemas that gate it
src/features Domain blocks for home, work and contact
src/lib Pure, tested utilities
admin/ Django control panel: models, API, and the Django admin fallback
admin-ui/ React control panel served by Django on the same origin
scripts/ content:pull — the one bridge between the panel and the build
docs/ Architecture, quality and security notes
CONTENT-TODO.md What is still missing from the content, in priority order
Content lives in the control panel and is pulled into the repository as a committed file:
docker compose up -d db admin # panel at http://localhost:8000
ADMIN_USER=... ADMIN_PASSWORD=... pnpm content:pull
git diff src/content/content.json # review, then commit
The build reads src/content/content.json and nothing else — see
docs/architecture.md for why the dependency points that way.
src/content/schema.ts is the file worth reading first. It forces every case study to declare its
context, an architecture diagram, at least one decision as choice / alternative / rationale,
its delivery pipeline, and at least one result. Tests in src/content/content.test.ts enforce
those rules and fail the build if a placeholder ever reaches a page.
See docs/architecture.md for why.
.github/workflows/ci.yml runs lint, type check, coverage and format check. It is a reusable
workflow that .github/workflows/pages.yml calls before building, so a failing gate blocks the
deploy instead of being reported afterwards.
Known gaps are documented rather than implied — see docs/quality.md for what is not covered by tests, and docs/security.md for why response headers are absent on the GitHub Pages deployment.
The overview includes first-party traffic metrics collected by the Django service. Configure the
public build with NEXT_PUBLIC_ANALYTICS_ENDPOINT, allow the exact site origin through
ANALYTICS_ALLOWED_ORIGINS, and use a dedicated production ANALYTICS_HASH_SALT.
Schedule the retention command once per day on the admin host:
python manage.py prune_analytics
It keeps 90 days of detailed events and preserves daily totals. No raw IP address is stored.