TIM SCHROEDER
Work / Buyer & Seller Portals
Secure client platform

Buyer & Seller Portals

A private, invitation-only portal for Infinity Realty Group that gives each buyer and seller one place for their deal's dates, documents, checklists and trusted local resources, with an agent console behind it.

Private client platformJan–Jul 2026
Sanitized preview of two portal screens in demo mode: a Buyer Dashboard with next steps, days to closing and a transaction progress bar, overlapped by a Seller Dashboard with a seller toolkit and a sale-journey progress barSanitized preview · not real client data

The problem

Buyers and sellers ask the same questions on every deal: what happens next, when is the deadline, where is that document. The answers were spread across emails, texts and attachments.

Who it's for

The buyer and seller clients of one real estate brokerage, Infinity Realty Group, and the agent who runs their transactions.

Where AI is used

Claude Sonnet 4 sits in the agent console only. It summarises a transaction, checks for missing items and deadlines, and drafts emails. Clients never talk to the AI.

Built with

  • Next.js 16
  • React 19
  • Supabase Postgres
  • Row-level security
  • Supabase Auth
  • Claude Sonnet 4
  • Google Calendar
  • Vercel
01 · The problem

Every client asks what happens next

A home purchase or sale runs on a contract with a dozen dates: inspection, financing, appraisal, closing. Each client also needs the same local knowledge, from inspectors and insurance to schools, HOA documents and utilities.

Without one shared place, the agent repeats the same answers by phone and email, and clients lose track of documents and deadlines.

  • Clients chase the agent for status because they cannot see where the deal stands.
  • Contract deadlines live in the agent's head or calendar, not in front of the client.
  • Documents travel as email attachments, with no single private place to keep them.
  • Buyers and sellers need different guidance, but get the same generic emails.

Why custom software

Generic client portals and file-sharing tools do not know a purchase contract, its deadlines or the brokerage's own trusted providers. This portal is built around the transaction itself, so dates, checklists, documents and guidance all come from the same record.

02 · The solution

One private place per deal, for the client and the agent

The agent creates the transaction and invites the client. The client signs in and sees only their own deal: dates, documents, checklists and guidance for their side of the sale.

Separate buyer and seller portals

Buyers get contract, inspection, insurance, HOA, CDD fee, permit, school and tax-estimate pages. Sellers get listing intake, photo day, showing tips and a contract-to-closing guide.

Invitation-only access

There is no open sign-up. A visitor can request access, the request lands in the agent's prospect list, and one click sends a single-use activation link.

Key dates and calendar sync

Contract deadlines are calculated from the contract date and shown on the client dashboard. The agent can sync deadlines and closings to Google Calendar.

Private documents

Clients upload documents to their own transaction, and the agent is notified. Each download link is checked against ownership before it is issued.

AI

Agent console with AI assistant

The agent manages transactions, pre-contract clients, service providers, email templates and commissions. A Claude assistant on each transaction summarises it, checks for gaps and drafts emails.

Commission tracking

Each deal carries a commission percentage and optional referral fee, and pre-contract buyers count toward projected totals.

03 · My role

What I did. What the AI did.

I own the product and run it for the brokerage. Claude Code, an AI coding agent, wrote the code: 97 of the 101 commits carry its co-author trailer, and the other four are empty redeploy triggers.

Tim · human judgement

I owned

  • Set the concept and scope: one private portal per client, split by buyer and seller, with an agent console behind it.
  • Decided which guidance each side gets: inspections, insurance, schools, HOA and CDD fees for buyers; listing intake, photo day, showings and the closing journey for sellers.
  • Made the product calls: rename Sellers to Listings, call prospects Pre-Contract Clients, order the sidebar to follow the deal, and make the portal invitation-only.
  • Decided that clients never talk to the AI. The assistant stays inside the agent console.
  • Commissioned the July security review and had every finding checked against the live database before a fix counted.
  • Own the operating setup: hosting, the brokerage's sending domain, and the admin accounts.
Claude Code · AI implementation

AI did

  • Wrote the application: 47 pages, 20 API routes and the database access layer.
  • Wrote the SQL for tables, columns and access rules.
  • Refactored the codebase into a repository layer, server actions and central auth checks.
  • Ran the security review and wrote each finding with its root cause.
  • Drafted each fix and proved it with a check, such as a non-owner test account or an unauthenticated request.

I decide what the client sees and what must be true before it ships. The agent writes the code and the proof, and I review the result.

