# Matheus Pavaneli

> Senior fullstack engineer · forward-deployed AI engineer. I take the broken, the abandoned and the not-yet-built — including the LLM systems a company is putting into production for the first time — and hand back an architecture, with the number it moved.

*Hand me the system nobody wants to own.*

- Now: Senior Software Engineer · Bernoulli Educação, EdTech
- Core stack: TypeScript · Python · Node/NestJS · React/Next · PostgreSQL · AWS
- Works from: Maringá, Brazil · UTC−3 · remote · any US time zone · English C1
- Status: Available in 7–14 days · contractor, EOR or direct hire · any US time zone
- Email: matheuspavaneli@proton.me
- Phone: +55 44 99775-2680
- LinkedIn: https://www.linkedin.com/in/matheuspavaneli/
- GitHub: https://github.com/matheusPavaneli
- Résumé as PDF: https://matheuspavaneli.github.io/portfolio/matheus-pavaneli-resume.pdf
- Résumé as JSON Resume: https://matheuspavaneli.github.io/portfolio/resume.json
- Web page: https://matheuspavaneli.github.io/portfolio/en/
- Portuguese version: https://matheuspavaneli.github.io/portfolio/pt/index.md

## Cases

Production work first, then my own projects. Each one before and after.

Each bar is how far a number moved, on one shared logarithmic scale — so the lengths compare across cases, and none has been rescaled to look good. A limit that held, or a single figure, is stated rather than drawn.

### LLM systems in production

Bernoulli Educação · EdTech, 100K+ students · 2025 – now

*The company's first AI feature, built so no single vendor can take it down*

I designed and delivered the orchestration architecture: an orchestrator routing requests across specialised agents, provider failover so one vendor outage cannot take the feature down, and a MongoDB layer carrying document retrieval, agent execution logs and a response cache that cuts the cost of repeat inference. The provider was not chosen by reputation — five models were benchmarked on cost, latency and output quality, and the numbers picked one. In production it serves 100K+ users, with latency down 90% and cost down 40%.

- Reading: −90% latency (ratio 10.0×) — latency in production, alongside a 40% cut in inference cost, on a system 100K+ users rely on
- Stack: LLM orchestration, Multi-agent routing, Provider failover, MongoDB, NestJS

### rag-eval (Published)

Open source · a RAG pipeline that measures its own retrieval · 2026

*Whether the answer came from the right passage, measured before anything was tuned*

Thirty questions over fifty Python Enhancement Proposals, with the ground truth recorded as character spans rather than chunk ids, so changing the chunking cannot quietly rewrite the answer key. Dense, BM25, hybrid and a cross-encoder reranker are compared question by question: the reranker lifted recall to 0.833. Every answer quotes its sources, and code resolves each quote to characters in the document — 51 of 52 were found verbatim. CI replays BM25, dense, hybrid and every recorded answer with no key and no network call, and fails on any change.

