SaaSAIPropTech

ArgoFetch // Databode · Bodey AI assistant

Streaming AI property intelligence grounded in live Supabase queries

Next.js 16Supabase + pgvectorOpenAI GPT-4oVercel AI SDKStripe billingGoogle Maps API
CRSF / 007Coralsoft Showcase
7
Pipeline stages per Bodey request, from auth to post-stream accounting
5
Zod-typed tools live-querying Supabase during a single streaming response
2
Linked Next.js apps sharing one Supabase instance — platform + operator dashboard
01 — The brief

ArgoFetch is a production real-estate intelligence platform built for the Sunshine Coast property market under the Databode brand. The platform serves real-estate agents and investors who need fast, reliable answers about local sales, listing volumes, price trends, and time-on-market data. The product's core is Bodey — an AI assistant that answers natural-language questions about property data using a live Supabase database, not pre-computed summaries.

Bodey is sold as a SaaS product with tiered subscription plans, usage quotas, and an operator-facing admin panel. The system had to resolve natural-language timeframes precisely, enforce strict data attribution, and handle complex multi-tool queries in a single streaming response — all on top of complete SaaS infrastructure: tiered billing, per-user monthly quotas, a configurable operator admin, an interactive property map, and a module system that lets the operator change behaviour without code changes.

02 — What we built

The product surface

Coralsoft built ArgoFetch as two linked Next.js 16 applications — the customer-facing platform and the ArgoFetch operator dashboard — sharing a single Supabase instance. The Bodey chat endpoint runs on Edge runtime for zero-buffering streaming; all other API routes run on Node.js. Every Bodey request travels through a seven-stage pipeline — auth & quota validation, chat session resolution, dynamic system-prompt assembly from Supabase, tool registry, real-time tool execution, post-stream cleanup, and usage accounting.

01

Bodey AI assistant

Streaming chat over OpenAI GPT-4o via the Vercel AI SDK, with five Zod-typed tools running live Supabase queries mid-response — enabling chained reasoning and multi-step analysis without leaving the stream.

02

Five-tool data registry

analyzeSales, analyzeListings, analyzeMatchedListings, buildChartSpec, and getDataSourceInfo — each a typed contract over the live property dataset, with a timeframe resolver mapping phrases like "last financial year" or "Q3 2023" into structured ranges.

03

Inline chart generation

buildChartSpec returns Recharts-compatible visualisation specs that render inline after the response completes — so chart metadata is extracted from the stream and hydrated client-side without a second roundtrip.

04

Interactive property map

Google Maps API integration with property pins, suburb overlays, and a configurable analytics module system — operators can drag, drop and reconfigure dashboard layouts without redeployment.

05

Stripe billing + quotas

Tiered subscription plans with per-user monthly prompt quotas enforced at the auth stage of every Bodey request — immediate rejection if exhausted, no wasted tokens.

06

Operator admin dashboard

A standalone Next.js 16 app sharing the same Supabase instance — AI instructions, pricing tiers, data imports, module layouts and attribution rules are all editable from the admin UI without code changes.

03 — Architecture and stack

Decisions, not just dependencies.

Two Next.js 16 applications share a single Supabase Postgres instance — the customer platform and the operator dashboard — communicating through Supabase Auth with SSR cookies and Bearer-token API access. The Bodey chat endpoint runs on Edge runtime to keep streaming latency near zero; every other Route Handler runs on Node.js, where the seven-stage pipeline (auth, session, prompt assembly, tool registry, tool execution, post-stream cleanup, accounting) lives.

The AI behaviour itself is database-driven: system prompts, attribution rules, formatting logic, and module layouts are assembled from Supabase at request time, so operators can change Bodey's behaviour without a deploy. Tool calls execute live SQL against Postgres during the stream — no pre-aggregated tables, no caching layer between question and answer beyond an in-process TTL cache for hot read paths.

04 — Delivery highlights

What was hard, and how we shipped it.

  1. 01

    Seven-stage streaming AI pipeline

    Auth & quota validation, chat session resolution, dynamic system-prompt assembly from Supabase, tool registry + model invocation, real-time tool execution against live SQL, and post-stream cleanup (chart metadata extraction, title generation, usage accounting) — all running through one streaming response on Edge runtime.

  2. 02

    Live tool-call data retrieval, not pre-aggregation

    Five Zod-typed tools execute live Supabase queries mid-stream — analyzeSales, analyzeListings, analyzeMatchedListings, buildChartSpec, getDataSourceInfo — enabling chained reasoning across the property dataset without ever falling back to a precomputed summary.

  3. 03

    Operator-driven behaviour, no redeploys

    Every operational layer — AI instructions, pricing tiers, data imports, module layouts, attribution rules — is editable through the operator admin dashboard. New behaviour ships without a deploy and without a developer in the loop.

  4. 04

    Dual-app architecture on one Supabase

    Customer platform and operator dashboard ship as two independent Next.js 16 apps but share a single Postgres database with Row-Level Security per app surface — no duplicated schema, no cross-service drift, no auth bypass.

  5. 05

    Inline chart generation from the AI response

    buildChartSpec returns Recharts-compatible visualisation specs as part of the streaming tool-call output. Charts render inline once the stream completes — no second round-trip, no separate analytics endpoint.

Looking at a project that sits at this kind of seam?

Bring us the architecture, the constraints, and the ship date. We will bring the rest.