<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Luis Henrique Vasconcelos</title>
    <description>The latest articles on DEV Community by Luis Henrique Vasconcelos (@luishrqvf).</description>
    <link>https://dev.to/luishrqvf</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4078300%2F63765330-17ec-4037-85f3-a67a4be309f4.png</url>
      <title>DEV Community: Luis Henrique Vasconcelos</title>
      <link>https://dev.to/luishrqvf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/luishrqvf"/>
    <language>en</language>
    <item>
      <title>I Reverse-Engineered a Restaurant ERP With No Documentation. Here's What It Taught Me About Being a Self-Taught Developer.</title>
      <dc:creator>Luis Henrique Vasconcelos</dc:creator>
      <pubDate>Sat, 15 Aug 2026 00:19:56 +0000</pubDate>
      <link>https://dev.to/luishrqvf/i-reverse-engineered-a-restaurant-erp-with-no-documentation-heres-what-it-taught-me-about-being-a-275e</link>
      <guid>https://dev.to/luishrqvf/i-reverse-engineered-a-restaurant-erp-with-no-documentation-heres-what-it-taught-me-about-being-a-275e</guid>
      <description>&lt;p&gt;There is no manual for TronSoft. No API reference, no schema diagram, no forum thread explaining why a comanda refuses to close. If you want to understand it, you open the database and start pulling threads until something makes sense.&lt;/p&gt;

&lt;p&gt;That's exactly what I did — for months, on top of my actual job.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem nobody wrote down
&lt;/h2&gt;

&lt;p&gt;I'm the Operations Manager at a restaurant in Itaúna, a mid-sized town in Minas Gerais, Brazil. I'm also the only person there who writes software. Not because I was hired to — because the restaurant runs on a Brazilian ERP called TronSoft, built on a Firebird database, and Firebird doesn't come with the kind of ecosystem you get around Postgres or MySQL. No Stack Overflow flood of answers. No official docs beyond a thin operator manual. Vendor support exists, but it's slow, and it doesn't scale to "I want to automate this specific internal workflow at 11pm on a Tuesday."&lt;/p&gt;

&lt;p&gt;So when I needed to automate payment reconciliation, close out comandas without touching the vendor's fragile UI, and trigger fiscal document emission (NFC-e) reliably, I didn't have a spec to follow. I had a live production database and a lot of curiosity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning a system by watching it think
&lt;/h2&gt;

&lt;p&gt;I started the way you'd expect: opening tables, guessing at relationships, breaking things in a test environment until I understood why they broke. Over time that turned into something more systematic — I ended up documenting &lt;strong&gt;390 tables and 514 foreign keys&lt;/strong&gt; across roughly 40 functional modules, entirely from observation. No vendor documentation, no source code access. Just structure, inference, and a lot of trial and error.&lt;/p&gt;

&lt;p&gt;Some of what I learned only reveals itself under pressure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Firebird's SQL dialect has its own quirks — &lt;code&gt;FIRST 1&lt;/code&gt; instead of &lt;code&gt;LIMIT&lt;/code&gt;, for one. Small thing, but it breaks every query you copy-paste from a Postgres tutorial.&lt;/li&gt;
&lt;li&gt;Primary keys aren't auto-incrementing in the way you'd assume. They're driven by generators (&lt;code&gt;GEN_ID&lt;/code&gt;), and if you write a record without syncing the generator correctly, you get silent, confusing collisions later.&lt;/li&gt;
&lt;li&gt;Composite primary keys meant that inserting a row "correctly" by every visible rule could still conflict in ways that only showed up once real concurrent traffic hit the system.&lt;/li&gt;
&lt;li&gt;Transactions don't behave the way you expect until you understand exactly how autocommit visibility works in this specific setup — I've had records that existed, technically, but weren't &lt;em&gt;visible&lt;/em&gt; yet to the process that needed them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The hardest part wasn't the SQL. It was reverse-engineering &lt;em&gt;behavior&lt;/em&gt; — the exact sequence of writes that happens when a human closes a comanda through the official interface, so that my automation could replicate it precisely enough for the fiscal emission service to recognize it as legitimate. I ended up watching Firebird's internal monitoring tables (&lt;code&gt;MON$&lt;/code&gt;) in real time, diffing snapshots before and after manual actions, essentially instrumenting a black box to learn its own rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this mattered more than "just automating a task"
&lt;/h2&gt;

&lt;p&gt;The first version of my automation used screen automation — literally driving the mouse and keyboard through TronSoft's UI to close comandas, because that was the only interface I had confidence in. It worked, but it was fragile. A window in the wrong position, a dialog that opened a half-second late, and the whole thing broke.&lt;/p&gt;

&lt;p&gt;The real turning point was when I stopped treating TronSoft as a UI to automate and started treating it as a database to understand. Once I could write directly and safely to &lt;code&gt;COMANDA&lt;/code&gt;, &lt;code&gt;ITEM_COMANDA&lt;/code&gt;, and the tables around fiscal emission — replicating the exact NULL patterns and field conventions the vendor's own software expected — the automation became something closer to a real integration than a hack. It's been running in production since, quietly closing out transactions and triggering fiscal documents without anyone touching a mouse.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell another self-taught developer staring at an undocumented system
&lt;/h2&gt;

&lt;p&gt;I don't have a computer science degree from a top university. I'm self-taught, with a technical background from mechatronics, and everything I know about Firebird internals I learned by doing exactly what I'm describing here — sitting with a black box until it stopped being one.&lt;/p&gt;

&lt;p&gt;A few things I'd say to anyone in a similar spot:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The absence of documentation is not a wall — it's a dataset.&lt;/strong&gt; A live system is telling you how it works every time it runs. Snapshot diffing, query logging, and careful observation will teach you more than most manuals would anyway.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Depth in a narrow, unglamorous system is a real asset.&lt;/strong&gt; Nobody else at my company — and very few developers anywhere — have spent this much time inside TronSoft's internals. That's not a coincidence; most people avoid legacy systems like this because they're tedious. Tedious and rare is a good combination if you're willing to do the work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Production is the real test.&lt;/strong&gt; It's one thing to understand a schema. It's another to write to it in a way that a separate, closed-source fiscal service accepts without complaint. That gap — between "I understand this" and "this works reliably in production" — is where most of the actual learning happened.&lt;/p&gt;

&lt;p&gt;I'm now taking that same instinct — sitting with a system until I understand its real behavior, not just its documented behavior — into evaluating AI coding agents, which turns out to be a surprisingly similar skill: watching a black box, forming hypotheses, and testing them against what actually happens.&lt;/p&gt;

&lt;p&gt;If you've done something similar — reverse-engineered a legacy system nobody wanted to touch — I'd like to hear how you approached it.&lt;/p&gt;

</description>
      <category>reverseengineering</category>
      <category>database</category>
      <category>career</category>
      <category>sql</category>
    </item>
  </channel>
</rss>
