VLMA ERP
Case 20

VLMA ERP

A legal ERP where every logged hour rides the pipeline all the way to the invoice — no zeroed bills along the way.

AI Coding · Product Development · Backend

Challenge

A law firm billing by the hour: in July, 6 clients went out with hours billed at R$ 0.00 and nobody noticed. Pricing varied by seniority, review lived in a spreadsheet, and deleting an hour erased review work with it.

Solution

The full pipeline: logged hour → release → review → approval → invoice. The author’s role is frozen at logging time — a future promotion never reprices an old hour. Every step records author, date and values.

Locks where silence used to cost money: a case with no hourly rate refuses to release — it explains instead of billing zero quietly. A reviewed hour can’t be deleted from behind. Resetting the month requires cancelled invoices. And validation shipped as a gamified journey: 5 missions, 2 bosses, 700 XP.

Security and proof before delivery: 12 PRs closed two critical risks — resetting other people’s passwords and exposed payroll — validated in production with real profiles receiving 403. Invoicing gained idempotency (a second click, even simultaneous, is blocked) and one-invoice-per-payer splitting, fixing 228 cases that would have gone out under the wrong name. Destructive tests ran in production itself, inside transactions with ROLLBACK, the database proven identical by MD5 fingerprint.

Stack & Areas

Stack

Timesheet Faturamento NF-e RBAC Next.js Supabase

Areas

AI Coding Product Development Backend
Next case London Park

Next
project.

Tell me what you need. I reply same day.

Chat on WhatsApp
LinkedIn