/01
FULL STACK DEVELOPER
NOWWas Advisory
- Optimized a critical endpoint, cutting latency from 3.5s to 180ms (-94%) by identifying N+1 queries, implementing eager loading and 3-layer Redis caching, impacting 10k+ requests/day.
- Rearchitected the CSV report export pipeline, replacing synchronous processing with an asynchronous architecture using Sidekiq, PostgreSQL COPY, streaming and Amazon S3, reducing export time of 1.77M records from ~80h to 7min (~600×).
- Optimized PostgreSQL queries on a base with 14M+ records, designing composite indexes and refining query strategies that cut response time from 12.7s to 0.2ms (~63,000×).
- Designed and delivered from scratch the Extrato de Débitos (Debt Statement) module with dynamic search over millions of tax debt installments, sustaining 17 incremental releases in 5 months as the main author; eliminated N+1 in polymorphic associations (not resolvable by Rails eager loading) via manual preload, replaced in-memory ID loading with SQL subqueries and closed recurring 500 errors in production.
- Ensured penny-to-penny financial consistency across three independent screens diverging in production (Extrato de Débitos, Atendimento and Maiores Devedores), implementing a shared totals composition resolver that made taxpayer debt auditable line by line.
- Reduced write cost on high-volume tables by removing 33 unused indexes and adding unique indexes on join tables via concurrent migrations (`algorithm: :concurrently`) applied with zero downtime.
- Diagnosed and fixed a race condition emitting duplicate protocol numbers in a municipal administrative system (same protocol generated 3× under double-click), replacing `SELECT MAX(number)+1` without lock with pg_advisory_xact_lock scoped by department and year, preserving cross-department concurrency, with explicit transaction guard and uniqueness validation as second defense layer.
- Architected and implemented the integration with the external SINAL API, documented in OpenAPI/Swagger, processing 100k+ records/month in a multi-tenant environment, applying Faraday, distributed Circuit Breaker (Stoplight), Retry with Exponential Backoff, Outbox Pattern, advisory locks in PostgreSQL and Sidekiq for asynchronous processing, sustaining 99.9% uptime and zero duplicate records even with an unstable provider.
- Built automated test suites with RSpec and Capybara, raising coverage from 35% to 85% and reducing production bugs through robust CI/CD pipelines, with RuboCop and Brakeman for static analysis and security.
- Evolved the critical Acordos de Dívida Ativa (Active Debt Agreements) module in a multi-tenant architecture serving 50+ municipalities, during the system migration from Rails 7 to Rails 8, structured with Devise, Service Objects and Form::Builder to encapsulate complex fiscal rules, delivering 15+ per-municipality customizations via feature flags, cutting delivery time by 60%, zeroing cross-tenant regressions and reducing module-related support tickets by 59%.
- Monitored production applications using observability tools (Datadog), identifying and resolving incidents proactively before they affected end users.
- Hands-on experience with Kubernetes in production (accessed via Pritunl VPN), using ArgoCD (GitOps), Headlamp and Grafana for continuous deploy, cluster management and incident monitoring in a high-availability environment.
- Built ObraHub, the labor tracking and billing system for Engemil, an industrial maintenance and assembly contractor, specified through successive rounds of review and feedback with the person who produced the whole process by hand — a Rails 8 + PostgreSQL + Hotwire monolith (Devise, Pundit, 12 policies, 19 importers/exporters) that replaced a paper-to-spreadsheet-to-retyping cycle. Imports the spreadsheet engineering already fills in, with SHA-256 row digests for idempotent `upsert_all` so re-uploading a file never duplicates; keeps each work package's balance as a query, not a stored column, so a 663h package shows its new balance the moment a report lands; and exports the monthly billing workbook byte-identical to the client's reference file — theme-colour fills with tint, ACCOUNTING number format and a two-column-per-hour-type summary layout, with a test that strictly parses the generated `styles.xml`. 899 examples, 0 failures; 11,551h closed in one month and 1,395 entries imported and validated in 3s in real use.
- Built Swarm, an Agent Development Environment on Rails 8 + Hotwire + SQLite that runs 1–4 Claude Code or Codex agents in parallel, each in an isolated Git worktree and branch, streamed live from a real PTY over ActionCable. Every task goes through a planner phase before any code is written — the planner runs in the PTY, writes the plan and exits, and `on_exit` starts the coder pointed at it, so a failed plan never becomes code written blind. The workspace is a tree of splittable panes serialized into the URL (agent, terminal, chat, diff, preview, any file, or another attempt at the same prompt as tabs), with a file explorer, a CodeMirror 6 editor and an embedded preview of the running app. Diff review carries per-line comments that flow back into the agent's session; PR bodies are written server-side by a headless agent from the real diff and the actual check results, with the golden path recorded in headless Chrome (Ferrum) and embedded as a GIF. Also ships Design Mode (annotate the live app like a Figma comment, sending the element's live DOM state rather than a screenshot), four agent loop patterns (Turn/Goal/Time/Proactive) behind cost, attempt and kill-switch guards with HMAC-verified webhooks, and Trello / Linear / Jira integrations. Single-process by design — the PTY registry lives in Puma's memory. Packaged as a native desktop app (Tauri 2 + WebView2 on Windows with the Rails backend running inside WSL), with complete i18n in pt-BR and English.
- Published a trilogy of Claude Code plugins covering agent input, output and side effects: lean-output compresses RSpec, RuboCop and Brakeman outputs by -70% to -97% tokens with a zero-loss guarantee on failures; rails-context injects a curated dossier (columns, indexes, associations, validations and routes), drastically shrinking the model's read surface instead of loading full `db/schema.rb` and models; rails-guard intercepts destructive Rails commands (`db:drop`, `db:reset`, `rails destroy`, `runner` with `delete_all`) via a `PreToolUse` hook, requiring human confirmation before execution.