04 · How I built it with AI

From idea to production.

The git history runs from 30 Jan to 23 Jul 2026, across 10 working days. 81 of the 101 commits landed between 30 Jan and 5 Feb, with a security and access pass in July.

  1. 30 Jan 2026 · Foundation

    Portal base and a private site

    The first commit landed the admin console and the buyer and seller portals. The same day, search engines were blocked from indexing the private portal.

    commits a2147e4, 5bfe2b8
  2. 31 Jan – 1 Feb 2026 · Core features

    Documents, sign-in, email and prospects

    Clients got document upload with notifications and passwordless sign-in. The agent got editable email templates, commission tracking and a pre-contract client list.

    commits 11182d4, c748c72, 8522838, 899e238, 0e029dc
  3. 2 Feb 2026 · First audit

    Audit fixes and calendar sync

    An audit pass fixed a memory leak, added request validation and escaped user input in emails. Google Calendar sync and Getting Started tutorials for every portal followed.

    commits 3945fe6, 2032563, d239aed
  4. 3–5 Feb 2026 · Client content

    Buyer guidance pages and admin preview

    Home warranty, HOA document and CDD fee pages were added, inspections were split into two pages, and the agent can preview each portal as a client sees it.

    commits 3119348, ba2005f, 8a06f86, e2ca166
  5. 18 Feb 2026 · Architecture

    Repository layer and central auth

    Database access moved behind a single repository layer, mutations into server actions, and auth checks into shared helpers, with error boundaries on every portal.

    commit e8473b5
  6. 24 Feb 2026 · Commissions

    Commission detail and referral fees

    Commissions got a detail page, a referral fee field and projected totals that include pre-contract buyers. The admin sidebar was reorganised into Buyers and Listings.

    commits f8e8c1e, 31bd4a8, b9fdf3a, 91ce540
  7. 22–23 Jul 2026 · Access and security

    Invitation-only access and a security review

    Open sign-up was replaced with invite-and-request-access. A security review found and closed cross-tenant data access, an unauthenticated AI endpoint and unescaped email templates, and passwordless sign-in finally worked in production.

    commits 901c613, 7fcbec3, 6062260, 9613e2d, 5c59f28
05 · Technologies

What it runs on, and why.

Every item here is in the project's code or configuration. I chose and connected them; AI coding agents wrote the code that uses them.

AI models

Claude Sonnet 4
The agent's transaction assistant: summarise a deal, check missing items and deadlines, draft emails
Anthropic SDK
Calls Claude from the server only, with a fixed system prompt

App

Next.js 16 and React 19
The portals, the agent console, server actions and API routes
CSS modules
Component styles for the portal interface
react-pdf
Shows contract PDFs inside the portal
date-fns
Deadline and key-date calculations

Data

Supabase Postgres
Transactions, contacts, tasks and prospects, with row-level security
Supabase Auth
Invitation activation and passwordless sign-in
Supabase Storage
Private client documents

Services

Google Calendar API
Syncs deadlines and closings to the agent's calendar
Nodemailer
Invitations, access requests and notifications from the brokerage's own domain
Vercel
Hosting and deploys
06 · System architecture

How the pieces fit.

Clients and the agent use one Next.js app on Vercel. Every request goes through the server, which reads a Supabase database where each client can reach only their own deal.

Buyer & Seller Portals architectureClients and the agent use one Next.js app on Vercel. Every request goes through the server, which reads a Supabase database where each client can reach only their own deal.requestsrequestssessionassistantreads and writesnoticesdeadlinesClient portalsBuyers and sellersAgent consoleAdmin onlySign-inInvite + magic linkServer actions and APINext.js 16 on VercelClaudeSonnet 4 · admin onlySupabasePostgres · RLS · StorageEmailInvites and noticesGoogle CalendarDeadline sync
InterfaceApp / serverAI serviceData / storageExternal service
Technical detail for engineers
  • All database access goes through 16 repository modules in src/server/repositories, so queries live in one layer.
  • Core tables use owner-or-admin row-level security through two database helper functions. Document links are also checked in code, because file signing bypasses table rules.
  • Passwordless sign-in validates a single-use token, then creates the session on the server and sets real auth cookies.
  • The AI route requires an admin session, ignores any client-supplied system prompt and caps input size.
  • Email templates HTML-escape every substituted value, and outgoing email can be switched off entirely for testing.
07 · Challenges

Problems worth telling you about.

