AI-powered property exchange matching platform that finds opportunities traditional brokers miss. Built with Next.js, Supabase, and intelligent matching algorithms.
This platform solves the 1031 exchange matching problem through AI-powered bidirectional inventory generation. Every property submission creates BOTH supply (what they're selling) and demand (what they're buying), populating the marketplace from both sides simultaneously.
- Conversational 7-step questionnaire captures everything needed:
- Current property details (type, location, value, debt, NOI, expenses)
- Tax basis information (original purchase price, depreciation taken)
- Replacement property criteria (desired types, locations, financial constraints)
- Exchange goals (stability, expansion, cash flow, appreciation, management burden)
- Timeline urgency (flexible, moderate, urgent)
- Zero jargon - all translation built-in
- 5-minute completion time
- Natural language β structured exchange profile
Multi-dimensional fit scoring that discovers non-obvious opportunities:
What AI Finds That Humans Miss:
- Cross-asset-class swaps: Apartments β Industrial, Retail β NNN
- Geographic arbitrage: High-cost markets β tax-advantaged states
- Debt structure optimization: Expensive loans β assumable low-rate financing
- Timing synergies: Multi-party exchanges where deadlines align perfectly
- Boot deployment combos: Replacement property + performing note acquisition
Scoring Algorithm:
- Equity match (30% weight): Minimizes boot to manage
- Cash flow improvement (25% weight): NOI comparison and cap rate delta
- Goal alignment (35% weight): Matches stated objectives (stability, expansion, etc.)
- Timing compatibility (10% weight): Can the deal close in required timeframe?
Result: 3-7 instant matches with fit scores (0-100) and full reasoning.
System automatically creates multiple offer structures for each match:
Offer Types:
- Cash-Heavy Fast Close: 30% down, 21-day close, minimal contingencies
- Debt-Replace Exact: Matches debt precisely to eliminate boot entirely
- Seller-Carry Enhanced Net: Premium price + seller financing = higher total net through interest income
- Value Arbitrage: Buyer pays premium for operational upside they can capture
Each Offer Includes:
- Full financial breakdown (price, down payment, financing, seller carry)
- Net to seller calculation (after loan payoff and closing costs)
- Boot amount (cash boot + debt boot)
- Tax impact estimation (capital gains, depreciation recapture)
- AI-generated reasoning (why this structure makes sense)
- Interactive terms (adjust price, close days, financing in real-time)
This is critical: All valuations use the income approach, not comps.
Formula: Value = NOI / Cap Rate
Why this matters:
- No arguments about Zillow estimates or comparable sales
- Pure math based on cash flow generation
- Low expenses become a SELLING POINT (operational upside for buyer)
- High NOI commands premium automatically
- Eliminates emotional pricing
Comprehensive schema supporting full transaction lifecycle:
- Properties: Relinquished properties (what owners are selling)
- Replacement Criteria: What owners want to buy (creates demand pool)
- Matches: AI-generated property pairings with fit scores
- Offers: Auto-generated offer structures with interactive terms
- Deals: Active exchanges in progress
- Deal Milestones: Checklist tracking (45/180 day deadlines)
- Documents: Auto-generated filings (45-day notices, Form 8824, LOIs)
- Boot Strategies: AI-recommended capital deployment paths
- Row-Level Security (RLS): Multi-tenant data protection
- Computed columns: Equity, annual NOI, adjusted basis calculated automatically
- JSONB fields: Flexible storage for match reasoning, offer terms, strategy details
- Timeline enforcement: 45/180 day deadlines baked into schema with generated columns
Every questionnaire submission creates:
- Supply: Their relinquished property β matched against others' replacement criteria
- Demand: Their replacement criteria β matched against others' relinquished properties
Result: With just 10 submissions, you have 10 properties FOR SALE and 10 sets of BUYER CRITERIA in the system. This solves the cold start problem.
Scenario 1: Geographic Arbitrage
- Owner has: Fresno 12-plex, $800K, 5.2% cap, high management burden
- AI finds: Boise duplex, $820K, 6.8% cap, NNN lease (tenants pay everything)
- Human broker never suggests (different state, different door count)
- AI sees: Equity match + goal alignment (owner wanted "less hassle") + superior yield
Scenario 2: Debt Optimization
- Owner has: Visalia 6-plex, $650K, $200K debt at 7.5%
- AI finds: Clovis 4-plex, $680K, assumable FHA loan at 3.2%
- Human focuses on door count mismatch
- AI sees: $900/month cash flow improvement from interest savings alone
Scenario 3: Boot Deployment
- Owner selling $1.5M property, buying $1.3M replacement β $200K boot
- AI finds: Performing note at 9% yield from another exchange participant
- Boot deployed into income-generating asset instead of sitting idle or paying taxes
- Next.js 15 (App Router)
- TypeScript (full type safety)
- Tailwind CSS (utility-first styling)
- Framer Motion (smooth animations)
- Next.js API Routes (serverless functions)
- Supabase (PostgreSQL database with real-time subscriptions)
- Server Actions (form submissions)
- Custom TypeScript matching engine (multi-dimensional fit scoring)
- Income-based valuation algorithms
- Boot calculation logic
- Tax impact estimation
- Claude API (natural language offer generation and boot strategy recommendations)
- Vapi Web SDK (voice intake capability)
- DocuSign/HelloSign (eSignature for documents)
- Major QI APIs (IPX1031, Asset Preservation, Accruit)
- Node.js 18+ and npm
- Supabase account (free tier works fine)
- Clone the repository
git clone https://github.com/gfranklin85/1031Exchange.git
cd 1031Exchange- Install dependencies
npm install- Set up Supabase
Create a new Supabase project at https://supabase.com
Run the schema SQL:
# Copy the SQL from lib/supabase/schema.sql
# Paste into Supabase SQL Editor
# Execute to create all tables, indexes, RLS policies, and functions- Configure environment variables
cp .env.example .envEdit .env with your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Optional (for future features)
ANTHROPIC_API_KEY=your_anthropic_api_key
NEXT_PUBLIC_VAPI_PUBLIC_KEY=your_vapi_public_key
VAPI_PRIVATE_KEY=your_vapi_private_key- Run the development server
npm run dev-
Visit
/intake- Start the 5-minute questionnaire -
Answer 7 steps:
- Property type (multifamily, retail, industrial, office, NNN, mixed-use)
- Location (address, city, state)
- Financials (value, debt, NOI, expenses, door count)
- Tax basis (optional but recommended for accurate tax impact)
- Replacement criteria (what you'd trade FOR)
- Goals (stability, expansion, cash flow, appreciation, management)
- Review and consent to list on exchange
-
Submit - AI instantly analyzes and generates matches
-
View matches - See 3-7 potential swaps with fit scores and financial breakdowns
-
Generate offers - Click to receive automated offer structures
-
Review offers - Interactive terms let you adjust price, close timeline, seller financing
-
Accept/counter - Negotiate in-platform or take offline to close
- Property created in database with full financial profile
- Replacement criteria saved creating demand in the marketplace
- AI matching runs across all available properties (forward and reverse)
- Matches saved with fit scores and reasoning
- Offers auto-generated when user clicks "Generate Offers"
- Email notifications sent to property owners when new matches appear
Since this is a marketplace (requires multiple participants), you can test with seed data:
- Create seed properties (add to Supabase directly or via API):
-- Example: Create some test properties
INSERT INTO profiles (id, email) VALUES
('550e8400-e29b-41d4-a716-446655440000', 'test1@example.com'),
('550e8400-e29b-41d4-a716-446655440001', 'test2@example.com');
INSERT INTO properties (owner_id, property_type, address, city, state, estimated_value, current_debt, monthly_noi, annual_expenses, listed_on_exchange) VALUES
('550e8400-e29b-41d4-a716-446655440000', 'multifamily', '123 Main St', 'Fresno', 'CA', 1700000, 420000, 8500, 48000, true),
('550e8400-e29b-41d4-a716-446655440001', 'industrial', '456 Oak Ave', 'Boise', 'ID', 820000, 200000, 5500, 22000, true);- Submit intake form - Will find matches against seed properties
- Generate offers - Will create offer structures based on financial profiles
1031Exchange/
βββ app/
β βββ api/
β β βββ intake/submit/ # Property submission endpoint
β β βββ matches/[propertyId]/ # Fetch matches for a property
β β βββ offers/generate/ # Auto-generate offer structures
β β βββ properties/[id]/ # Fetch single property
β βββ intake/ # Questionnaire page
β βββ matches/[propertyId]/ # Match results display
β βββ layout.tsx # Root layout
β βββ page.tsx # Landing page
β βββ globals.css # Global styles
βββ components/
β βββ intake/
β βββ PlaygroundIntake.tsx # 7-step questionnaire component
βββ lib/
β βββ ai/
β β βββ matching-engine.ts # Multi-dimensional fit scoring
β β βββ offer-generator.ts # Automated offer creation
β βββ supabase/
β β βββ client.ts # Supabase client setup
β β βββ middleware.ts # Auth middleware
β β βββ schema.sql # Database schema
β βββ types/
β βββ database.types.ts # TypeScript types
βββ .env.example # Environment variables template
βββ package.json # Dependencies
βββ tailwind.config.ts # Tailwind configuration
βββ tsconfig.json # TypeScript configuration
- Income-First Valuation: All property values calculated from NOI and cap rates, not comps
- AI Finds Non-Obvious: System discovers matches humans would never suggest
- Bidirectional Inventory: Every submission creates supply AND demand simultaneously
- Instant Gratification: Matches appear in seconds, not days/weeks
- Interactive Terms: Adjust offers in real-time to see financial impact
- Tax Transparency: Boot calculations and tax impact shown upfront
- Zero Jargon: Complex 1031 rules translated into plain English
- Exchange Board: Live NYSE-style interface showing active demand
- Deal Rooms: Transaction workspaces with 45/180 day countdown timers
- Boot Strategy Calculator: AI-recommended deployment paths (performing notes, DST, cost seg, improvements)
- Document Generation: Auto-create 45-day identification notices, Form 8824 data, LOIs, exchange agreements
- QI Integration: Connect to qualified intermediaries for fund transfers
- Payment Processing: Stripe for success fees (1-2% per side)
- Voice Intake: Vapi integration for conversational questionnaire
- Mobile App: Native iOS/Android for on-the-go deal tracking
Traditional model: List property, wait for buyers Our model: Every submission creates listing AND buyer profile simultaneously
Traditional: Broker searches MLS for "similar" properties Our AI: Finds cross-asset-class swaps, geographic arbitrage, debt optimizations, timing synergies
Traditional: Wait days for buyer to submit offer Our system: 3-5 complete offer structures generated instantly with interactive terms
Traditional: Arguments about comps and appraisals Our approach: Pure math (NOI / Cap Rate = Value), no negotiation about methodology
Traditional: Boot is tax liability to minimize Our approach: Boot = capital to deploy strategically (performing notes, value-add, expansion)
Success Fee Structure:
- 1-2% per side on closed exchanges
- No subscription fees until proof of concept
- Volume pricing for repeat users
Why This Works:
- Only pay on successful close (aligned incentives)
- Significantly cheaper than traditional broker commissions (4-6%)
- Platform provides value humans can't deliver (AI matching, instant offers, boot optimization)
- Row-Level Security (RLS): Users can only access their own properties and deals
- Anonymous Listings: Properties visible but owner identity protected until mutual interest
- Encrypted Data: All sensitive information encrypted at rest and in transit
- Audit Trail: Activity log tracks all actions for compliance
Built with Claude Code - AI-powered development assistant that helped architect and implement this platform.
Ready to revolutionize 1031 exchanges? Start with npm run dev and submit your first property at /intake.