back to projects
AVG Sistemas2025End-to-end architecture & development

Customs SaaS Platform

A modern web platform for customs brokers, built on top of a 20-year-old local database — without touching it.

15 min → 2s

régime change

30 min → 10s

bulk data entry

1 hour → mins

Excel imports

The context

In Argentina, every customs broker works on top of an official customs system that runs locally on their PC — a SQL Server 2012 database, which stores all the data related to customs declarations. Any modern software for brokers needs to sit in front of this local database, feeding it and reading from it.

AVG Sistemas has spent three decades building this kind of "pre-declaration" software for customs brokers. Their core product was a mature desktop application built in Visual Basic 6, installed on each broker's PC, and used every day to prepare operations before they get submitted to ARCA.

The system worked. But it was showing its age:

  • Impossible to access from any other office or device.
  • No centralized backups.
  • A UX frozen in the early 2000s.
  • Every new operator required an installation, a license, and manual configuration.
  • The market was moving to web-based solutions.

Rewriting the whole system from scratch wasn't realistic. Two decades of business logic, consolidated workflows, and a customer base that trusted the desktop product meant that any migration had to happen without breaking anything.

The core constraint

The customs database lives locally, on each broker's PC, and it can't be moved or exposed to the internet — it's an operational and security requirement. Any web platform serving brokers has to somehow reach that local data from the cloud, without the broker changing their infrastructure or opening firewall ports.

This is the constraint that shapes the entire architecture.

The solution: a hybrid architecture

I designed and built a hybrid platform that keeps the local system fully intact while exposing its data through a modern web application.

Here's how it works:

  • A lightweight Windows agent runs as a service on each broker's PC.
  • The agent opens an encrypted, persistent WebSocket connection to the cloud backend — outbound only, no ports to open, no database exposed.
  • When a user opens the web app from any device, requests are routed through the backend to the corresponding agent, which translates them into local SQL queries against the local database.
  • The response travels back the same way, in real time.

Result: full remote access to the broker's local data without opening a single firewall port and without exposing the database to the outside world. The broker's IT infrastructure stays exactly as it was.

Measurable impact

Régime type change: 15 minutes to 2 seconds

Changing the régime type of a customs declaration (IC04 ↔ IC05) used to be done by hand, modifying multiple sections one by one, with a real risk of leaving data inconsistent. Typical time: 15 to 30 minutes per operation.

The new platform does it in a single click, ~2 seconds, wrapped in an atomic SQL transaction with automatic rollback on any failure. Brokers can now make these changes with confidence, not caution.

Bulk data entry: 30 minutes to 10 seconds

In the desktop system, brokers had to load data item by item, manually. For a large operation with 100 items × 3 attributes, that's 300 manual actions — typically 20 to 30 minutes per operation.

The new platform lets the user apply the same values to all selected items in a single modal, in around 10 seconds.

Excel imports: an hour to a few minutes

Auto-liquidations used to be typed in line by line — around an hour per operation. The platform now imports them directly from Excel files (both .xls and .xlsx natively), with validation and preview before committing.

Zero-downtime modernization

The desktop system keeps running exactly as before. The web platform sits on top as a modern layer — no data touched, no staff retraining required. Brokers who prefer the desktop app can keep using it. Brokers who want cloud access get it. Both hit the same local database.

Multi-tenant, multi-terminal by design

A customs firm can have N terminals with role-based access (broker / operator) from a single connection pool, controlled by their subscription plan. Adding a new operator no longer requires a technician on-site.

How the pieces fit together

The platform runs on three layers:

  • Cloud backend: .NET 10 with ASP.NET Core Razor Pages, PostgreSQL for platform-level data (users, subscriptions, sessions), running on a Linux VPS behind Nginx with automatic HTTPS.
  • Windows agent: a service installed on each broker's PC with a proper Inno Setup installer. Handles the encrypted WebSocket connection and executes local SQL queries safely.
  • Web frontend: intentionally built with vanilla JavaScript — no framework overhead. Fast to load, easy to maintain, and stable over time.

Deployment is fully containerized: the backend runs in Docker, the agent installer is one file, and onboarding a new broker takes minutes instead of days.

What this project demonstrates

  • Modernization without invasion: bringing a 20-year-old workflow into the cloud era without touching its core.
  • Security-first architecture: no exposed databases, no open ports, encrypted transport by default.
  • Full-stack ownership: from the low-level Windows service to the SaaS billing integration.
  • Business model transformation: turning a one-time license desktop product into a subscription-based multi-tenant SaaS — without rewriting the engine.
  • Concrete productivity impact: operations that took brokers 15-60 minutes now take seconds, without changing the trusted data layer they've relied on for two decades.

The platform is currently in active deployment, with MercadoPago integration for recurring subscriptions rolling out next.

// full stack

.NET 10ASP.NET Core Razor PagesPostgreSQLSQL Server 2012 (legacy)Microsoft.Data.SqlClientEntity Framework CoreWebSocketsWindows ServiceBCryptJavaScript (vanilla)NginxLet's EncryptDockerUbuntu 24.04Inno SetupMercadoPago

Have a legacy system to modernize?

If any of this sounds familiar to what you're going through, let's talk.

Get in touch ▸