[{"data":1,"prerenderedAt":2424},["ShallowReactive",2],{"projetos-en":3,"posts-en-todos":1726,"post-en-2026-11-ia-prova-que-terminou":1775},[4,494,635,820,950,1085,1391],{"id":5,"title":6,"body":7,"contexto":454,"cor":455,"description":456,"destaque":457,"extension":458,"link":459,"meta":460,"navigation":206,"numeros":461,"ordem":104,"papel":474,"path":475,"periodo":476,"resumo":477,"seo":478,"stack":479,"stem":489,"__hash__":490,"slug":491,"to":492,"soPt":493},"projetos_en\u002Fprojetos-en\u002Fkravva.md","Kravva",{"type":8,"value":9,"toc":439},"minimark",[10,15,19,27,30,34,39,42,46,49,53,65,68,72,90,310,318,322,325,329,332,336,339,343,354,360,366,372,376,379,382,416,419,423,426,429,432,435],[11,12,14],"h2",{"id":13},"the-problem","The problem",[16,17,18],"p",{},"I wanted a product of my own, with a real back end. Kravva is a football prediction platform: users predict scores, join pools, compete in rankings, follow matches live and buy passes via PIX (Brazil's instant payment system). It has a store, affiliates and a social layer.",[16,20,21,22,26],{},"That sounds simple until the match starts. The score changes and everyone wants to see it right away. Points have to be recalculated at the final whistle. The sports data API has a daily quota. And money comes in through a ",[23,24,25],"termo",{"id":25},"webhook",", which the provider resends whenever it wants.",[16,28,29],{},"I was the only person to handle all of it, from product to deploy.",[11,31,33],{"id":32},"what-i-did","What I did",[35,36,38],"h3",{"id":37},"modular-back-end","Modular back end",[16,40,41],{},"The API is a modular monolith in NestJS 11 with PostgreSQL 16: 31 modules, 82 entities and 96 migrations. The migrations are hand-written SQL, and CI applies all of them to an ephemeral Postgres before any deploy. Auth uses JWT with refresh tokens, Google SSO and RBAC.",[35,43,45],{"id":44},"queues-for-everything-that-doesnt-fit-in-a-request","Queues for everything that doesn't fit in a request",[16,47,48],{},"There are 16 BullMQ queues: live match sync, scoring, notifications, email and data retention for the LGPD (Brazil's data protection law). Jobs use deterministic IDs. That way the same goal or the same final whistle is never processed twice.",[35,50,52],{"id":51},"real-time-across-a-cluster","Real time across a cluster",[16,54,55,56,59,60,64],{},"The API runs as a Node ",[23,57,58],{"id":58},"cluster",", with more than one worker. Socket.io uses the ",[23,61,63],{"id":62},"redis adapter","Redis adapter"," and JWT authentication on the handshake. When a purchase is confirmed or the score changes, the event leaves the worker that processed it and reaches the user's socket, whichever worker it is on.",[66,67],"viz-tempo-real",{},[35,69,71],{"id":70},"pix-with-webhook-and-ledger","PIX with webhook and ledger",[16,73,74,75,79,80,84,85,89],{},"The webhook arrives with an ",[23,76,78],{"id":77},"hmac","HMAC"," signature over the raw body, which I validate with a constant-time comparison. Confirmation runs in a transaction with a ",[23,81,83],{"id":82},"lock pessimista","pessimistic lock"," on the payment row and writes to an ",[23,86,88],{"id":87},"ledger","append-only financial ledger",". A refund is a new entry, never an update.",[91,92,97],"pre",{"className":93,"code":94,"language":95,"meta":96,"style":96},"language-ts shiki shiki-themes github-light github-dark-dimmed","\u002F\u002F Idempotent confirmation (pseudocode)\nawait db.transaction(async (tx) => {\n  const pagamento = await tx.selectForUpdate(pagamentos, { id }); \u002F\u002F lock the row\n  if (pagamento.status === 'pago') return; \u002F\u002F webhook redelivery: nothing to do\n\n  pagamento.status = 'pago';\n  await tx.save(pagamento);\n  await ledger.registrarSeAusente(tx, pagamento); \u002F\u002F append-only entry\n  await acessos.concederSeAusente(tx, pagamento);\n  await comissao.creditar(tx, pagamento); \u002F\u002F only on the first confirmation\n});\n\u002F\u002F The real-time event only goes out after the commit\nemitirParaUsuario(pagamento.usuarioId, 'acesso_liberado');\n","ts","",[98,99,100,109,146,174,201,208,222,236,253,267,283,289,295],"code",{"__ignoreMap":96},[101,102,105],"span",{"class":103,"line":104},"line",1,[101,106,108],{"class":107},"sDN9O","\u002F\u002F Idempotent confirmation (pseudocode)\n",[101,110,112,116,120,124,127,130,133,137,140,143],{"class":103,"line":111},2,[101,113,115],{"class":114},"s7YZ4","await",[101,117,119],{"class":118},"sYgZi"," db.",[101,121,123],{"class":122},"sPO5f","transaction",[101,125,126],{"class":118},"(",[101,128,129],{"class":114},"async",[101,131,132],{"class":118}," (",[101,134,136],{"class":135},"stnAF","tx",[101,138,139],{"class":118},") ",[101,141,142],{"class":114},"=>",[101,144,145],{"class":118}," {\n",[101,147,149,152,156,159,162,165,168,171],{"class":103,"line":148},3,[101,150,151],{"class":114},"  const",[101,153,155],{"class":154},"sviXB"," pagamento",[101,157,158],{"class":114}," =",[101,160,161],{"class":114}," await",[101,163,164],{"class":118}," tx.",[101,166,167],{"class":122},"selectForUpdate",[101,169,170],{"class":118},"(pagamentos, { id }); ",[101,172,173],{"class":107},"\u002F\u002F lock the row\n",[101,175,177,180,183,186,190,192,195,198],{"class":103,"line":176},4,[101,178,179],{"class":114},"  if",[101,181,182],{"class":118}," (pagamento.status ",[101,184,185],{"class":114},"===",[101,187,189],{"class":188},"s-HuK"," 'pago'",[101,191,139],{"class":118},[101,193,194],{"class":114},"return",[101,196,197],{"class":118},"; ",[101,199,200],{"class":107},"\u002F\u002F webhook redelivery: nothing to do\n",[101,202,204],{"class":103,"line":203},5,[101,205,207],{"emptyLinePlaceholder":206},true,"\n",[101,209,211,214,217,219],{"class":103,"line":210},6,[101,212,213],{"class":118},"  pagamento.status ",[101,215,216],{"class":114},"=",[101,218,189],{"class":188},[101,220,221],{"class":118},";\n",[101,223,225,228,230,233],{"class":103,"line":224},7,[101,226,227],{"class":114},"  await",[101,229,164],{"class":118},[101,231,232],{"class":122},"save",[101,234,235],{"class":118},"(pagamento);\n",[101,237,239,241,244,247,250],{"class":103,"line":238},8,[101,240,227],{"class":114},[101,242,243],{"class":118}," ledger.",[101,245,246],{"class":122},"registrarSeAusente",[101,248,249],{"class":118},"(tx, pagamento); ",[101,251,252],{"class":107},"\u002F\u002F append-only entry\n",[101,254,256,258,261,264],{"class":103,"line":255},9,[101,257,227],{"class":114},[101,259,260],{"class":118}," acessos.",[101,262,263],{"class":122},"concederSeAusente",[101,265,266],{"class":118},"(tx, pagamento);\n",[101,268,270,272,275,278,280],{"class":103,"line":269},10,[101,271,227],{"class":114},[101,273,274],{"class":118}," comissao.",[101,276,277],{"class":122},"creditar",[101,279,249],{"class":118},[101,281,282],{"class":107},"\u002F\u002F only on the first confirmation\n",[101,284,286],{"class":103,"line":285},11,[101,287,288],{"class":118},"});\n",[101,290,292],{"class":103,"line":291},12,[101,293,294],{"class":107},"\u002F\u002F The real-time event only goes out after the commit\n",[101,296,298,301,304,307],{"class":103,"line":297},13,[101,299,300],{"class":122},"emitirParaUsuario",[101,302,303],{"class":118},"(pagamento.usuarioId, ",[101,305,306],{"class":188},"'acesso_liberado'",[101,308,309],{"class":118},");\n",[16,311,312,313,317],{},"If the webhook is late, the front end checks the transaction. After some time pending, the API asks the provider and calls the same ",[23,314,316],{"id":315},"idempotencia","idempotent"," path.",[35,319,321],{"id":320},"operations","Operations",[16,323,324],{},"Background routines need to run in a single process, so I elect a leader through a lease in PostgreSQL. Deploys are automated with GitHub Actions and SSH to a VPS running Docker and Nginx. The front end is on Cloudflare Pages and files are on R2. There is a production environment and a staging environment, and large releases are rehearsed in staging against an anonymized copy of production, with guards that refuse to run against the real database.",[35,326,328],{"id":327},"ai-assisted-newsroom","AI-assisted newsroom",[16,330,331],{},"The newsroom suggests story ideas on its own from Kravva's data (today's match, post-match, a finished round, a computed fact), without spending any AI. To write, the editor starts from a research dossier with data and sources, and the LLM returns the draft as strict structured output, with adapters for Anthropic and OpenAI. A checker verifies the numbers, style rules block facts without a source, and the editor picks one of three headlines. Media comes from Wikimedia Commons, filtered by license and credited. A person always publishes: the AI helps assemble, the editor decides.",[35,333,335],{"id":334},"portal-communities-and-lgpd","Portal, communities and LGPD",[16,337,338],{},"Articles go out on Kravva's own portal, with a share image generated on first read for WhatsApp and social previews. Communities bring a monthly league, prediction pools, a schedule and supporter passes, with rules tied to the Terms of Use and moderation with reports, removal and appeals. LGPD compliance runs end to end: cookie consent, marketing emails only with adult opt-in, and account deletion with a final payout of the balance.",[11,340,342],{"id":341},"decisions-and-trade-offs","Decisions and trade-offs",[16,344,345,349,350,353],{},[346,347,348],"strong",{},"Layered idempotency for payments."," Event history, ",[98,351,352],{},"SELECT ... FOR UPDATE",", state checks and unique indexes as the last barrier. I chose a pessimistic lock because payment providers resend in bursts and the critical section is short. The cost: concurrent deliveries of the same payment wait for each other.",[16,355,356,359],{},[346,357,358],{},"BullMQ with deterministic jobId."," The queue guarantees at-least-once delivery, so processing has to tolerate repeats. The job ID prevents duplicates. The cost: deduplication only holds while the job is retained. I've already had to consider including the score in the ID so that a VAR correction would create a new job.",[16,361,362,365],{},[346,363,364],{},"Hand-written SQL migrations."," They give control over partial indexes and backfills, which the TypeORM generator handles poorly. The cost: nothing guarantees the entity still matches the real column. That depends on discipline and tests.",[16,367,368,371],{},[346,369,370],{},"Cluster instead of an orchestrator."," Two workers make use of the machine without the complexity of Kubernetes. The cost shows up in the next point: in-memory state per process.",[11,373,375],{"id":374},"result","Result",[16,377,378],{},"Kravva is in production, with automated deploys, unit tests with Jest, integration tests against a real Postgres and CI that dry-runs the migrations. I don't disclose the number of users.",[16,380,381],{},"Three real incidents turned into fixes:",[383,384,385,400,406],"ul",{},[386,387,388,391,392,395,396,399],"li",{},[346,389,390],{},"WebSocket dropping in the cluster."," The front end got \"Session ID unknown\" (HTTP 400). The cause: Nginx wasn't passing the WebSocket upgrade through, the client fell back to ",[23,393,394],{"id":394},"long polling",", and requests from the same client landed on different workers. I added the Socket.io block to Nginx with ",[98,397,398],{},"Upgrade",", and the error went away. That was a separate problem from the Redis adapter, which I added in the same change to fix a silent failure: an event emitted on one worker didn't reach sockets connected to another.",[386,401,402,405],{},[346,403,404],{},"Football API quota blown during the World Cup."," I switched to a live snapshot shared between workers and a global rate limiter in Redis.",[386,407,408,411,412,415],{},[346,409,410],{},"PWA serving stale files after deploy."," I handled chunk recovery and ",[98,413,414],{},"skipWaiting",".",[16,417,418],{},"On AI: a good part of the code was written with help from Cursor and Claude. The decisions, the review and the operations are mine, and I can explain each of them.",[11,420,422],{"id":421},"what-id-do-differently","What I'd do differently",[16,424,425],{},"I'd start with observability: structured logs, queue metrics and alerts. That's a gap I'm aware of.",[16,427,428],{},"I'd break up the match sync service, which has grown too large.",[16,430,431],{},"I'd close the long polling fallback with pure WebSocket or sticky sessions. Without that, polling stays fragile with more than one worker.",[16,433,434],{},"I'd standardize data access, which today mixes custom repositories with TypeORM's default repository.",[436,437,438],"style",{},"html pre.shiki code .sDN9O, html code.shiki .sDN9O{--shiki-default:#6A737D;--shiki-dark:#768390}html pre.shiki code .s7YZ4, html code.shiki .s7YZ4{--shiki-default:#D73A49;--shiki-dark:#F47067}html pre.shiki code .sYgZi, html code.shiki .sYgZi{--shiki-default:#24292E;--shiki-dark:#ADBAC7}html pre.shiki code .sPO5f, html code.shiki .sPO5f{--shiki-default:#6F42C1;--shiki-dark:#DCBDFB}html pre.shiki code .stnAF, html code.shiki .stnAF{--shiki-default:#E36209;--shiki-dark:#F69D50}html pre.shiki code .sviXB, html code.shiki .sviXB{--shiki-default:#005CC5;--shiki-dark:#6CB6FF}html pre.shiki code .s-HuK, html code.shiki .s-HuK{--shiki-default:#032F62;--shiki-dark:#96D0FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":96,"searchDepth":111,"depth":148,"links":440},[441,442,451,452,453],{"id":13,"depth":111,"text":14},{"id":32,"depth":111,"text":33,"children":443},[444,445,446,447,448,449,450],{"id":37,"depth":148,"text":38},{"id":44,"depth":148,"text":45},{"id":51,"depth":148,"text":52},{"id":70,"depth":148,"text":71},{"id":320,"depth":148,"text":321},{"id":327,"depth":148,"text":328},{"id":334,"depth":148,"text":335},{"id":341,"depth":111,"text":342},{"id":374,"depth":111,"text":375},{"id":421,"depth":111,"text":422},"My own product","oklch(0.7 0.17 150)","A football prediction platform I built and run on my own: NestJS, queues, real time across a cluster, idempotent PIX payments, an AI-assisted newsroom and communities.","A complete back end in production, run by one person","md","https:\u002F\u002Fkravva.com.br",{},[462,465,468,471],{"valor":463,"rotulo":464},"16","BullMQ queues",{"valor":466,"rotulo":467},"31","back-end modules",{"valor":469,"rotulo":470},"96","migrations",{"valor":472,"rotulo":473},"2","environments: production and staging","Founder, product and engineering","\u002Fprojetos-en\u002Fkravva","2026 · in production","A football prediction platform with rankings, pools, a store with PIX payments, live scores, a news portal with an AI-assisted newsroom, and communities. I build and run it on my own, from product to infrastructure.",{"title":6,"description":456},[480,481,482,483,484,485,486,487,488],"Vue 3","Quasar","NestJS","PostgreSQL","Redis","BullMQ","Socket.io","Docker","GitHub Actions","projetos-en\u002Fkravva","-FFofLL07YYb99PV6hd5Jd7zAJEQfFZUOxX7A3jSAr8","kravva","\u002Fen\u002Fprojetos\u002Fkravva",false,{"id":495,"title":496,"body":497,"contexto":601,"cor":602,"description":603,"destaque":604,"extension":458,"link":605,"meta":606,"navigation":206,"numeros":607,"ordem":111,"papel":619,"path":620,"periodo":621,"resumo":622,"seo":623,"stack":624,"stem":631,"__hash__":632,"slug":633,"to":634,"soPt":493},"projetos_en\u002Fprojetos-en\u002Fonboarding-erp.md","Digital onboarding for Finanças (F360)",{"type":8,"value":498,"toc":589},[499,501,504,507,509,513,516,523,526,530,533,537,540,544,550,552,558,564,573,575,578,581,583,586],[11,500,14],{"id":13},[16,502,503],{},"In Finanças, F360's B2B financial ERP, onboarding is the customer's first contact with the product. If it's long or confusing, the customer gives up before using the system.",[16,505,506],{},"The old onboarding was a Vue 3 SPA that had grown by accretion. The journey was organized into macro-states with sub-steps: contracts, stores, pricing, signature and configuration. What showed up changed depending on the contract and the lead's status. Some entry points still went through the ERP's MVC screens. It was hard to know where the customer was in the flow, and even harder to change the flow without breaking another path.",[11,508,33],{"id":32},[35,510,512],{"id":511},"a-new-front-end-from-scratch","A new front end, from scratch",[16,514,515],{},"I started the repository and built the new SPA with Vue 3.5, TypeScript, Vite and Pinia, organized by feature. Each step has its own page, its own state and its own service. Components, validation and the HTTP client live in a shared layer.",[16,517,518,519,522],{},"Onboarding became a linear journey of ",[346,520,521],{},"eight steps",": contact, confirmation code, users, companies, registration review, proposal, terms and completion.",[524,525],"viz-onboarding",{},[35,527,529],{"id":528},"the-back-end-as-the-source-of-truth","The back end as the source of truth",[16,531,532],{},"The front end validates to guide the person, but the server decides. Session, eligibility and progress live in the back end, and the interface only moves forward when it confirms. This avoids a classic wizard problem: the browser thinking a step is done while the server disagrees.",[35,534,536],{"id":535},"a-second-journey-without-duplicating-the-front-end","A second journey without duplicating the front end",[16,538,539],{},"Next came self-service signup: contact, products, summary, sales and success. It has different navigation rules and data from onboarding. I put both in the same repository with separate routers, stores and builds per journey, and extracted the common visual components into a shared layer. A local checkpoint lets the user resume a draft, but catalog, price and completion are still confirmed by the server.",[35,541,543],{"id":542},"net-back-end",".NET back end",[16,545,546,547,549],{},"I also work on the back end in C# and .NET with MongoDB. I adjusted the use cases for terms acceptance and company sync, with tests. I made onboarding link generation atomic and ",[23,548,316],{"id":315},", retrying only on the expected transaction conflict.",[11,551,342],{"id":341},[16,553,554,557],{},[346,555,556],{},"Eight explicit steps instead of implicit states."," Each step has a clear entry and exit, which makes it easier to measure the funnel and change one part without touching the rest. The cost: a linear journey is more rigid, and every business exception has to become an explicit navigation rule.",[16,559,560,563],{},[346,561,562],{},"Isolate the journeys and share only the presentation."," Duplicating the whole front end would be faster on day one and expensive every day after. Putting everything in one router would couple rules that change for different reasons. Separating state and navigation while sharing components is the middle ground. The cost is discipline: deciding case by case what is truly common.",[16,565,566,572],{},[346,567,568,569,415],{},"Migrate entry point by entry point, not as a ",[23,570,571],{"id":571},"big bang"," The old entry points were redirected to the new experience gradually. The legacy stays up as long as something still uses it.",[11,574,375],{"id":374},[16,576,577],{},"The new onboarding replaces the old one on the migrated entry points. Average onboarding time went from 12 to 3–4 minutes, and conversion to paying customer rose 20%.",[16,579,580],{},"Self-service signup got its own journey without duplicating the codebase.",[11,582,422],{"id":421},[16,584,585],{},"I'd instrument the funnel per step from the first commit, with standardized events, so I could say which change weighed most in the time savings.",[16,587,588],{},"I'd also write contract tests between front end and back end for step transitions. The unit tests cover components, stores and guards, but the most fragile point of a wizard is the front end and back end disagreeing about which step the person is on.",{"title":96,"searchDepth":111,"depth":148,"links":590},[591,592,598,599,600],{"id":13,"depth":111,"text":14},{"id":32,"depth":111,"text":33,"children":593},[594,595,596,597],{"id":511,"depth":148,"text":512},{"id":528,"depth":148,"text":529},{"id":535,"depth":148,"text":536},{"id":542,"depth":148,"text":543},{"id":341,"depth":111,"text":342},{"id":374,"depth":111,"text":375},{"id":421,"depth":111,"text":422},"F360","oklch(0.68 0.15 250)","I built the new onboarding front end of Finanças, F360's financial ERP, from scratch in Vue 3 and TypeScript: eight clear steps, self-service signup in the same repository and a .NET back end.","12 → 3–4 min onboarding",null,{},[608,611,613,616],{"valor":609,"rotulo":610},"8","steps in the new onboarding",{"valor":472,"rotulo":612},"isolated journeys in the same front end",{"valor":614,"rotulo":615},"12 → 3–4 min","onboarding time",{"valor":617,"rotulo":618},"+20%","conversion to paying customer","Full stack developer, author of over 90% of the commits in the new front end","\u002Fprojetos-en\u002Fonboarding-erp","2026","I built the ERP's new onboarding front end from scratch, in Vue 3 and TypeScript, and later self-service signup in the same repository. Onboarding went from 12 to 3–4 minutes.",{"title":496,"description":603},[480,625,626,627,628,629,630,488],"TypeScript","Vite","Pinia","C#",".NET","MongoDB","projetos-en\u002Fonboarding-erp","qibetX1JAjVfAtQlKUvDX8cpR6rPNYq0MTMRxrLxNyc","onboarding-erp","\u002Fen\u002Fprojetos\u002Fonboarding-erp",{"id":636,"title":637,"body":638,"contexto":601,"cor":793,"description":794,"destaque":795,"extension":458,"link":605,"meta":796,"navigation":206,"numeros":797,"ordem":148,"papel":810,"path":811,"periodo":621,"resumo":812,"seo":813,"stack":814,"stem":816,"__hash__":817,"slug":818,"to":819,"soPt":493},"projetos_en\u002Fprojetos-en\u002Fpainel-erp.md","Finanças admin panel (F360)",{"type":8,"value":639,"toc":781},[640,642,645,648,659,661,665,668,682,685,689,696,700,703,707,715,733,736,738,744,750,756,762,764,767,770,772,775,778],[11,641,14],{"id":13},[16,643,644],{},"Finanças, F360's financial ERP, is a large monorepo with several generations living side by side. It has a historical MVC in .NET Framework, APIs and hosts in modern .NET, a processing console, shared libraries and, inside all of that, an admin SPA in Vue 3. Many people commit there at the same time: there were more than 3,000 commits during the period I worked on it.",[16,646,647],{},"Three problems showed up together:",[383,649,650,653,656],{},[386,651,652],{},"Important screens still lived in the MVC, but the legacy couldn't be switched off at once: customers, routines and rules depended on it.",[386,654,655],{},"New admin areas needed to be born in the SPA, talking to services that other front ends also consume.",[386,657,658],{},"The development cycle was slow, and nobody could say which step the time was going to.",[11,660,33],{"id":32},[35,662,664],{"id":663},"piece-by-piece-migration-not-a-big-bang","Piece-by-piece migration, not a big bang",[16,666,667],{},"I moved an area from the MVC to the SPA without breaking whoever still used the old path. The change cut across the layers:",[383,669,670,673,676,679],{},[386,671,672],{},"a redirect in the MVC;",[386,674,675],{},"routes, menu and types in the SPA;",[386,677,678],{},"migration gates in the shared business layer;",[386,680,681],{},"compatible routines in the .NET back end, with tests.",[16,683,684],{},"The legacy stays up as long as something still uses it. Each surface migrates when it's ready.",[35,686,688],{"id":687},"contract-and-terms-management","Contract and terms management",[16,690,691,692,695],{},"I built the admin area for viewing and managing contracts and the acceptance state of the terms: screens, menu entry, API integration and mocks for testing. The capability was released behind a ",[23,693,694],{"id":694},"feature flag",". The SPA composes the experience; the back end, the same one that serves onboarding, decides and persists.",[35,697,699],{"id":698},"a-shell-with-navigation-variants","A shell with navigation variants",[16,701,702],{},"To avoid duplicating menus and layout for each SPA variant, I separated three things: choosing the variant, the navigation contract (what each variant offers) and a common visual shell. That way, a new SPA variant becomes configuration, without copying the whole layout.",[35,704,706],{"id":705},"measure-before-optimizing","Measure before optimizing",[16,708,709,710,714],{},"Before touching any configuration, I created reproducible ",[23,711,713],{"id":712},"benchmark","benchmarks"," for three journeys: bringing up the environment and opening the app in the browser, running the build, and running the tests. With the numbers in hand:",[383,716,717,720,723,726],{},[386,718,719],{},"I separated validation from bundling;",[386,721,722],{},"I kept the sequential build as an option;",[386,724,725],{},"I optimized the Vite configuration and started loading some resources only when they are used;",[386,727,728,729,415],{},"I set up an experimental CI with parallel jobs and tests split into ",[23,730,732],{"id":731},"shard","shards",[734,735],"viz-build",{},[11,737,342],{"id":341},[16,739,740,743],{},[346,741,742],{},"Measure real journeys, not perceived time."," \"The build is slow\" doesn't tell you what to do. A benchmark with the same machine, the same commands and the median of several runs does. The cost is time spent building the harness before the first optimization.",[16,745,746,749],{},[346,747,748],{},"Parallel CI shortens the wait, but it isn't free."," Independent jobs finish sooner, but each one pays for its own setup. The wait for whoever opened the PR goes down, and total runner minutes can go up. That's why the CI stayed an experiment, documented with that cost, and didn't replace the official pipeline.",[16,751,752,755],{},[346,753,754],{},"Feature flag and migration by surface."," Releasing in stages reduces risk, but leaves two paths alive for a while. That cost needs an owner and an end date.",[16,757,758,761],{},[346,759,760],{},"Shared shell with a navigation contract."," Centralizing avoids duplicated menus. The cost is that changing the contract means reviewing every variant.",[11,763,375],{"id":374},[16,765,766],{},"In a local benchmark, the SPA build went from 223 s to 130 s, and the SPA build with the component library went from 246 s to 175 s. The development journey in the browser went from about 70 s to about 38 s, at the median. These are local measurements with a small sample, and the proposal is still being validated with the team. It is not a production gain.",[16,768,769],{},"The migrated area and the contract and terms management are in the SPA, with tests, living alongside the MVC for as long as it's needed.",[11,771,422],{"id":421},[16,773,774],{},"I'd make each optional benchmark metric count explicitly toward the success criteria. Today, an enabled metric can get worse without failing the run.",[16,776,777],{},"I'd make the workflow's path filter also cover changes in the MVC host, which can affect the SPA.",[16,779,780],{},"Before proposing parallel CI as the default, I'd collect a larger, paired sample, comparing wait time and runner minutes over the same period.",{"title":96,"searchDepth":111,"depth":148,"links":782},[783,784,790,791,792],{"id":13,"depth":111,"text":14},{"id":32,"depth":111,"text":33,"children":785},[786,787,788,789],{"id":663,"depth":148,"text":664},{"id":687,"depth":148,"text":688},{"id":698,"depth":148,"text":699},{"id":705,"depth":148,"text":706},{"id":341,"depth":111,"text":342},{"id":374,"depth":111,"text":375},{"id":421,"depth":111,"text":422},"oklch(0.72 0.14 185)","A Vue 3 SPA inside a .NET monorepo with a legacy MVC: screen migration without a big bang, contract and terms management, and a build measured before being optimized.","Build from 223 s to 130 s, measured before optimizing",{},[798,801,804,807],{"valor":799,"rotulo":800},"218","my commits to the SPA (~23% of the period)",{"valor":802,"rotulo":803},"223 → 130 s","SPA build, local benchmark",{"valor":805,"rotulo":806},"~70 → ~38 s","dev journey in the browser (median)",{"valor":808,"rotulo":809},"68","test files touched","Full stack developer, one of the main contributors to the SPA","\u002Fprojetos-en\u002Fpainel-erp","A Vue 3 SPA that lives alongside a legacy MVC inside a .NET monorepo. I migrated screens piece by piece, shipped contract and terms management, and measured the build before optimizing it.",{"title":637,"description":794},[480,625,626,627,815,628,629,488],"Element Plus","projetos-en\u002Fpainel-erp","FGEj--2DaawhV46cXT6WMXT1roTrK5MpV4ARAijuKc0","painel-erp","\u002Fen\u002Fprojetos\u002Fpainel-erp",{"id":821,"title":822,"body":823,"contexto":923,"cor":924,"description":925,"destaque":926,"extension":458,"link":605,"meta":927,"navigation":206,"numeros":928,"ordem":176,"papel":938,"path":939,"periodo":940,"resumo":941,"seo":942,"stack":943,"stem":946,"__hash__":947,"slug":948,"to":949,"soPt":493},"projetos_en\u002Fprojetos-en\u002Fligafest.md","LigaFest group ticket",{"type":8,"value":824,"toc":912},[825,827,830,833,836,838,842,845,849,852,863,866,869,873,876,878,884,890,892,895,898,900,903,906,909],[11,826,14],{"id":13},[16,828,829],{},"LigaFest is a free card game event, held in a shopping mall, with more than 8,000 registered participants. At the first edition, the entrance got jammed.",[16,831,832],{},"The reason was simple. Each person needed their own QR code. A group of five brought five QR codes to the line. Many mall visitors showed up curious, with no registration at all. The business wanted zero red tape, but someone had to control access and hand out wristbands.",[16,834,835],{},"The solution was my initiative. I built LigaFest's entire front end and saw the problem at the first edition. For the next edition, I proposed the group ticket.",[11,837,33],{"id":32},[35,839,841],{"id":840},"group-ticket","Group ticket",[16,843,844],{},"One responsible person, the ticket holder, registers their family or friends. A single QR code admits everyone. Each ticket holder can invite up to 5 dependents.",[35,846,848],{"id":847},"minimal-data-by-design","Minimal data, by design",[16,850,851],{},"I studied the LGPD (Brazil's data protection law) and proposed a flow based on data minimization:",[383,853,854,857,860],{},[386,855,856],{},"The ticket is recovered with just the email. No password, no full profile.",[386,858,859],{},"The ticket screen shows the QR code and the email, without the person's name.",[386,861,862],{},"Dependents stay anonymized. We store only age and relationship.",[16,864,865],{},"With that, wristbands go out at the entrance without everyone having to register.",[867,868],"viz-ingresso-grupo",{},[35,870,872],{"id":871},"a-qr-code-on-site","A QR code on site",[16,874,875],{},"For people who arrived without registering, I put a printed QR code at the entrance. It went straight to the email field. The person could do the quick registration or recover their tickets right there, without digging through their inbox.",[11,877,342],{"id":341},[16,879,880,883],{},[346,881,882],{},"Recover the ticket with email only."," It reduces friction: no password to forget, no account to create. It also reduces what gets stored. The cost is security. Anyone who knows someone's email can try to recover the ticket, and the QR code can be shared. At a free event the risk per ticket is lower, but the cost exists and I knew about it. In a product with more at stake, I'd harden this.",[16,885,886,889],{},[346,887,888],{},"Anonymized dependents."," I didn't need a child's name to hand out a wristband. I needed to know there was a dependent, plus their age range and relationship. The cost is operational: without a name, you can't identify a specific dependent. For the event, that was enough.",[11,891,375],{"id":374},[16,893,894],{},"Crowding at the entrance dropped a lot. One QR code now admitted the whole group, and LigaFest reached more than 8,000 registered participants with the minimum of personal data stored. That also reduces the impact of an incident: what isn't stored can't leak.",[16,896,897],{},"I need to be precise here. The ticket holder's registration still collected full data: name, CPF (Brazil's individual taxpayer ID), date of birth, phone, CEP (postal code) and gender. That was an event requirement. Minimization applies to three points: ticket recovery (email only), display (no name) and dependents (age and relationship only). The system didn't collect the absolute minimum, and I won't describe it as if it did.",[11,899,422],{"id":421},[16,901,902],{},"I'd apply the same logic to the ticket holder. If the event only needs to admit people, the honest question is: do we really need CPF and CEP? The natural next step is to collect only what's needed from them too.",[16,904,905],{},"I'd harden email recovery. An expiring link, attempt limits per email and IP, a signed single-use QR code and invalidation at check-in would reduce the risk of enumeration and sharing. These are the improvements I would propose, and I don't describe them as already done.",[16,907,908],{},"I'd define in writing the legal basis for processing, consent or legitimate interest, and the difference between anonymization and pseudonymization for each piece of dependent data. I studied the LGPD to design the flow, but this is a point where the ideal is to work with legal, not decide alone in code.",[16,910,911],{},"Finally, I'd measure the effect. I saw the line get shorter, but I don't have entry-time numbers from before and after, so I don't publish any.",{"title":96,"searchDepth":111,"depth":148,"links":913},[914,915,920,921,922],{"id":13,"depth":111,"text":14},{"id":32,"depth":111,"text":33,"children":916},[917,918,919],{"id":840,"depth":148,"text":841},{"id":847,"depth":148,"text":848},{"id":871,"depth":148,"text":872},{"id":341,"depth":111,"text":342},{"id":374,"depth":111,"text":375},{"id":421,"depth":111,"text":422},"LigaMagic · Full-time employee","oklch(0.8 0.15 80)","A group ticket with a single QR code and minimal data (LGPD) for LigaFest, a free event with 8,000+ registrants.","1 QR code admits the whole group",{},[929,932,935],{"valor":930,"rotulo":931},"8,000+","registered participants",{"valor":933,"rotulo":934},"1","QR code per group",{"valor":936,"rotulo":937},"up to 5","dependents per ticket","Front-end developer (full front end and product initiative)","\u002Fprojetos-en\u002Fligafest","2023–2025","On my own initiative, I created LigaFest's group ticket: one QR code admits the ticket holder and up to 5 anonymized dependents, with a focus on LGPD.",{"title":822,"description":925},[944,480,625,627,945],"Nuxt 3","Tailwind CSS","projetos-en\u002Fligafest","oVed6ZbX7iGC0sc_awWZzfuVoUxRp1acsAAjVV_a1zA","ligafest","\u002Fen\u002Fprojetos\u002Fligafest",{"id":951,"title":952,"body":953,"contexto":923,"cor":1057,"description":1058,"destaque":1059,"extension":458,"link":605,"meta":1060,"navigation":206,"numeros":1061,"ordem":203,"papel":1074,"path":1075,"periodo":940,"resumo":1076,"seo":1077,"stack":1078,"stem":1081,"__hash__":1082,"slug":1083,"to":1084,"soPt":493},"projetos_en\u002Fprojetos-en\u002Fcircuitos-ligamagic.md","LigaMagic and LigaPokémon Circuits",{"type":8,"value":954,"toc":1046},[955,957,960,963,966,969,971,975,978,982,990,993,997,1000,1002,1008,1014,1020,1024,1027,1030,1033,1037,1040,1043],[11,956,14],{"id":13},[16,958,959],{},"LigaMagic is the largest Brazilian marketplace for card games: Magic, Pokémon, Yu-Gi-Oh!, One Piece and others. The Circuits are the tournament leagues run in stores across the country, with registration, rounds and rankings.",[16,961,962],{},"When I took over the front end, it was at an early stage and poorly structured. It already had real users: in the 2024 season, the LigaMagic and LigaPokémon circuits added up to more than 2,400 tournaments, in more than 150 stores, with more than 6,000 players. And on event days, the apps serve more than 2,000 players during the tournaments, at events with more than 12,000 people.",[16,964,965],{},"A fragile front end under these conditions is more than technical debt. When something breaks on an event day, there are people waiting in the store.",[16,967,968],{},"There was also a second challenge: the circuits for each card game had different brands. The product had to look like a Magic circuit in one place and a Pokémon circuit in another, without two codebases.",[11,970,33],{"id":32},[35,972,974],{"id":973},"refactoring-the-inherited-codebase","Refactoring the inherited codebase",[16,976,977],{},"I refactored almost the entire front-end codebase I received, in Nuxt 3 and Vue 3 with TypeScript. The exception was the store registration module, which I only worked on in parts: I refactored pieces of the stores' sign-up and payment flow, without taking over the whole module.",[35,979,981],{"id":980},"multi-brand-theming","Multi-brand theming",[16,983,984,985,989],{},"For the circuit brands, I used Tailwind with CSS variables. Each brand's colors and other ",[23,986,988],{"id":987},"design tokens","tokens"," live in variables. Components don't know about the brand, only about the tokens. Switching circuits means switching values, not code.",[991,992],"viz-theming",{},[35,994,996],{"id":995},"front-end-technical-reference","Front-end technical reference",[16,998,999],{},"I set front-end standards and decisions and took part in UI\u002FUX, brainstorming and refinement with the product team. I was a technical reference for the front end, without a formal leadership title.",[11,1001,342],{"id":341},[16,1003,1004,1007],{},[346,1005,1006],{},"Refactoring almost everything instead of patching."," A poorly structured codebase, used by thousands of players, called for a structure I could change without fear. The cost is high: refactoring a codebase in use takes time that doesn't turn into new features, and every big change needs care so it doesn't break what already worked. I did it because the alternative was stacking changes on unstable ground.",[16,1009,1010,1013],{},[346,1011,1012],{},"CSS variables instead of one stylesheet per brand."," With one stylesheet per brand, every visual tweak would be made several times and the brands would drift apart over time. With variables, the tweak is made once, and a new brand becomes a set of values. The cost: the token system has to be well thought out from the start. If a component hardcodes a color, it breaks the theme.",[16,1015,1016,1019],{},[346,1017,1018],{},"Not taking over the whole store registration module."," I worked on it in parts, such as the sign-up and payment flow, but I didn't refactor it end to end. The cost is that some parts of the front end kept the previous organization, outside the standard I set for the rest.",[11,1021,1023],{"id":1022},"outcome","Outcome",[16,1025,1026],{},"The front end carried the 2024 season and the event days, with the numbers above. These numbers describe the product's scale, not a gain I attribute to my work alone.",[16,1028,1029],{},"I don't have before-and-after metrics for the refactoring, such as bug counts or delivery time, and I won't make them up. What I can say: the derived brands came to be handled as themes instead of copies, and the team now had defined standards to work with.",[16,1031,1032],{},"The work was done during my time at LigaMagic, as a full-time employee.",[11,1034,1036],{"id":1035},"what-i-would-do-differently","What I would do differently",[16,1038,1039],{},"I would measure from the start. If I had recorded error rates and delivery time before refactoring, I could show the effect in numbers today.",[16,1041,1042],{},"I would pair the refactoring with UI tests on the critical flows, such as sign-up and payment, before touching them. Refactoring without that safety net takes more manual care than it should.",[16,1044,1045],{},"I would document the theming token system right at the beginning. The flexibility of variables only pays off if everyone on the team knows which tokens exist and when to use each one.",{"title":96,"searchDepth":111,"depth":148,"links":1047},[1048,1049,1054,1055,1056],{"id":13,"depth":111,"text":14},{"id":32,"depth":111,"text":33,"children":1050},[1051,1052,1053],{"id":973,"depth":148,"text":974},{"id":980,"depth":148,"text":981},{"id":995,"depth":148,"text":996},{"id":341,"depth":111,"text":342},{"id":1022,"depth":111,"text":1023},{"id":1035,"depth":111,"text":1036},"oklch(0.65 0.18 295)","Front end for LigaMagic's tournament circuits: refactoring an inherited codebase and multi-brand theming with CSS variables.","2,400+ tournaments in 150+ stores, on a front end I inherited",{},[1062,1065,1068,1071],{"valor":1063,"rotulo":1064},"2,400+","tournaments in the 2024 season",{"valor":1066,"rotulo":1067},"150+","stores",{"valor":1069,"rotulo":1070},"6,000+","players in the season",{"valor":1072,"rotulo":1073},"2,000+","players on the apps on event days","Front-end owner and technical reference","\u002Fprojetos-en\u002Fcircuitos-ligamagic","I was responsible for the front end of the LigaMagic and LigaPokémon tournament circuits: 2,400+ tournaments, 150+ stores and 6,000+ players in the 2024 season.",{"title":952,"description":1058},[944,480,625,627,945,1079,1080],"PrimeVue","Shadcn-Vue","projetos-en\u002Fcircuitos-ligamagic","LsS04h3XtE5_C5RR7VzxXEINFYQ68cCeqG1zAQoUWV4","circuitos-ligamagic","\u002Fen\u002Fprojetos\u002Fcircuitos-ligamagic",{"id":1086,"title":1087,"body":1088,"contexto":1364,"cor":1365,"description":1366,"destaque":1367,"extension":458,"link":605,"meta":1368,"navigation":206,"numeros":1369,"ordem":210,"papel":1376,"path":1377,"periodo":1378,"resumo":1379,"seo":1380,"stack":1381,"stem":1387,"__hash__":1388,"slug":1389,"to":1390,"soPt":493},"projetos_en\u002Fprojetos-en\u002Fblippy.md","Blippy",{"type":8,"value":1089,"toc":1351},[1090,1092,1095,1098,1101,1103,1107,1110,1113,1117,1120,1123,1264,1268,1271,1275,1278,1282,1289,1291,1301,1307,1313,1319,1321,1324,1327,1330,1332,1335,1342,1345,1348],[11,1091,14],{"id":13},[16,1093,1094],{},"I wanted to study up close what holds up a real-time chat: delivering the message fast, not losing it when something goes down and not duplicating it when the client retries. Blippy is a Discord-style community platform, with servers, text and voice channels, permissions, attachments and screen sharing.",[16,1096,1097],{},"The hard problems are in the middle of the path. If the API writes the message to the database and dies before telling the broker, nobody gets it. If it publishes before writing, it announces something that doesn't exist. If the client resends a POST that timed out, the message shows up twice.",[16,1099,1100],{},"I designed the contract with large scale in mind, but implemented only what an MVP needs, in verifiable slices.",[11,1102,33],{"id":32},[35,1104,1106],{"id":1105},"two-planes","Two planes",[16,1108,1109],{},"I split the system into a control plane and a data plane. The NestJS (Fastify) API, with PostgreSQL and Redis, decides and persists. A real-time gateway in Go holds the WebSockets and pushes the events. A clustered NATS JetStream connects the two. If the API goes down, the system degrades. If the gateway goes down, real time stops. A CI check fails if the gateway imports a database driver.",[16,1111,1112],{},"The Go gateway was written with heavy AI assistance. The Protobuf contract, the decisions and the review are mine.",[35,1114,1116],{"id":1115},"idempotent-sending-and-outbox","Idempotent sending and outbox",[16,1118,1119],{},"The client generates a nonce and shows the message as pending. The API writes the message, the nonce and the outgoing event (outbox) in the same transaction. Only then does it publish to NATS. If the process dies between the commit and the publish, a reconciler republishes.",[1121,1122],"viz-chat",{},[91,1124,1126],{"className":93,"code":1125,"language":95,"meta":96,"style":96},"\u002F\u002F Inside the send transaction (pseudocode)\ntry {\n  await tx.query(\n    `INSERT INTO message_nonces (channel_id, author_id, nonce, message_id)\n     VALUES ($1, $2, $3, $4)`, [canal, autor, nonce, id]);\n} catch (err) {\n  \u002F\u002F Retry of the same send: return the id that already exists\n  if (isUniqueViolation(err)) return { duplicate: true, id: await buscarPorNonce(...) };\n  throw err;\n}\nawait tx.query('INSERT INTO messages ...');\nawait tx.query('INSERT INTO outbox ...'); \u002F\u002F event in the same transaction\n",[98,1127,1128,1133,1140,1152,1157,1165,1176,1181,1217,1225,1230,1245],{"__ignoreMap":96},[101,1129,1130],{"class":103,"line":104},[101,1131,1132],{"class":107},"\u002F\u002F Inside the send transaction (pseudocode)\n",[101,1134,1135,1138],{"class":103,"line":111},[101,1136,1137],{"class":114},"try",[101,1139,145],{"class":118},[101,1141,1142,1144,1146,1149],{"class":103,"line":148},[101,1143,227],{"class":114},[101,1145,164],{"class":118},[101,1147,1148],{"class":122},"query",[101,1150,1151],{"class":118},"(\n",[101,1153,1154],{"class":103,"line":176},[101,1155,1156],{"class":188},"    `INSERT INTO message_nonces (channel_id, author_id, nonce, message_id)\n",[101,1158,1159,1162],{"class":103,"line":203},[101,1160,1161],{"class":188},"     VALUES ($1, $2, $3, $4)`",[101,1163,1164],{"class":118},", [canal, autor, nonce, id]);\n",[101,1166,1167,1170,1173],{"class":103,"line":210},[101,1168,1169],{"class":118},"} ",[101,1171,1172],{"class":114},"catch",[101,1174,1175],{"class":118}," (err) {\n",[101,1177,1178],{"class":103,"line":224},[101,1179,1180],{"class":107},"  \u002F\u002F Retry of the same send: return the id that already exists\n",[101,1182,1183,1185,1187,1190,1193,1195,1198,1201,1204,1206,1209,1211,1214],{"class":103,"line":238},[101,1184,179],{"class":114},[101,1186,132],{"class":118},[101,1188,1189],{"class":122},"isUniqueViolation",[101,1191,1192],{"class":118},"(err)) ",[101,1194,194],{"class":114},[101,1196,1197],{"class":118}," { duplicate: ",[101,1199,1200],{"class":154},"true",[101,1202,1203],{"class":118},", id: ",[101,1205,115],{"class":114},[101,1207,1208],{"class":122}," buscarPorNonce",[101,1210,126],{"class":118},[101,1212,1213],{"class":114},"...",[101,1215,1216],{"class":118},") };\n",[101,1218,1219,1222],{"class":103,"line":255},[101,1220,1221],{"class":114},"  throw",[101,1223,1224],{"class":118}," err;\n",[101,1226,1227],{"class":103,"line":269},[101,1228,1229],{"class":118},"}\n",[101,1231,1232,1234,1236,1238,1240,1243],{"class":103,"line":285},[101,1233,115],{"class":114},[101,1235,164],{"class":118},[101,1237,1148],{"class":122},[101,1239,126],{"class":118},[101,1241,1242],{"class":188},"'INSERT INTO messages ...'",[101,1244,309],{"class":118},[101,1246,1247,1249,1251,1253,1255,1258,1261],{"class":103,"line":291},[101,1248,115],{"class":114},[101,1250,164],{"class":118},[101,1252,1148],{"class":122},[101,1254,126],{"class":118},[101,1256,1257],{"class":188},"'INSERT INTO outbox ...'",[101,1259,1260],{"class":118},"); ",[101,1262,1263],{"class":107},"\u002F\u002F event in the same transaction\n",[35,1265,1267],{"id":1266},"single-contract-and-ids","Single contract and IDs",[16,1269,1270],{},"The contract between TypeScript and Go is generated Protobuf, checked in CI. IDs are Snowflake, with the node-id leased in Redis. The message tables are partitioned in Postgres.",[35,1272,1274],{"id":1273},"voice-screen-and-desktop","Voice, screen and desktop",[16,1276,1277],{},"Voice and screen sharing use LiveKit, a self-hosted SFU. The desktop app is Electron, with a cross-platform release pipeline. The advanced media features, such as noise suppression and multiple live streams, come from a project contributor.",[35,1279,1281],{"id":1280},"quality","Quality",[16,1283,1284,1285,1288],{},"Gates with semgrep, gitleaks, actions pinned by SHA and ",[23,1286,1287],{"id":1287},"mutation testing",". The outbox has a fault-injection test: the API \"dies\" after the commit and the test checks that the reconciler delivers the event.",[11,1290,342],{"id":341},[16,1292,1293,1296,1297,1300],{},[346,1294,1295],{},"NATS with JetStream instead of Kafka, RabbitMQ or Redis Pub\u002FSub."," Hierarchical subjects with wildcards, such as ",[98,1298,1299],{},"guild.*.channel.*.msg",", match routing by server and channel. Kafka is heavy for topics this granular. Redis Pub\u002FSub persists nothing. The cost: today the gateway subscribes in plain NATS mode and nobody consumes the persisted stream, which just accumulates messages. It's groundwork for future consumers, and it needs a retention limit.",[16,1302,1303,1306],{},[346,1304,1305],{},"Transactional outbox instead of publish-and-hope."," It guarantees no event is lost. The cost is accepting at-least-once delivery, with possible duplicates. The consumer has to tolerate that.",[16,1308,1309,1312],{},[346,1310,1311],{},"Partitioned Postgres instead of Scylla."," The data model follows Scylla's shape, keyed by channel and time window, but runs on Postgres. It avoids premature operational cost and keeps the migration path open. The cost: the schema is created in code, at boot, without versioned migrations.",[16,1314,1315,1318],{},[346,1316,1317],{},"Opaque payload in the gateway."," The gateway numbers the events without decoding their content. It's cheaper per message, and new events don't require changing the gateway. The cost is losing visibility into the content at that layer.",[11,1320,1023],{"id":1022},[16,1322,1323],{},"Blippy runs end to end: servers, text and voice channels, attachments, screen sharing and a desktop app. I'm the main author, with about 94% of the commits. Most of the rest comes from one contributor, on the media features.",[16,1325,1326],{},"There was a real incident: LiveKit was advertising the wrong ICE port, and I fixed it.",[16,1328,1329],{},"There are no user numbers, and I won't make them up. The value here is in the design and in the guarantees I was able to test.",[11,1331,1036],{"id":1035},[16,1333,1334],{},"I would use versioned migrations from the start. A schema created at boot doesn't alter anything and can also collide when several replicas start at once.",[16,1336,1337,1338,1341],{},"I would add ",[98,1339,1340],{},"FOR UPDATE SKIP LOCKED"," to the outbox reconciler. With more than one API replica, they would all scan the same rows and publish duplicates.",[16,1343,1344],{},"I would handle session resume outside the process memory. Today, after a deploy, the client rebuilds the session from scratch.",[16,1346,1347],{},"I would replace the gateway's single mutex with partitioned maps and set retention for the JetStream stream and for the nonces table.",[436,1349,1350],{},"html pre.shiki code .sDN9O, html code.shiki .sDN9O{--shiki-default:#6A737D;--shiki-dark:#768390}html pre.shiki code .s7YZ4, html code.shiki .s7YZ4{--shiki-default:#D73A49;--shiki-dark:#F47067}html pre.shiki code .sYgZi, html code.shiki .sYgZi{--shiki-default:#24292E;--shiki-dark:#ADBAC7}html pre.shiki code .sPO5f, html code.shiki .sPO5f{--shiki-default:#6F42C1;--shiki-dark:#DCBDFB}html pre.shiki code .s-HuK, html code.shiki .s-HuK{--shiki-default:#032F62;--shiki-dark:#96D0FF}html pre.shiki code .sviXB, html code.shiki .sviXB{--shiki-default:#005CC5;--shiki-dark:#6CB6FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":96,"searchDepth":111,"depth":148,"links":1352},[1353,1354,1361,1362,1363],{"id":13,"depth":111,"text":14},{"id":32,"depth":111,"text":33,"children":1355},[1356,1357,1358,1359,1360],{"id":1105,"depth":148,"text":1106},{"id":1115,"depth":148,"text":1116},{"id":1266,"depth":148,"text":1267},{"id":1273,"depth":148,"text":1274},{"id":1280,"depth":148,"text":1281},{"id":341,"depth":111,"text":342},{"id":1022,"depth":111,"text":1023},{"id":1035,"depth":111,"text":1036},"Personal project","oklch(0.78 0.12 210)","Real-time community platform, Discord-style: NestJS API, Go gateway, NATS JetStream, transactional outbox and voice with LiveKit.","Real-time messages without losing or duplicating any",{},[1370,1373],{"valor":1371,"rotulo":1372},"3","nodes in the NATS JetStream cluster",{"valor":1374,"rotulo":1375},"~94%","of commits, as main author","Main author (architecture and implementation)","\u002Fprojetos-en\u002Fblippy","2026 · in development","Community platform with servers, text and voice channels, attachments and screen sharing. I'm the main author; the project has one contributor on the advanced media features.",{"title":1087,"description":1366},[482,483,484,1382,1383,1384,1385,480,1386],"Go","NATS JetStream","Protobuf","LiveKit","Electron","projetos-en\u002Fblippy","3_OXKr4rBJinGTBAp9Npej005zKvYJmPLG3PzzoM82M","blippy","\u002Fen\u002Fprojetos\u002Fblippy",{"id":1392,"title":1393,"body":1394,"contexto":454,"cor":1696,"description":1697,"destaque":1698,"extension":458,"link":1699,"meta":1700,"navigation":206,"numeros":1701,"ordem":224,"papel":1710,"path":1711,"periodo":1712,"resumo":1713,"seo":1714,"stack":1715,"stem":1722,"__hash__":1723,"slug":1724,"to":1725,"soPt":493},"projetos_en\u002Fprojetos-en\u002Ffast-form.md","Fast Form",{"type":8,"value":1395,"toc":1683},[1396,1398,1401,1404,1406,1410,1425,1428,1432,1458,1585,1608,1612,1619,1623,1626,1630,1640,1642,1649,1651,1657,1663,1669,1671,1674,1677,1680],[11,1397,14],{"id":13},[16,1399,1400],{},"At work, I tested the same form over and over: name, email, phone, checkbox, several custom selects and fields that only show up after you pick an option. The ritual was to open a data generator in another tab, copy the CPF (Brazil's individual taxpayer ID), go back, paste. Then the CEP (Brazilian postal code), the phone, the email. Every time the validation changed, all over again.",[16,1402,1403],{},"I wanted to press a button and see the whole form filled in. For that, the tool had to open selects built with components (reka, shadcn), write the value in a way the framework would notice and generate data the validation would accept: a CPF with a check digit, a CEP from a city with an area code from the same region.",[11,1405,33],{"id":32},[35,1407,1409],{"id":1408},"filling-without-configuring-anything","Filling without configuring anything",[16,1411,1412,1413,1416,1417,1420,1421,1424],{},"Fast Form is a Chrome extension (Manifest V3), in plain JavaScript, with no framework and no build step. With no saved map, the ",[346,1414,1415],{},"Fill"," button recognizes fields by ",[98,1418,1419],{},"autocomplete",", by ",[98,1422,1423],{},"type"," and by labels in Portuguese, English and Spanish, infers the data type of each one and fills only the empty ones. If a field shows up later, a second click completes what was missing.",[1426,1427],"viz-fast-form",{},[35,1429,1431],{"id":1430},"writing-the-way-the-framework-expects","Writing the way the framework expects",[16,1433,1434,1435,1438,1439,1442,1443,1446,1447,1450,1451,1446,1454,1457],{},"Assigning ",[98,1436,1437],{},"el.value"," directly isn't enough in Vue or React: the framework never learns about the change. The fill selects the field's content and inserts the text with ",[98,1440,1441],{},"insertText",", which fires the same events as typing. If the field doesn't accept it, it falls back to the prototype's native setter and dispatches ",[98,1444,1445],{},"input"," and ",[98,1448,1449],{},"change"," with bubbling. At the \"Fast\" (default) and \"Natural\" speeds, insertion happens character by character, with ",[98,1452,1453],{},"keydown",[98,1455,1456],{},"keyup",", for masks that react to each keystroke.",[91,1459,1463],{"className":1460,"code":1461,"language":1462,"meta":96,"style":96},"language-js shiki shiki-themes github-light github-dark-dimmed","\u002F\u002F Plan B: write through the prototype setter and notify the framework\nconst proto = el.tagName === 'TEXTAREA' ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype\nObject.getOwnPropertyDescriptor(proto, 'value').set.call(el, texto)\nel.dispatchEvent(new Event('input', { bubbles: true }))\nel.dispatchEvent(new Event('change', { bubbles: true }))\n","js",[98,1464,1465,1470,1510,1533,1562],{"__ignoreMap":96},[101,1466,1467],{"class":103,"line":104},[101,1468,1469],{"class":107},"\u002F\u002F Plan B: write through the prototype setter and notify the framework\n",[101,1471,1472,1475,1478,1480,1483,1485,1488,1491,1494,1496,1499,1502,1505,1507],{"class":103,"line":111},[101,1473,1474],{"class":114},"const",[101,1476,1477],{"class":154}," proto",[101,1479,158],{"class":114},[101,1481,1482],{"class":118}," el.tagName ",[101,1484,185],{"class":114},[101,1486,1487],{"class":188}," 'TEXTAREA'",[101,1489,1490],{"class":114}," ?",[101,1492,1493],{"class":154}," HTMLTextAreaElement",[101,1495,415],{"class":118},[101,1497,1498],{"class":154},"prototype",[101,1500,1501],{"class":114}," :",[101,1503,1504],{"class":154}," HTMLInputElement",[101,1506,415],{"class":118},[101,1508,1509],{"class":154},"prototype\n",[101,1511,1512,1515,1518,1521,1524,1527,1530],{"class":103,"line":148},[101,1513,1514],{"class":118},"Object.",[101,1516,1517],{"class":122},"getOwnPropertyDescriptor",[101,1519,1520],{"class":118},"(proto, ",[101,1522,1523],{"class":188},"'value'",[101,1525,1526],{"class":118},").set.",[101,1528,1529],{"class":122},"call",[101,1531,1532],{"class":118},"(el, texto)\n",[101,1534,1535,1538,1541,1543,1546,1549,1551,1554,1557,1559],{"class":103,"line":176},[101,1536,1537],{"class":118},"el.",[101,1539,1540],{"class":122},"dispatchEvent",[101,1542,126],{"class":118},[101,1544,1545],{"class":114},"new",[101,1547,1548],{"class":122}," Event",[101,1550,126],{"class":118},[101,1552,1553],{"class":188},"'input'",[101,1555,1556],{"class":118},", { bubbles: ",[101,1558,1200],{"class":154},[101,1560,1561],{"class":118}," }))\n",[101,1563,1564,1566,1568,1570,1572,1574,1576,1579,1581,1583],{"class":103,"line":203},[101,1565,1537],{"class":118},[101,1567,1540],{"class":122},[101,1569,126],{"class":118},[101,1571,1545],{"class":114},[101,1573,1548],{"class":122},[101,1575,126],{"class":118},[101,1577,1578],{"class":188},"'change'",[101,1580,1556],{"class":118},[101,1582,1200],{"class":154},[101,1584,1561],{"class":118},[16,1586,1587,1588,1591,1592,1595,1596,1599,1600,1603,1604,1607],{},"Custom selects are handled by ARIA role: the trigger with ",[98,1589,1590],{},"role=\"combobox\""," or ",[98,1593,1594],{},"aria-haspopup=\"listbox\""," is opened, the list is found through ",[98,1597,1598],{},"aria-controls"," and the option is picked among the visible, enabled ones. For components made only of ",[98,1601,1602],{},"div","s, the map's ",[346,1605,1606],{},"Element"," mode lets you point to the options selector.",[35,1609,1611],{"id":1610},"fake-data-that-passes-validation","Fake data that passes validation",[16,1613,1614,1615,1618],{},"Each fill is a round: related values stay consistent with each other. CEP, city and state come from the same postal sample, the phone uses the region's area code, and the Mexican CURP matches the generated name and date of birth. There are ten samples per country, built from postal service sources for most of them. Documents have computed check digits (CPF, alphanumeric CNPJ, CURP, RUT, NIF and others) for Brazil, the US, Mexico, Argentina, Uruguay, Portugal, Spain, Chile and Colombia. The email uses a persistent counter (",[98,1616,1617],{},"teste+t12@","), so it doesn't hit \"email already registered\".",[35,1620,1622],{"id":1621},"a-per-page-map-when-you-need-one","A per-page map when you need one",[16,1624,1625],{},"For forms with their own rules, you can map them: click the fields in order, choose the data type and variation, set a fixed value or a click action that reveals a section before filling. The map saves itself per host and route. Clicks that look like they submit the form are rejected as actions: the extension never submits anything.",[35,1627,1629],{"id":1628},"privacy-as-a-product-requirement","Privacy as a product requirement",[16,1631,1632,1633,1446,1636,1639],{},"No script enters the page before the person accepts the privacy notice on the welcome screen. ",[98,1634,1635],{},"localhost",[98,1637,1638],{},"127.0.0.1"," are allowed after acceptance. For any other site, the popup asks Chrome for permission for that host only. Everything runs in the browser: no server, no telemetry. The AI assistant, which is experimental, only copies a prompt to the clipboard. The person pastes it into the AI they already use and reviews the JSON before applying it.",[35,1641,1281],{"id":1280},[16,1643,1644,1645,1648],{},"There are 86 tests for generators, formats, countries and settings migration, running with ",[98,1646,1647],{},"node --test",", with no dependencies. A second script loads the extension in a real Chromium through the DevTools Protocol and walks through acceptance, injection, filling, detection and the popup. The same script produces the store's 1280×800 screenshots, in light and dark themes.",[11,1650,342],{"id":341},[16,1652,1653,1656],{},[346,1654,1655],{},"No framework and no build."," A small extension loads fast and is easy to audit in the store review. The cost is keeping the visual tokens in two places: in the extension's pages and in the panel injected into sites.",[16,1658,1659,1662],{},[346,1660,1661],{},"Fill first, map later."," The first version required mapping the page before filling anything, and the value only showed up after several steps. I flipped it: automatic recognition delivers a result on the first click, and the map became fine-tuning.",[16,1664,1665,1668],{},[346,1666,1667],{},"Settings in simple and advanced modes."," With nine sections, the page was intimidating. Simple mode shows the essentials; Advanced adds formats, data types, custom lists and the pages' JSON.",[11,1670,1023],{"id":1022},[16,1672,1673],{},"From the first commit, on October 21, 2026, to approval on the Chrome Web Store took five days. The extension is free, has an interface in Portuguese, English and Spanish, and was launched on LinkedIn on October 29.",[16,1675,1676],{},"Two cases are still open, which I pointed out myself at launch. In a wizard that changes steps without changing the URL, all steps fall into the same map. With a modal open over another form, the fill reaches both layers at once.",[16,1678,1679],{},"About AI: the code was written with heavy assistance from Claude Code and Codex. The product, the UX, the decisions and the review are mine.",[436,1681,1682],{},"html pre.shiki code .sDN9O, html code.shiki .sDN9O{--shiki-default:#6A737D;--shiki-dark:#768390}html pre.shiki code .s7YZ4, html code.shiki .s7YZ4{--shiki-default:#D73A49;--shiki-dark:#F47067}html pre.shiki code .sviXB, html code.shiki .sviXB{--shiki-default:#005CC5;--shiki-dark:#6CB6FF}html pre.shiki code .sYgZi, html code.shiki .sYgZi{--shiki-default:#24292E;--shiki-dark:#ADBAC7}html pre.shiki code .s-HuK, html code.shiki .s-HuK{--shiki-default:#032F62;--shiki-dark:#96D0FF}html pre.shiki code .sPO5f, html code.shiki .sPO5f{--shiki-default:#6F42C1;--shiki-dark:#DCBDFB}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":96,"searchDepth":111,"depth":148,"links":1684},[1685,1686,1694,1695],{"id":13,"depth":111,"text":14},{"id":32,"depth":111,"text":33,"children":1687},[1688,1689,1690,1691,1692,1693],{"id":1408,"depth":148,"text":1409},{"id":1430,"depth":148,"text":1431},{"id":1610,"depth":148,"text":1611},{"id":1621,"depth":148,"text":1622},{"id":1628,"depth":148,"text":1629},{"id":1280,"depth":148,"text":1281},{"id":341,"depth":111,"text":342},{"id":1022,"depth":111,"text":1023},"oklch(0.72 0.17 125)","Chrome extension that fills test forms with fake but valid data: automatic field recognition, per-page maps, 9 countries and privacy by default.","Fills only the empty fields, the way the framework expects","https:\u002F\u002Fchromewebstore.google.com\u002Fdetail\u002Ffast-form\u002Faakekbideekblfdnmadpelobgobnplak",{},[1702,1705,1708],{"valor":1703,"rotulo":1704},"9","countries with test data",{"valor":1706,"rotulo":1707},"86","automated tests",{"valor":1371,"rotulo":1709},"interface languages","Sole author (product, UX, code and publishing)","\u002Fprojetos-en\u002Ffast-form","2026 · on the Chrome Web Store","Chrome extension that fills a test form in one click, with a valid CPF, a CEP that matches the city and a phone number with the right area code. From idea to the Chrome Web Store in one week.",{"title":1393,"description":1697},[1716,1717,1718,1719,1720,1721],"JavaScript","Chrome Extensions MV3","chrome.scripting","chrome.storage","Node.js test runner","Chrome DevTools Protocol","projetos-en\u002Ffast-form","TsuNDyC-QBLT_jOfQIq1y7u9ArvswWQ99K3Fh5swIvU","fast-form","\u002Fen\u002Fprojetos\u002Ffast-form",{"posts":1727,"soPt":1774},[1728,1740,1749,1756,1766],{"path":1729,"titulo":1730,"data":1731,"resumo":1732,"tags":1733},"\u002Fen\u002Fblog\u002F2026-11-ia-prova-que-terminou","How AI proves it's done: specs with IDs, gates and mutation testing","2026-11-10","A checkbox ticked by the same agent that wrote the code proves nothing. How I use specs with IDs, gates, an independent verifier and mutation testing to demand proof.",[1734,1735,1736,1737,1738,1739],"ia","qualidade","testes","gates","mutation-testing","metodo",{"path":1741,"titulo":1742,"data":1743,"resumo":1744,"tags":1745},"\u002Fen\u002Fblog\u002F2026-11-mockup-como-especificacao","Mockup as specification: 548 variations approved before the first Vue component","2026-11-04","How I approve an entire interface, with every state and persona, in HTML with the real tokens, before writing Vue. The Kravva method and what Blippy and Escambo showed.",[1734,1746,1747,1748,1735],"front-end","mockup","design-system",{"path":1750,"titulo":1751,"data":1752,"resumo":1753,"tags":1754},"\u002Fen\u002Fblog\u002F2026-10-metodo-ia","How I develop with AI: from mockup to deploy, across three products","2026-10-28","The method I built in Kravva, Escambo and Blippy: context as a budget, robot-validated mockups, specs with IDs, runners, and gates the AI can't skip.",[1734,1739,1755,1746,1735],"sdd",{"path":1757,"titulo":1758,"data":1759,"resumo":1760,"tags":1761},"\u002Fen\u002Fblog\u002F2026-10-socketio-cluster","Socket.io in cluster mode: the bug that took down my live scoreboard","2026-10-21","In production, Socket.io answered 'Session ID unknown' with 2 workers. The real cause, and the roles of Nginx, the Redis adapter and JWT in the sockets.",[1762,1763,1764,1765],"socketio","nginx","redis","nodejs",{"path":1767,"titulo":1768,"data":1769,"resumo":1770,"tags":1771},"\u002Fen\u002Fblog\u002F2026-10-pix-idempotente","How I avoided charging a PIX payment twice","2026-10-14","PIX webhooks arrive duplicated. How I authenticated them with HMAC, confirmed them with a pessimistic lock in Postgres, and recorded everything in an append-only ledger.",[1772,1773,315],"nestjs","postgres",[],{"id":1776,"title":1777,"body":1778,"data":1731,"description":2417,"extension":458,"meta":2418,"navigation":206,"path":2419,"resumo":1732,"seo":2420,"stem":2421,"tags":2422,"titulo":1730,"__hash__":2423},"blog_en\u002Fblog-en\u002F2026-11-ia-prova-que-terminou.md","2026 11 Ia Prova Que Terminou",{"type":8,"value":1779,"toc":2403},[1780,1787,1799,1803,1818,1821,1825,1845,1856,1860,1867,1915,1923,1929,1978,1985,2003,2007,2022,2037,2047,2051,2058,2087,2090,2094,2108,2111,2122,2126,2139,2146,2165,2168,2172,2175,2196,2208,2222,2226,2229,2304,2315,2319,2322,2362,2366,2390,2400],[16,1781,1782,1783,1786],{},"In the first scorecard I made of my method on Kravva, the ",[23,1784,1737],{"id":1785},"gate"," dimension scored 2 out of 10 and the verifiable criteria dimension scored 3. The reason was simple and embarrassing: CI only ran the build, and each task's checklist was ticked by the same agent that had written the code. The AI said \"done\", and I had no way to disagree without redoing its work.",[16,1788,1789,1790,1794,1795,1798],{},"This post goes deeper into the second rule of the ",[1791,1792,1793],"a",{"href":1750},"main article",": ",[346,1796,1797],{},"AI does not certify itself",". I'll show the whole mechanism, from the checkbox to mutation testing, with numbers from my projects and with what didn't work. The scorecard is my own self-assessment, not an external audit, and it measures the pipeline, not results in production.",[11,1800,1802],{"id":1801},"mandatory-evidence-the-checkbox-needs-a-command","Mandatory evidence: the checkbox needs a command",[16,1804,1805,1806,1809,1810,1813,1814,1817],{},"The first change was the cheapest. A checkbox only counts as done with three things recorded: the ",[346,1807,1808],{},"exact command",", the ",[346,1811,1812],{},"exit code"," and a ",[346,1815,1816],{},"summary of the result",". \"I tested it and it works\" doesn't count. A real test command, with exit 0 and a summary of what passed, does.",[16,1819,1820],{},"When closing a task requires pasting a command that actually ran, the shortest path becomes running the command.",[35,1822,1824],{"id":1823},"on-blippy-the-evidence-is-audited-too","On Blippy the evidence is audited too",[16,1826,1827,1828,1831,1832,1838,1839,1591,1842,1844],{},"On Blippy I turned the rule into a gate. Each task has a row in ",[98,1829,1830],{},"docs\u002Fprocesso\u002FEVIDENCIAS.md"," with task, criterion, command, exit code, result and date. The evidence gate fails in three cases: a ticked checkbox with no row, a row with no exit code, and ",[346,1833,1834],{},[23,1835,1837],{"id":1836},"evidencia tautologica","tautological evidence",". If the recorded command is ",[98,1840,1841],{},"echo ok",[98,1843,1200],{},", the gate rejects it, because those commands always pass and prove nothing.",[16,1846,1847,1848,1851,1852,1855],{},"There is also an ordering rule, in the task execution skill: ",[346,1849,1850],{},"declare the verifiable before coding",". The task is born with a ",[98,1853,1854],{},"Verificável:"," field holding the proof command. The reasoning is written in the skill itself: declaring it after implementing means picking the proof the code already passes.",[11,1857,1859],{"id":1858},"executable-specs-the-criterion-carries-an-id","Executable specs: the criterion carries an ID",[16,1861,1862,1863,1866],{},"Per-task evidence still leaves a hole. Who guarantees the test checks the right behavior? On critical surfaces, I write the criterion first, with a ",[346,1864,1865],{},"stable ID",", and the test carries the same ID.",[16,1868,1869,1870,1873,1874,1877,1878,1881,1882,1885,1886,1889,1890,1893,1894,1893,1897,1893,1900,1893,1903,1446,1906,1909,1910,1914],{},"On Kravva the prefixes are ",[98,1871,1872],{},"RBAC"," (permissions), ",[98,1875,1876],{},"PAG"," (payment), ",[98,1879,1880],{},"PALP"," (predictions), ",[98,1883,1884],{},"PONT"," (scoring) and ",[98,1887,1888],{},"LGPD"," (Brazil's data protection law). On Blippy they are ",[98,1891,1892],{},"AUTHZ",", ",[98,1895,1896],{},"PRIV",[98,1898,1899],{},"MEDIA",[98,1901,1902],{},"DATA",[98,1904,1905],{},"GW",[98,1907,1908],{},"PROTO",". The format is ",[23,1911,1913],{"id":1912},"gwt","given\u002Fwhen\u002Fthen",", the same one used in behavior tests. A real Kravva criterion, simplified:",[91,1916,1921],{"className":1917,"code":1919,"language":1920,"meta":96},[1918],"language-text","### PAG-001: Invalid signature\nGIVEN a payload received from the provider\nWHEN the HMAC signature does not match the secret\nTHEN the API rejects the request\n  and no transaction or access is created.\n","text",[98,1922,1919],{"__ignoreMap":96},[16,1924,1925,1926,1928],{},"Here the signature is an ",[23,1927,78],{"id":77}," that the payment provider sends along with the payload. The matching test has the ID in its title. This is the title of a real test (I broke the line to fit and left out the body):",[91,1930,1932],{"className":93,"code":1931,"language":95,"meta":96,"style":96},"it('PAG-001: given a missing HMAC signature, when the HTTP edge\n    receives the webhook, then it rejects without touching transaction or access',\n  async () => { \u002F* ... *\u002F })\n",[98,1933,1934,1948,1959],{"__ignoreMap":96},[101,1935,1936,1939,1941,1944],{"class":103,"line":104},[101,1937,1938],{"class":122},"it",[101,1940,126],{"class":118},[101,1942,1943],{"class":188},"'PAG-001: given a missing HMAC signature, when the HTTP edg",[101,1945,1947],{"class":1946},"sNWHW","e\n",[101,1949,1950,1953,1956],{"class":103,"line":111},[101,1951,1952],{"class":118},"    receives the webhook, then it rejects without touching transaction or access",[101,1954,1955],{"class":188},"'",[101,1957,1958],{"class":1946},",\n",[101,1960,1961,1964,1967,1969,1972,1975],{"class":103,"line":148},[101,1962,1963],{"class":114},"  async",[101,1965,1966],{"class":118}," () ",[101,1968,142],{"class":114},[101,1970,1971],{"class":118}," { ",[101,1973,1974],{"class":107},"\u002F* ... *\u002F",[101,1976,1977],{"class":118}," })\n",[16,1979,1980,1981,1984],{},"A criterion can have several tests. PAG-001 has four, one for each way of forging the signature. Besides the test, each ID becomes a row in an ",[346,1982,1983],{},"evidence table",": ID, test file, command, exit code, result, date. Two rules complete the design:",[383,1986,1987,1997],{},[386,1988,1989,1992,1993,1996],{},[346,1990,1991],{},"IDs are never reused."," A criterion that goes away stays as ",[98,1994,1995],{},"REMOVIDO"," (removed) with the reason. The ID keeps pointing to the same concept forever.",[386,1998,1999,2002],{},[346,2000,2001],{},"The test mirrors the ID literally",", so a text search links spec, test and evidence.",[11,2004,2006],{"id":2005},"the-traceability-gate-and-its-honesty","The traceability gate and its honesty",[16,2008,2009,2010,2013,2014,2017,2018,2021],{},"A script checks all of this on every push and in CI. On Kravva it requires a test title with the same ID, rejects a duplicated ID with different text, validates the evidence table and compares legacy gaps against a ",[23,2011,2012],{"id":2012},"baseline"," that only goes down. The last run I recorded: ",[346,2015,2016],{},"42 criteria linked to 82 test titles",", with zero legacy gaps. On Blippy there are ",[346,2019,2020],{},"30 criteria"," (AUTHZ 12, PRIV 9, MEDIA 4, DATA 3, GW 1, PROTO 1), on the same principle.",[16,2023,2024,2025,2028,2029,2032,2033,2036],{},"The most important part is what the gate does ",[346,2026,2027],{},"not"," guarantee. It proves there is a test with that ID. It doesn't prove the test asserts anything useful. An ",[98,2030,2031],{},"expect(true).toBe(true)"," with ",[98,2034,2035],{},"PAG-001"," in the title would pass. The gate's documentation says this in plain words: it is a safety net against forgetting, not a certificate of correctness.",[16,2038,2039,2040,2046],{},"This limitation is the same one Birgitta Böckeler, from Thoughtworks, points out in her ",[1791,2041,2045],{"href":2042,"rel":2043},"https:\u002F\u002Fwww.martinfowler.com\u002Farticles\u002Fexploring-gen-ai\u002Fsdd-3-tools.html",[2044],"nofollow","analysis of SDD tools",", when she talks about a false sense of control. The whole second half of this post exists to close that gap.",[11,2048,2050],{"id":2049},"what-writing-the-specs-revealed","What writing the specs revealed",[16,2052,2053,2054,2057],{},"The strongest argument for writing the criterion before the code came for free. While writing the payment and scoring specs on Kravva, on July 30, 2026, the process found ",[346,2055,2056],{},"real defects",":",[383,2059,2060,2067,2073,2080],{},[386,2061,2062,2063,2066],{},"the webhook's payment confirmation ran ",[346,2064,2065],{},"outside a transaction",";",[386,2068,2069,2070,2066],{},"a provider redelivery that aborted halfway left a ",[346,2071,2072],{},"payment without the matching pass",[386,2074,2075,2076,2079],{},"the access table ",[346,2077,2078],{},"had no uniqueness constraint",", so the same active access could exist twice (this became a migration with a unique index);",[386,2081,2082,2083,2086],{},"a match that became terminal without a score (cancelled, abandoned, postponed) ",[346,2084,2085],{},"kept the points"," from an earlier final result.",[16,2088,2089],{},"They showed up because, to write \"GIVEN a redelivery WHEN processing fails THEN no payment is left without a pass\", I had to look the failure case in the face. The spec worked as a review before it became a test.",[11,2091,2093],{"id":2092},"independent-verifier-whoever-wrote-it-doesnt-give-the-verdict","Independent verifier: whoever wrote it doesn't give the verdict",[16,2095,2096,2097,2103,2104,2107],{},"For critical blocks, the final verification isn't done by the author. A fresh-context ",[346,2098,2099],{},[23,2100,2102],{"id":2101},"subagente","subagent",", never the same one that implemented it, gets the block's IDs and tries to ",[346,2105,2106],{},"falsify"," each one: it inverts an assertion, removes a check, and sees whether any test notices. If no test complains, the test was decorative.",[16,2109,2110],{},"The verifier returns a verdict: approved, approved with caveat, or rejected. A high or critical finding keeps the phase open and can't be deleted. In the payment stage, for example, the verdict was \"approved with caveat\" and produced a follow-up: the \"already paid, no access\" case, from PAG-003.",[16,2112,2113,2114,2117,2118,2121],{},"Two caveats. The skill states that the verifier ",[346,2115,2116],{},"does not replace human review",". And, since October 2026, verification is done by a ",[346,2119,2120],{},"different model"," from the one that implemented, to reduce the risk of the same blind spot showing up on both sides.",[11,2123,2125],{"id":2124},"mutation-testing-proving-assertion-strength","Mutation testing: proving assertion strength",[16,2127,2128,2129,2131,2132,2138],{},"Falsifying by hand works, but it doesn't scale. On Blippy I automated the idea with ",[23,2130,1287],{"id":1287},": a tool (Stryker) changes the code on purpose, creating ",[346,2133,2134],{},[23,2135,2137],{"id":2136},"mutante","mutants",", and runs the tests. If the tests keep passing, the mutant survived, and that is mechanical proof of a weak assertion.",[16,2140,2141,2142,2145],{},"I applied it to two pure modules of the protocol package, permissions and ID generation, where the cost is low and the risk is high. The result: ",[346,2143,2144],{},"96.48% of mutants killed (137 of 142)",", with a minimum threshold of 85% in the gate.",[16,2147,2148,2149,2152,2153,2156,2157,2160,2161,2164],{},"The detail I like most is the ",[346,2150,2151],{},"negative test of the gate itself",". There is a ",[98,2154,2155],{},"--weaken"," mode that swaps strong assertions for ",[98,2158,2159],{},"toBeDefined()",". With the tests weakened on purpose, the score drops to ",[346,2162,2163],{},"71.83%"," and the gate fails with exit 1. A gate that never fails in a test doesn't convince me, so it has to prove it knows how to fail.",[16,2166,2167],{},"The sentence that sums up why this is worth more than the alternative: a surviving mutant is mechanical proof of a weak assertion, while a second LLM agreeing is a correlated opinion. Important: mutation testing runs only on Blippy, on pure modules. Not on Kravva yet.",[11,2169,2171],{"id":2170},"ratchet-or-zero-baseline-it-depends-on-the-ground","Ratchet or zero baseline: it depends on the ground",[16,2173,2174],{},"There are two ways to handle debt in a gate, and I used both.",[16,2176,2177,2183,2184,2187,2188,2191,2192,2195],{},[346,2178,2179,2180,415],{},"On Kravva, a ",[23,2181,2182],{"id":2182},"ratchet"," The project already existed when the gates arrived. The backend lint had ",[346,2185,2186],{},"205 legacy errors",". Instead of pretending it was clean or postponing CI until everything was cleaned up, the gate came in with a baseline: the current number is the ceiling, and it can only go ",[346,2189,2190],{},"down",". Raising the baseline to make CI pass is forbidden by ",[98,2193,2194],{},"AGENTS.md",". CI started protecting new code, and the old debt became visible.",[16,2197,2198,2201,2202,2207],{},[346,2199,2200],{},"On Blippy, a zero baseline."," The project was born with the gates, so there was no legacy to protect. Any violation fails. The only exception is a ",[346,2203,2204],{},[23,2205,2206],{"id":2206},"waiver",": a deadline of at most 30 days, a reason, an owning task and a cap of 10 active waivers. At the last measurement, no waiver was active.",[16,2209,2210,2211,2221],{},"The rule of thumb: ",[346,2212,2213,2216,2217,2220],{},[23,2214,2215],{"id":2215},"brownfield"," calls for a ratchet, ",[23,2218,2219],{"id":2219},"greenfield"," calls for zero."," A zero baseline on legacy code paralyzes the team, and a ratchet on a new project is a license to be born with debt.",[11,2223,2225],{"id":2224},"blippys-gate-rings","Blippy's gate rings",[16,2227,2228],{},"The earlier a gate fails, the cheaper the fix. That's why I organized the gates in rings, from fastest to most complete:",[2230,2231,2232,2248],"table",{},[2233,2234,2235],"thead",{},[2236,2237,2238,2242,2245],"tr",{},[2239,2240,2241],"th",{},"Ring",[2239,2243,2244],{},"When it runs",[2239,2246,2247],{},"What it runs",[2249,2250,2251,2262,2272,2282,2293],"tbody",{},[2236,2252,2253,2256,2259],{},[2254,2255,933],"td",{},[2254,2257,2258],{},"agent hook, on every edited file (2 s cap)",[2254,2260,2261],{},"structural rules with ast-grep",[2236,2263,2264,2266,2269],{},[2254,2265,472],{},[2254,2267,2268],{},"pre-commit (10 s cap)",[2254,2270,2271],{},"gitleaks on what was staged; Prettier and ESLint applying fixes",[2236,2273,2274,2276,2279],{},[2254,2275,1371],{},[2254,2277,2278],{},"pre-push (120 s cap)",[2254,2280,2281],{},"format, lint, types, tests, boundaries, protocol, design system, docs, traceability, evidence, waivers",[2236,2283,2284,2287,2290],{},[2254,2285,2286],{},"4",[2254,2288,2289],{},"pull request CI",[2254,2291,2292],{},"ring 3, plus semgrep, gitleaks on the history, integration and mutation; no bypass allowed",[2236,2294,2295,2298,2301],{},[2254,2296,2297],{},"5",[2254,2299,2300],{},"nightly",[2254,2302,2303],{},"load and dependency scanning (planned)",[16,2305,2306,2307,2310,2311,2314],{},"Across the whole history, the last recorded gitleaks scan found ",[346,2308,2309],{},"0 leaks in 409 commits",", and the gate was tested with a fake credential to prove it fails. Semgrep, for its part, has already flagged practices of mine: a CI Action pinned to a moving tag instead of a SHA, ",[98,2312,2313],{},"math\u002Frand"," in a fuzz test, and pnpm without a supply chain policy. All three were fixed: SHA pinned, a local number generator and a supply chain policy in pnpm.",[11,2316,2318],{"id":2317},"what-didnt-work","What didn't work",[16,2320,2321],{},"This isn't a finished system. The failures that taught me the most:",[383,2323,2324,2338,2348],{},[386,2325,2326,2329,2330,2333,2334,2337],{},[346,2327,2328],{},"Green CI, red deploy."," On Blippy, the types ring ran ",[98,2331,2332],{},"tsc --noEmit",", and the production build ran ",[98,2335,2336],{},"vue-tsc -b",". A file passed one and failed the other. I logged it as pending and learned that the gate has to run the same command as the deploy.",[386,2339,2340,2343,2344,2347],{},[346,2341,2342],{},"False task closure."," A UI task was marked as done, and I caught in review that part of the screen (a native ",[98,2345,2346],{},"select"," in an overlay) was still in the old pattern. The task's preload now mentions the missing component. Human review caught it, not a gate.",[386,2349,2350,2353,2354,2361],{},[346,2351,2352],{},"Escambo, with light gates."," Escambo had only lint, types and a 57-line architecture check. Six packages closed in one day, and the planning method was good. Two months later, running the app end to end with ",[346,2355,2356,2357],{},"seven ",[23,2358,2360],{"id":2359},"persona","personas",", core bugs showed up in features marked as finished, such as the owner of an offer who couldn't counter a proposal. Planning well doesn't replace proving.",[11,2363,2365],{"id":2364},"takeaways","Takeaways",[383,2367,2368,2378,2381,2384,2387],{},[386,2369,2370,2371,2373,2374,2377],{},"A checkbox only closes with command, exit code and summary. On Blippy, tautological evidence like ",[98,2372,1841],{}," fails, and the verifiable is declared ",[346,2375,2376],{},"before"," coding.",[386,2379,2380],{},"Criteria with stable IDs (given\u002Fwhen\u002Fthen) on critical surfaces, the same ID in the test title, and a gate that rejects a criterion without a test. It proves the link, not assertion strength.",[386,2382,2383],{},"Writing the specs found real defects in payment and scoring before any test ran.",[386,2385,2386],{},"Whoever wrote it doesn't verify it: a fresh-context subagent and, since Oct 2026, a different model. For assertion strength, mutation testing with a threshold and a negative test of the gate itself.",[386,2388,2389],{},"Legacy calls for a ratchet that only goes down, a new project calls for a zero baseline with short waivers. A good gate fails early and runs the same command as the deploy.",[16,2391,2392,2393,1893,2396,2399],{},"Continue the series: ",[1791,2394,2395],{"href":1750},"how I develop with AI",[1791,2397,2398],{"href":1741},"mockup as specification",", runner and \u002Fgoal (coming soon) and SDD in practice (coming soon).",[436,2401,2402],{},"html pre.shiki code .sPO5f, html code.shiki .sPO5f{--shiki-default:#6F42C1;--shiki-dark:#DCBDFB}html pre.shiki code .sYgZi, html code.shiki .sYgZi{--shiki-default:#24292E;--shiki-dark:#ADBAC7}html pre.shiki code .s-HuK, html code.shiki .s-HuK{--shiki-default:#032F62;--shiki-dark:#96D0FF}html pre.shiki code .sNWHW, html code.shiki .sNWHW{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FF938A;--shiki-dark-font-style:italic}html pre.shiki code .s7YZ4, html code.shiki .s7YZ4{--shiki-default:#D73A49;--shiki-dark:#F47067}html pre.shiki code .sDN9O, html code.shiki .sDN9O{--shiki-default:#6A737D;--shiki-dark:#768390}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":96,"searchDepth":111,"depth":148,"links":2404},[2405,2408,2409,2410,2411,2412,2413,2414,2415,2416],{"id":1801,"depth":111,"text":1802,"children":2406},[2407],{"id":1823,"depth":148,"text":1824},{"id":1858,"depth":111,"text":1859},{"id":2005,"depth":111,"text":2006},{"id":2049,"depth":111,"text":2050},{"id":2092,"depth":111,"text":2093},{"id":2124,"depth":111,"text":2125},{"id":2170,"depth":111,"text":2171},{"id":2224,"depth":111,"text":2225},{"id":2317,"depth":111,"text":2318},{"id":2364,"depth":111,"text":2365},"In the first scorecard I made of my method on Kravva, the gates dimension scored 2 out of 10 and the verifiable criteria dimension scored 3. The reason was simple and embarrassing: CI only ran the build, and each task's checklist was ticked by the same agent that had written the code. The AI said \"done\", and I had no way to disagree without redoing its work.",{},"\u002Fblog-en\u002F2026-11-ia-prova-que-terminou",{"description":2417},"blog-en\u002F2026-11-ia-prova-que-terminou",[1734,1735,1736,1737,1738,1739],"em9ZlyiQbztPeoSnDBfRbO6JuCp22qRNWQVgxUKz5yY",1794359760487]