Samuel Lucas

At Nocartório

Some of what Samuel has built and maintained on the notary-office management SaaS since 2024.

elasticsearch / scout — search.logSearch
Profiles indexed with self-healing search about 6,000,000

Retries with backoff, a circuit breaker, periodic reconciliation and an alert. When the cluster goes down, search comes back on its own and nobody reindexes by hand.

drafts / autosave.jsonPerformance
Draft autosave · 347-page PDF
155 MiB 7.7 KB

Images moved out of the HTML as base64 and into storage, with chunked uploads and async extraction. The same document got roughly 20,000× lighter.

pdf / single-engine.phpPDF
Legally valid books and certificates 1,126 files changed TCPDFWeasyPrintmPDFtc-lib

Three legacy engines became one, printing the same number of pages across every specialty. Then he removed the legacy code, down to the Python PDF service he had maintained himself.

pdf-extractor / main.rsRust
PDF rasterizing · Rust + PDFium
4.0 s 1.9 s

Ghostscript left the main app. The new service holds no secrets, has no network access and returns pixel-identical images.

auth / TwoFactor.phpSecurity
2FArequired by law

TOTP, recovery codes, email OTP and trusted devices.

Fixed:Auth bypassIDORXSSCSRFOpen redirect
tests / booksTests
Book test suite · ~4,200 tests 16×faster Before3h20 After12 min

He measured where the time went, cut repeated work in the PDF engine and ran the suite in 8 processes.

config / queue.phpInfra
Horizon queues 90 swhen long jobs kept dying

The cause was a single retry_after on the Redis connection, shared by 44 supervisors. Jobs of up to 18 h went back to the queue while still running, with up to 5 copies at once. He split the connections by duration.

books / protocol.sqlDiagnosis
Protocol book 122hidden prints across 26 offices

Printing with no pending title archived a blank page on top of the real print. He measured the damage in production across 4,378 titles and fixed the cause in both engines.

Full-stackSoftwareengineer.

Samuel has been working in software for over four years, mostly with PHP/Laravel and Vue 3 with TypeScript, with some .NET along the way. Architecture and code quality are what he cares about most in the job.

At Nocartório, a management SaaS for Brazilian notary offices, he mostly works on legally valid PDF generation and search. There, a certificate can’t gain an extra page and search can’t disappear when the cluster goes down.

Before that, he worked at CCO Bank (Flutter and .NET), Techmind Solutions (.NET and React) and CloudOpss Solutions (Python automation).

Outside work, he trained a car model classifier with transfer learning (EfficientNet) on the public UTFPR-CMMD dataset. Test accuracy went from 61% to 78%, and the conclusion he wrote down is that the next gain would come from the data, not the model.

Journey

Started out automating data collection with Python, then moved through banking and high-volume document generation. Now at a SaaS for notary offices.

  • Led the move from three legacy PDF engines to a single engine (tc-lib) for books and certificates in every specialty, with the legacy page count guaranteed by tests. Then removed the legacy code, including the Python PDF service he had maintained himself.
  • Moved draft images out of the HTML and into storage, with chunked uploads and async extraction. Autosave for a 347-page PDF dropped from 155 MiB to 7.7 KB.
  • Isolated PDF rasterizing in a Rust microservice with PDFium, with no secrets and no network access, and removed Ghostscript from the main app.
  • Made search over ~6 million profiles self-healing (Elasticsearch/Laravel Scout).
  • Took the book test suite from 3h20 to 12 minutes.
  • Led the admin area migration from Blade/jQuery to Vue 3, Inertia and TypeScript, and the file storage move from Azure Blob to OCI Object Storage.
LaravelVue 3TypeScriptRustElasticsearchRedisPest

The toolbox

  • Backend: PHP · Laravel, Rust, C# · .NET, Python, Java, REST APIs, Microservices
  • Front & mobile: Vue 3, TypeScript, Inertia.js, Pinia, Tailwind, React, Flutter
  • Data & search: MySQL, MariaDB, SQL Server, Redis, Elasticsearch
  • Infra: Docker, AWS, OCI · S3, Horizon, Reverb, Jenkins, GitLab, Grafana
  • Quality: Pest, Vitest, DDD, Hexagonal, Claude Code

Let’stalk

For projects, roles or questions about anything here, just send an email.