// case study

POS Invoice Manager

A point-of-sale and invoicing app that the staff of Buffet Lucia’s Fiesta Mexicana, a Bronx catering business, use every day for orders, invoices, card payments, and customer texts.

No login needed: press “Try the demo” on the sign-in screen (sample data only).

Client
Buffet Lucia’s Fiesta Mexicana, a catering business in the Bronx
My role
Solo: UI/UX, front end, serverless back end, payments, SMS, security, tests, and CI
Status
In production since August 2025
Stack
React, Vite, React Router, JavaScript, Tailwind, Node.js serverless functions, Stripe, Twilio, SheetDB, Vitest, GitHub Actions, Vercel
Order form for a sample café in demo mode
Order form (demo data)

The problem

Staff needed one place to take delivery, pick-up, and catering orders with deposits and due dates, print invoices, take card payments at the counter or against an invoice balance, and text specials to customers who signed up.

It handles real money and real phone numbers, so payment amounts, secrets, and who gets texted all had to be controlled on the server, not in the browser.

What I built

  • Orders: one form for delivery, pick-up, and catering, with deposits, due dates, and notes. A half-typed order survives a reload or an expired login.
  • Search: find orders by phone, name, address, date, month, or year.
  • Invoices: printable one-page invoices that subtract the deposit and earlier card payments, plus a signed read-only link for the customer.
  • Card payments: Stripe PaymentIntents and Elements, with a tap-to-add menu for walk-up sales.
  • Text specials: a Twilio broadcast to customers who opted in on the restaurant’s website, with the live subscriber count.
  • Daily-use details: installable on a phone or tablet, pages that load on demand, six themes, and AA text contrast.

Key engineering decisions

The server decides what the customer pays

The browser never sets the final amount. The server re-reads the card’s funding type from Stripe, adds the card fee only for credit cards (capped at 3%, never on debit), and computes the total itself, so a tampered request or a false “debit” claim is ignored.

A narrow API instead of a proxy

The browser only calls the app’s own /api routes. The spreadsheet endpoint accepts a short list of named actions, such as reading orders or creating one, so the browser can’t choose database paths, and updates and deletes aren’t exposed at all. The SheetDB, Stripe, and Twilio credentials exist only as server environment variables.

CI that blocks leaked secrets

Every push builds the app with placeholder keys, then scans the built browser bundle. The run fails if anything that looks like a Stripe secret, SheetDB URL, Twilio ID, Google Sheet link, or server variable name appears in it. It also runs npm audit at the high level.

Texts only to people who opted in

Recipients come only from sign-ups recorded by the website’s consent form. Rows typed into the sheet by hand are rejected, unsubscribed numbers are skipped, and every message names the business and says “Reply STOP to unsubscribe.” Sending needs a staff login and a confirmation of the recipient count.

Built for a busy counter

Buttons lock while a request runs, so a double tap can’t create two orders or two charges. An order only shows as saved after the sheet confirms it, and errors are written in plain language: offline, expired login, or server problem.

A demo with no server access

Demo mode runs entirely in the browser on a made-up café’s data in localStorage. A unit test fails if demo mode ever calls fetch, and every real API route still requires a staff session.

Screens

Testing and shipping

  • Vitest tests with every network call mocked: the card-fee math (cap, rounding, $0 and large amounts), invoice totals with deposits, password and session checks, tampered invoice links, and that every staff API route returns 401 without a session.
  • GitHub Actions runs lint, tests, the build, the bundle secret scan, and a dependency audit on every push and pull request. Deploys happen on Vercel, so CI never holds a real secret.
  • Security headers include a strict Content-Security-Policy and block framing.

Use it for your business

The POS Invoice Manager is available to other restaurants and small businesses. Email me to set it up for yours.

Email me about the POS
  • React
  • Vite
  • JavaScript
  • Tailwind
  • Node.js serverless
  • Stripe
  • Twilio
  • SheetDB
  • Vitest
  • GitHub Actions

Next: Auto Shop Invoicing CRM

Invoicing and customer CRM used every day by a real NYC auto repair shop.