All work

ESGO PROVEEDORES / CASE STUDY

A customer portal for my family’s distributor, designed and built end to end

ESGO supplies cleaning products and foodservice disposables to businesses in Monterrey. Orders used to arrive by WhatsApp and be typed again into the ERP. I built the portal where customers now order at their own negotiated prices, and the tools the team uses behind it.

ROLE
Sole builder: product, data, design and launch
BUILT WITH
Claude Code and Codex
STACK
Next.js, Supabase, Python
STATUS
In production since 2026
45screens across the portal, staff admin and public site
56API endpoints behind them
294commits since August 2026
768products, each with a price per customer

01 / THE PRODUCT

Walk through the portal

portal.esgoproveedores.com
ESGO portal, demo account: Sign inESGO portal, demo account: Start from the last orderESGO portal, demo account: Search 768 productsESGO portal, demo account: A product at their priceESGO portal, demo account: Build the orderESGO portal, demo account: Confirm, date and repeatESGO portal, demo account: Every past orderESGO portal, demo account: Invoices and balanceESGO portal, demo account: Many properties, one view

BEHIND IT

ESGO portal, demo account: Sign in
Sign in. Each business signs in with its client code and a PIN. A personal link fills in the code, but the PIN is always typed, so a forwarded link opens nothing.
ESGO portal, demo account: Start from the last order
Start from the last order. The home screen offers to repeat the last purchase and shows a monthly basket built from what this business really buys.
ESGO portal, demo account: Search 768 products
Search 768 products. Search ignores accents and plurals, understands brand names and puts what this customer buys most at the top.
ESGO portal, demo account: A product at their price
A product at their price. Presentation, use and precautions for each product, shown at the price this business negotiated.
ESGO portal, demo account: Build the order
Build the order. Quantities, a running total and suggestions of what similar businesses order. Nothing is sent yet.
ESGO portal, demo account: Confirm, date and repeat
Confirm, date and repeat. One last review: delivery date, whether to repeat it weekly, every two weeks or monthly, and notes for the driver.
ESGO portal, demo account: Every past order
Every past order. All purchases in one list, including the ones placed by WhatsApp before the portal existed, each one ready to repeat.
ESGO portal, demo account: Invoices and balance
Invoices and balance. Balance due, overdue invoices, due dates, PDF and XML downloads and the bank details to pay.
ESGO portal, demo account: Many properties, one view
Many properties, one view. Property managers see spending and balances for each condominium tower and download a report for the residents’ assembly.
Their price, plus VAT
Their price, plus VATEach product shows the price this business negotiated, with VAT spelled out.
A monthly basket
A monthly basketWhat they order most, with the usual quantity, one tap from a new order.
Balance at a glance
Balance at a glancePending invoices and the total due, linked to the list of what is overdue.
Spending across towers
Spending across towersThe monthly average for every property a manager runs, from real invoices.

02 / THE SYSTEM

How the pieces connect

FOLLOW ONE ORDERFrom price list to paid invoice

Sources

Master price ExcelAgreements, then lists 1, 2 and 3
MasAdmin ERPThe live system the team works in. Read through reports only
Billing mailboxEvery invoice arrives as CFDI XML

Data

Python import scriptsClean, deduplicate and match recordspandas · 47 scripts
Supabase · PostgreSQLRow-level security: each account only ever reads its own rowssingle source for every screen

App

Next.js on VercelA push to main deploys to productionTypeScript · 56 API endpoints
Customer portalCatalog, orders, invoices, properties
Staff adminOrders, prices, promos, access log
Public site and lead CRMSector pages, quote forms, lead sources

People

Business customersCondominiums, offices, plants, schools
ESGO teamOrder desk and billing
New businessesArriving from Google and Meta ads

03 / THE TEAM’S SIDE

Tools for the people behind the counter

/admin/pedidos

Orders inbox

Review, edit and confirm each order, then export it as a CSV the ERP imports.

/admin/precios

Prices and promos

Load price lists and create promos for everyone or chosen customers; each discount is frozen on its order.

/admin/accesos

Access log

Who signed in, on what kind of device, and who opened their personal link. Visits from ESGO devices don’t count.

/crm

Lead CRM

One record per person, the ad platform that brought them and the cost per contact.

/admin/radar

Customers cooling off

Flags businesses that stopped ordering or order less than usual, early enough to call them.

/admin/sprint

Monthly dashboard

Invoiced sales, active customers, portal orders and acquisition cost, month by month.

04 / HOW I BUILT IT

Business rules first, AI as the engineering tool

I decide what should exist and why. Claude Code and Codex write it.

  1. Write the rule in plain words

    Usually in Spanish, with the business reason: who it applies to and what must never happen.

  2. Claude Code turns it into code and tests

    Business rules live as small functions with their own tests, apart from screens and database.

  3. Check it against reality

    Compare the result with the ERP’s reports and the database before trusting it.

  4. Push to deploy

    A push to main goes live on Vercel. A checker confirms the docs are current and no keys leaked.

  5. Write down why

    Each session ends by updating a status document and a dated log, so the next session starts informed.

The price comes from the agreed list

Never from what was invoiced before, which can carry old mistakes. Without a valid price the portal says “Quote”.

The ERP stays read-only

It is the live system the team works in every day. Data comes out through reports; orders go in only as a file a person imports.

A link that helps, not a key

Personal links fill in the client code, but the PIN is still typed, so a forwarded message cannot open an account.

Measure honestly

Sign-ins from ESGO’s own devices are excluded, and a sign-in is not counted as a visit.

WHAT COMES NEXT

Getting it into the routine

The portal works. The open question is adoption: these customers have ordered by WhatsApp for years. The work now is inviting them in small groups and measuring real orders and repeat use, not accounts created.

Next.js / TypeScriptSupabase / PostgreSQLPython / pandasVercelClaude Code / CodexGoogle and Meta Ads

Contact