Showcase: Building an Enterprise Full-Stack App with Apps Script, Antigravity Framework & Supabase

Hi everyone,

I’d like to share an architectural approach I implemented to build an Enterprise SaaS WMS/ERP (NexStock).

I love the serverless nature of Google Apps Script (GAS), but I hit the classic bottleneck when building scalable tools: relying on Google Sheets as a relational database.

Standard GAS connected to Sheets struggles with high concurrency and complex relational data. To solve this, I decoupled the system. I kept GAS as the core serverless engine but completely overhauled the routing and data persistence using the Antigravity framework and Supabase.

How it works under the hood:

  • SPA Routing & MVC: The frontend is a SPA built on Antigravity’s MVC pattern. Views communicate with controllers via RPC (google.script.run), keeping business rules securely on the V8 engine.

  • Supabase (Data Layer): I built a client using UrlFetchApp to talk to Supabase’s PostgREST. This allowed for robust relational mapping (Batches vs. Products) and native Row Level Security (RLS) in PostgreSQL for Multi-Tenant isolation.

  • Concurrency & Auditing: To prevent race conditions (two users modifying the same batch), I implemented GAS’s LockService as an atomic transaction Mutex. Additionally, every action generates an immutable audit log (old vs. new value).

  • Supply Radar: I decoupled the catalog from the expiration logic (FIFO). A V8 in-memory algorithm cross-references physical stock, in-transit orders, and repressed demands, automatically suggesting replenishments based on the ABC curve.

The result is a system with blazing-fast memory processing, Enterprise-grade security (RBAC, SHA-256), and near-zero infrastructure cost.

I’ve attached a routing architecture diagram below. I would love to hear the community’s thoughts or answer any questions!

Some application screens:

That is very cool. Using Supabase as the data layer was something I handn’t considered.