← Back to projects

Tablado

A management system for 3D-printing shops: it prices each piece per sales channel, tracks orders and filament, and closes the month. Live, in free beta.

liveReal users, real data.

The problem

I was about to start selling 3D-printed pieces, and a simple question had no easy answer: how much should I charge? The cost mixes filament, electricity, wear on the machine, failed prints and my own time. Then comes the channel. With Pix, Brazil’s instant bank transfer, the money arrives whole. On Shopee and Mercado Livre, two marketplaces where small Brazilian shops sell, a commission comes out plus a fixed fee, and on a cheap piece the fixed fee weighs a lot.

Tablado started in October 2026 as the system for my own shop and then became a product: from the price of a piece to the order, from the filament spool to the month’s profit. Sign-up is open and it is free during the beta. The interface is in Portuguese.

Technical decisions

The same margin on every channel

Adding the channel’s fee to the Pix price looks right and goes wrong, because the commission also applies to the increase. A piece that costs R$ 6.12 sells for R$ 8.75 through Pix, at a 30% margin. If I added 20% plus R$ 4 to sell it on Shopee, the price would go to R$ 14.50 and the real margin would drop to 10%.

The system runs the calculation backwards and looks for the lowest price that still leaves the margin after fees: (cost + fixed fee) ÷ (1 − commission − margin). For the same piece, with the default fees, that gives R$ 20.24 on Shopee and R$ 21.76 on Mercado Livre, and profit is 30% of the price on both. Since fees change by price range, the calculation also checks which range the price landed in.

The calculator on Tablado’s home page, in Portuguese: the price of the same piece on each sales channel

The fees are editable, and that has a limit: Mercado Livre’s fee below R$ 79 depends on weight and size, and the system uses an estimated fixed value. That is why the order separately stores the amount that actually reached the account, and profit then uses that number.

The order freezes the cost on the day of the sale

In the first version of the product photo, an order always showed the current one. While testing, I edited a product’s weight and the profit of an old order changed with it. So the rule came to cover everything: the order keeps the name, photo, grams and cost as they were at the sale, and changing the product later does not change the past.

The suggested price goes the opposite way and never reaches the database: it is calculated on the spot, with today’s costs. Only the price the shop owner types is stored, because that one is their decision.

Sales profit and cash result are never added together

The first idea was a single calculation: what came in, minus costs, minus expenses. It subtracts the filament twice, once in the cost of the piece sold and again when the spool was bought.

Today the monthly summary shows two separate numbers. Sales profit says whether the pieces make money; the cash result says whether there was money left. In a month when the shop buys a lot of filament, the second can be negative while the first is positive, and both are right. It is harder to explain than a single number.

Losses come from the slicer file

The product form reads the .gcode.3mf that Bambu Studio exports and fills in time, grams per filament and the photo. It also keeps the filament use curve by layer. When a print fails halfway, the shop owner enters the layer or the percentage, and the system knows how much filament was gone by then, instead of assuming use is proportional.

The price is depending on a single format: files from other slicers are still typed in by hand.

A store filter in every query, and a test for when someone forgets

In the ERP, isolation between customers is a global EF Core filter. Here I chose the opposite: each query explicitly filters by the session’s store, and no endpoint takes the store id from the caller. Before opening it to other shops, I reviewed all of them and wrote a set of integration tests that try to read, change, delete and reference another store’s data.

To find out whether the test was any good, I removed the filter from one controller on purpose, and it failed. The weak point is that a new endpoint has to be added to the test by hand. If their number grows a lot, the global filter comes back as a second layer.

Public pages ready at build time, without a Node server

The home page used to be assembled in the browser, so the HTML arrived empty for anything that does not run JavaScript, and a made-up address answered 200. Rendering on each visit would solve it, but it would put Node in production for the sake of two pages that hardly change.

ng build generates the HTML for those two, and .NET still serves only files, in one container. For a 404 to be a real 404, the backend checks the address against the app’s list of routes, and a test makes sure the list has not fallen behind.

In production

Tablado runs on an AWS Lightsail instance, with the application and PostgreSQL in containers behind Caddy. It is the same machine I had set up for the ERP, which was taken down. Each merge to main with passing tests publishes an image, and the deploy is a button in GitHub Actions: it backs up the database, brings up the new version, checks its health and rolls back if something fails.

It is a single machine, and I prefer it that way for now. The signs that it is time to leave are already written down in the documentation, along with the next step for each.

  • .NET
  • Angular
  • PostgreSQL
  • Docker
  • AWS
  • GitHub Actions