- Reading: 847 chars → 104 (ratio 8.14×) — characters a reader has to check per citation: the whole chunk, against the quote resolved inside it
- Stack: Python, PostgreSQL, BM25, Gemini embeddings, Cross-encoder reranking, Astro
- Links: [citation viewer](https://matheuspavaneli.github.io/rag-eval/), [github](https://github.com/matheusPavaneli/rag-eval)

### The two-second query

Bernoulli Educação · 2026

*The planner was not slow. Its statistics were stale.*

A core query took two seconds and nobody could say why. EXPLAIN ANALYZE said it plainly: the divergence between estimated and actual rows exposed a sequential scan chosen over an index that already existed. I refreshed the statistics, restored correct index usage, tuned the autovacuum thresholds so it would not come back, and wrote the method down for the team — the fix is worth less than the second time somebody finds it themselves.

- Reading: 2 s → 150 ms (ratio 13.3×) — on the query that had been taking two seconds
- Stack: PostgreSQL, EXPLAIN ANALYZE, autovacuum

### Seal (Published)

Open-core · Apache-2.0 local mode on npm · 2026

*Approval-as-an-API: human-in-the-loop as infrastructure, not as a code change*

An approval gateway for AI agents. An MCP proxy intercepts tools/call and holds the risky ones until a human signs, with a declarative policy engine so approval is by exception rather than by default, and elicitation and sampling relayed back in both directions. Every decision lands in a hash-chained audit trail that verifies offline. Agent code does not change to adopt it — the proxy is the integration.

- Reading: 0 lines — lines of agent code changed to put a human in the loop
- Stack: MCP, Hono, Drizzle, PostgreSQL, Apache-2.0
- Links: [useseal.dev](https://useseal.dev), [github](https://github.com/useseal/seal), [npm](https://www.npmjs.com/package/@seal-dev/sdk)

### Nanquim (Published)

Pix checkout SDK · provider-agnostic · 2026

*The Brazilian market ships backend SDKs in seven languages and stops at the browser*

An embeddable Pix checkout that runs on the merchant's own domain, inside a Shadow DOM, with no runtime dependency in the browser and no request beyond the merchant's own backend. No credential can reach the bundle, because the SDK takes functions and not keys. There is no onSuccess, because the truth of a payment is a signed webhook and never the browser. Illegal states are unrepresentable and the promised amount is an invariant.

- Reading: 12.14 kB ≤ the gate (ratio held) — gzipped — a size the build refuses to exceed, not a number in a README
- Stack: TypeScript, Shadow DOM, Pix, Zero runtime deps

### Anchor (Published)

B2B SaaS · retention intelligence for performance agencies · 2026

*Churn is visible in the ad accounts weeks before anybody cancels*

A platform that scores client health from Google Ads and Meta Ads signals, learns the weights per client rather than applying one model to everybody, and writes a weekly brief an account manager can act on. Multi-tenant with row-level security, Stripe billing gates, and observability built in from the first deploy rather than added after the first incident.

- Reading: 6–10 weeks — of warning before a client churns
- Stack: Next.js, Multi-tenant RLS, Stripe, Google Ads, Meta Ads

### technology-art (Published)

Scroll-led essay · WebGL · 2026

*Eight artefacts, 3.3 million years, one point cloud reassembled into each of them*

A history of technology told through eight objects, from a struck stone to machines that are learning to judge. One WebGL point cloud is reassembled into every era's form, the interval between two eras sets the height of the silence before it, and a single accent walks the spectrum as you read. The heavy layers wait for the reader's first move, which is why the artefact survives the score.

- Reading: 99 ≤ 100 (ratio held) — Lighthouse on mobile, against a ceiling of 100 — and 100 on desktop
- Stack: three.js, GLSL, GSAP, Lenis

### The abandoned dashboard

Jorrovi Calçados · financial and administrative systems · 2023 – 2025

*Inherited with no handoff, no documentation, and numbers the business was already deciding on*

Revenue, cost and cash-flow reporting used from the operations floor up to the owners, handed over with nothing. I reverse-engineered it, assessed the debt and set the migration strategy alone, then stabilised it on three fronts: killed the crashes, traced and corrected the figures it had been reporting wrong, and cut load times. The migration ran incrementally while the system stayed in daily use — no feature freeze, no big-bang rewrite, no interruption to financial reporting. Promoted within six months.

- Reading: 40+ views — migrated to React over fifteen months, with the system live throughout
- Stack: React, TypeScript, Kubernetes

### The 1.9 GB image

Freelance · Workana · 2024 – 2025

*Nobody had documented why it was that big, so the first job was finding out*

A frontend Docker image nobody wanted to touch, with no prior documentation to work from. I diagnosed the cause rather than trimming layers at random, then rebuilt the pipeline around multi-stage builds. Smaller artifacts dropped registry and transfer costs by over 60% on top of the build time.

- Reading: 1.9 GB → 210 MB (ratio 9.05×) — an 89% reduction, from a pipeline rebuilt rather than trimmed
- Stack: Docker, Multi-stage builds

## Roles

### Bernoulli Educação — Senior Software Engineer

Nov 2025 – now · full-time

LLM orchestration architecture. Weekly release batches to daily continuous deployment with automated test suites. Authored the team's code review standard.

### Eicode — Senior Fullstack Engineer · promoted from mid-level

Oct 2024 – Jun 2025 · full-time

Sole technical owner of a greenfield social platform: 12 feature modules, no senior above me, and the technical direction three other engineers built to. Recommendation engine written from scratch — TF-IDF with cosine similarity, no third-party ML service. Technical lead on international engagements, in English.

### Independent Contractor via Workana — Senior Fullstack Engineer · 5+ concurrent engagements

Jan 2024 – Nov 2025 · part-time

Delivered alongside full-time roles. Multi-provider authentication built from the ground up — email, Google and Microsoft, 2FA, recovery — with no auth incident reported post-launch. Production Stripe billing for three client platforms, webhooks built for idempotency so retries never double-charged.

### Jorrovi Calçados — Junior Fullstack Engineer · promoted from trainee

Apr 2023 – Jun 2025 · part-time

The abandoned financial dashboard, above. TypeScript rolled across the codebase after making the case to non-technical stakeholders, and Kubernetes deployments automated across dev, staging and production.

## Skills

- Languages & frameworks: TypeScript, JavaScript, Python, PHP, React, Next.js, Vue.js, Node.js, NestJS, FastAPI, Django / DRF, Fastify, Express, Laravel, TailwindCSS
- AI engineering: LLM orchestration, Multi-agent routing, Provider failover, Response caching, Model evaluation, MongoDB retrieval, LangChain, Pydantic structured output, Embeddings & vector search (pgvector), scikit-learn, NumPy
- Data & messaging: PostgreSQL, MySQL, MongoDB, DynamoDB, Redis, Firebase, Kafka, RabbitMQ, BullMQ, Celery, SQLAlchemy / Alembic, pandas
- Cloud & infrastructure: AWS EC2 · Lambda · S3, SQS · SNS · API Gateway, CloudFront · RDS, ECS · Fargate, Azure App Service · Functions, Azure Service Bus · AKS, Docker, Kubernetes, Nginx, Linux, Git, CI/CD, boto3
- Architecture & APIs: Clean Architecture, DDD, Event-Driven, Microservices, CQRS, Hexagonal, Serverless, SOLID, REST, GraphQL, Jest, pytest, mypy / Ruff

## Method

What I do when I am handed a system. Six rules, each one paid for by a case above.

- **Read the instrument before guessing.** EXPLAIN ANALYZE said the plan was wrong. Nobody had looked. (Paid for by: The two-second query)
- **Assume the vendor fails.** Provider failover, so one outage cannot take a feature down. (Paid for by: LLM systems in production)
- **Put the limit in the build.** 12.14 kB is a gate CI enforces, not a claim in a README. (Paid for by: Nanquim)
- **Migrate live.** 40+ views over fifteen months, with the system in daily use. (Paid for by: The abandoned dashboard)
- **Write the standard down.** A code review standard now applied across every backend service.
- **Make illegal states unrepresentable.** No onSuccess in the browser: the truth of a payment is a signed webhook. (Paid for by: Nanquim)

## Build

Every box on the diagram was a requirement first. Nobody draws the final architecture on day one. It grows one requirement at a time, and each thing added solves one problem and starts charging for another. Here are seven of them, in order.

1. **Serve users.** Adds: One API, one database. Costs: Nothing yet — one thing to deploy, one to back up.
2. **Reads under 200 ms at p95.** Adds: A cache. Costs: Every write now has to invalidate something.
3. **Ten times the traffic.** Adds: A load balancer and stateless API instances. Costs: Session state can no longer live in the process.
4. **Reads far outnumber writes.** Adds: Read replicas. Costs: A read can now lag the write before it.
5. **Slow work can't hold the request.** Adds: A queue and workers. Costs: Jobs fail out of sight, so they need retries and a dead-letter queue.
6. **A provider outage can't take us down.** Adds: A circuit breaker and a fallback provider. Costs: Two integrations to keep honest instead of one.
7. **Know it broke before users do.** Adds: Logs, metrics and traces from every box. Costs: A bill, and someone on call to read it.

## Other repositories

- [depguard](https://github.com/matheusPavaneli/depguard) — Preventive npm dependency risk scoring: registry metadata, lifecycle scripts, OSV advisories and typosquatting heuristics. (TypeScript, OSV, CLI)
- [env-validator](https://github.com/matheusPavaneli/env-validator) — Validates process.env at startup against a typed schema, collecting every error at once, with inference and no dependencies. (TypeScript, Zero deps)

## Education

B.Eng. Software Engineering · Cruzeiro do Sul · in progress, expected 2029

## Languages

Portuguese, native · English, C1 — used daily in production: ceremonies, code review, technical docs.

## References

Gleyver Coutinho Castro, who managed me at Bernoulli. One line of the two recommendations below, both quoted in full. The index maps each trait to the passage that says it; point at one to light it.

### Gleyver Coutinho Castro

Software Engineering Manager · Bernoulli Educação · Managed me directly · 2026-08-23

> I had the privilege of working with Matheus at Bernoulli, and I can attest that his impact goes far beyond the lines of code he delivers.
>
> What truly sets Matheus apart is his genuine autonomy and strong sense of ownership. Whenever we faced complex and ambiguous problems, he was the one who dove deep into the technical investigation, mapped out bottlenecks, made assertive architectural decisions, and drove solutions from start to finish with total responsibility.
>
> In addition to his excellent technical background and analytical skills, his communication and collaboration with the team are flawless. He has a natural ability to translate difficult problems into clear discussions, engage the team, and keep everyone aligned. He is the kind of engineer who raises the technical bar of any team and someone you can trust implicitly to unblock the toughest challenges.

Traits cited:
- Owns it end to end: “genuine autonomy and strong sense of ownership”
- Finds the cause before the fix: “dove deep into the technical investigation, mapped out bottlenecks, made assertive architectural decisions”
- Owns it end to end: “drove solutions from start to finish with total responsibility”
- Makes the problem clear: “translate difficult problems into clear discussions, engage the team, and keep everyone aligned”
- Raises the team: “raises the technical bar of any team”
- Trusted with the hard problem: “trust implicitly to unblock the toughest challenges”

Posted on LinkedIn: https://www.linkedin.com/in/matheuspavaneli/details/recommendations/

### Kevin Blair

QA Automation Engineer · Bernoulli Educação · Same team · 2026-06-08

> I had the chance to work with Matheus, and one thing that always stood out was his enthusiasm for technology and learning new things. He's someone who genuinely enjoys exploring new ideas, takes on challenges with a positive attitude, and always puts in the effort to get things done right. On top of that, he's a great teammate who's always willing to help and share what he knows. It was a pleasure working with him.

Traits cited:
- Keeps learning: “enthusiasm for technology and learning new things”
- Keeps learning: “genuinely enjoys exploring new ideas”
- Trusted with the hard problem: “takes on challenges with a positive attitude”
- Owns it end to end: “puts in the effort to get things done right”
- Raises the team: “always willing to help and share what he knows”

Posted on LinkedIn: https://www.linkedin.com/in/matheuspavaneli/details/recommendations/

## Contact

What are you building? Open to engineering roles and to contract work where somebody has to own an AI feature end to end. I reply within a day.

- Email: matheuspavaneli@proton.me
- Phone: +55 44 99775-2680
- LinkedIn: https://www.linkedin.com/in/matheuspavaneli/
- Maringá, Brazil · UTC−3 · remote