Real incidents from the project's history, each with how it was found, fixed and checked.

CHALLENGE 01

Clients could see more than their own deal

The July security review found that older, broad access rules on three core tables were wider than the owner-scoped ones. A signed-in client could read records that were not theirs.

VERIFIEDA test account that owns nothing now sees no other client's transactions or documents.
Why it was hard, what I decided, how AI helped
Why it was hard
Each rule looked fine on its own. Postgres combines permissive rules with OR, so one broad rule quietly overrode the careful ones. File downloads were a second gap, because signing a storage link does not check table rules.
My approach
I had the review check every finding against the live database, not just the code, before calling it real or fixed.
How AI helped
Claude Code wrote the SQL to drop the broad rules and add owner-or-admin rules through helper functions, and added an ownership check before any document link is signed or a document deleted.
The decision
Fix it in the database, where every path into the data is covered, and add the code check only where the database cannot help.
Evidence
commit 7fcbec3 · sql/add-core-rls-policies.sql · 23 Jul 2026
CHALLENGE 02

Passwordless sign-in that never worked in production

Clicking a sign-in link silently sent the user back to the login page. Passwordless sign-in had never worked on the live site.

VERIFIEDChecked locally: the verify route now returns a session cookie and sends each role to the right portal.
Why it was hard, what I decided, how AI helped
Why it was hard
Three faults were stacked. A server secret was missing from hosting, the token lookup read through a restricted client and used a wrong column name, and the verify step sent a second email instead of creating a session.
My approach
I had sign-in fixed end to end as part of the July access work, alongside the move to invitation-only.
How AI helped
Claude Code fixed the lookup and the column, then rebuilt the verify step to create the session on the server and set real auth cookies.
The decision
Create the session on the server. The app has no browser callback route, so a link that relies on one could never sign anyone in.
Evidence
commits c28dfa5, 5c59f28 · 23 Jul 2026
CHALLENGE 03

An AI endpoint anyone could call

The assistant's API route had no sign-in check and accepted instructions from the browser, so anyone could run requests on the brokerage's AI account.

VERIFIEDAn unauthenticated request to the route now returns 401 on production.
Why it was hard, what I decided, how AI helped
Why it was hard
The feature only appears in the agent console, so the route looked private. The page was protected, but the route behind it was not.
My approach
The July review I ran covered the API routes as well as the pages clients see.
How AI helped
Claude Code required an admin session, fixed the system prompt on the server, and capped input size. It also escaped every value in the email templates and added role checks to two sidebar data actions.
The decision
Keep AI out of the client portals entirely and lock the one AI route to the agent.
Evidence
commits 6062260, 9613e2d · 23 Jul 2026
08 · Results

What is true today.

The portal is in private use by Infinity Realty Group, open to invited clients only, and the July security findings above are closed.

101
commits, 30 Jan – 23 Jul 2026
Source: git log main, 2 Nov 2026
97 of 101
commits co-authored by Claude Code
Source: git log --grep 'Co-Authored-By: Claude', 2 Nov 2026
47
pages across the buyer, seller and agent areas
Source: page.tsx count in src/app
20
API routes
Source: route.ts count in src/app/api
16
repository modules in the data layer
Source: src/server/repositories file count
10
days with commits
Source: distinct commit dates, git log
  • Private and invitation-only: open sign-up is off, and new clients arrive through an invite or an approved access request.
  • Each client can reach only their own transaction and documents, checked with a test account that owns nothing.
  • The AI assistant is limited to the agent and returns 401 to anyone not signed in.
  • Passwordless sign-in works on the live site.
  • Search engines are told not to index the portal.
09 · Lessons

What this project taught me.

  1. Broad access rules win. In Postgres, one permissive rule ORs past every careful one, so review the whole set on a table, not each rule alone.
  2. A protected page does not protect its API. The AI route was reachable without sign-in even though only the agent's page called it.
  3. Check against the live system. The sign-in bug lived in hosting config and a wrong column, which reading the code alone did not reveal.
  4. There is no automated test suite in this repo, so each July fix was proven by a direct check on the running system. A test suite is the obvious next step.
10 · Demo

A private portal, shown with demo data.

The portal holds real client transactions, so there is no public demo or guided tour. The preview at the top of this page uses sanitized demo screens, not client data.

Let's talk about
what you need built.

Open to AI roles: full-time, contract or consulting. I build AI products, internal tools and automations with AI coding agents.