Select Page

Overview

In the fourth and final week of this challenge I bailed completely on working on AgentForm in favor of building a far more useful tool that I need myself right now. I’m in the market for a used SUV and I basically want something akin to Pinterest only for used vehicles. I want a simple way of tracking the listings of used vehicles across the various platforms and ideally I want this tool to be intelligent and act on my behalf to find good deals while I sleep.

Towards this end I built v1 of DreamCar.app – a utility that you can use with the three major listings sites in Portugal (StandVirtual, OLX and Facebook Marketplace). It has a chrome extension that allows you to easily save listings from those three sources and it will from those extract your preferences and then at the frequency you give it, re-check the sites for other similar listings matching your criteria and exceeding a deal score calculated as a function of being under fair market value and within proximity to your target search area.

You can try out the tool here. I built this entirely using Claude Code and it’s a NextJS app using the Mastra.ai framework, SQLite via Turso for the backend and deployed via the free plan on Vercel with Cloudflare handling the cron aspect for periodic automated searches.

Demo

I learned a ton in the process of building this tool mostly around how to work with Claude to make it more efficient and accurate. I’m keeping this repo private for now however you can see an earlier version of my /guidance folder here that has the gist of how I’m capturing and persisting tribal knowledge in projects like this one. Below is a quick demo of how this app works if you prefer to see it in action vs. trying it yourself:

This concludes the Micro-SaaS experiment. While I didn’t get one to revenue and profitability I’m fairly sure the DreamCar.app tool has commercial potential with more iteration and effort. In the meantime I’ve stubbed out a sample course that I’m considering creating which would distill all the key learnings of how to create a production app from scratch using Claude Code and teach the basics to fellow solo founders. Check out the course syllabus here and consider attending my talk on Aug 19th in Lisbon on the same topic.


Claude’s synthesis of all the session and feature retrospectives for the last 10 days

August 4, 2025 – A Comprehensive Analysis of Critical Development Learnings

Between July 26 and August 4, 2025, we accomplished something remarkable: we built a complete AI-powered car finder application from foundational testing infrastructure to intelligent vehicle discovery with real-time notifications. This synthesis captures the critical learnings, breakthrough moments, and technical epiphanies that emerged across 18 retrospectives and 4 major development sessions.

The Numbers Tell an Extraordinary Story

Development Velocity Metrics

  • 📊 Total Lines of Code: 74,164 lines added, 2,249 lines modified
  • 🤖 Total Token Usage: 293+ million tokens ($100 development cost)
  • ⏱️ Active Development Time: 62+ hours of focused engineering work
  • 📁 Files Modified: 400+ files across 75+ commits
  • 🚀 Features Shipped: 15 major features from testing infrastructure to AI agents

Human Programmer Hours Estimation

Based on the complexity and scope of work completed, this would have required approximately 180-220 hours of human programmer time, representing a 3x development velocity multiplier through AI-assisted development.

The Three Foundational Breakthroughs

1. Testing Infrastructure as Development Velocity Multiplier (July 26)

The most transformative decision was investing an entire day in comprehensive testing infrastructure before building core features.

What We Built:

  • Complete MSW (Mock Service Worker) implementation for realistic API testing
  • Multi-layer testing strategy: Unit (Vitest) → Integration (MSW) → E2E (Playwright) → Coverage
  • Production deployment safety with manual approval gates and automated backups
  • Per-file coverage thresholds with quality enforcement

The Epiphany: Strategic infrastructure investment creates exponential development velocity gains. Every feature built after July 26 was faster, safer, and higher quality because of this foundation.

Key Technical Pattern Discovered:

// MSW pattern that changed everything
http.post('*/api/vehicles/discover', async ({ request }) => {
  const requestBody = await request.json();
  // Test against reality, not assumptions
  const filtered = vehicles.filter(vehicle => 
    requestBody.criteria.makes?.includes(vehicle.make)
  );
  return HttpResponse.json({ success: true, data: { vehicles: filtered } });
});

2. Mastra Framework Integration Mastery (July 26-27)

Understanding Mastra.ai’s parameter patterns unlocked the entire AI framework.

The Breakthrough:

// Tools expect context destructuring
execute: async ({ context: { criteria, maxListings, useCache } }) => {
  // Tool implementation
}

// Workflows expect inputData destructuring  
execute: async ({ inputData }) => {
  const { criteria, sources = {}, limits = {} } = inputData;
  // Workflow step implementation
}

Critical Insight: Framework adoption requires understanding the architectural philosophy, not just the API. Mastra’s tool-first approach fundamentally changed how we structured the entire application.

3. Production Deployment Architecture (July 27)

The hybrid Mastra + Next.js deployment to Vercel with Turso database integration established our production-ready architecture.

Technical Achievement:

  • Serverless functions handling AI workflows
  • Cloud SQLite (LibSQL/Turso) for data persistence
  • Real-time vehicle discovery with database storage
  • Comprehensive error handling and monitoring

The Learning: Hybrid architectures (AI framework + web framework) require careful configuration but provide exceptional scalability and developer experience.

The Five Critical Technical Insights

1. Web Scraping in the Modern Era

The Evolution: We progressed through three generations of scraping approaches:

  • Gen 1: Basic HTML parsing (unreliable)
  • Gen 2: CSS-in-JS aware extraction (better)
  • Gen 3: JSON-LD structured data extraction (100% accurate)

The Breakthrough: Modern websites embed structured data (schema.org) that’s more reliable than DOM parsing. StandVirtual price extraction jumped from 0% to 100% accuracy by switching to JSON-LD.

Pattern Discovered:

// Instead of DOM parsing fragility
const price = document.querySelector('.price-selector')?.textContent;

// Use structured data reliability
const jsonLd = JSON.parse(document.querySelector('script[type="application/ld+json"]').textContent);
const price = jsonLd.offers?.price;

2. Chrome Extension Architecture for Modern Websites

The Challenge: Social media sites (Facebook) and dynamic marketplaces (StandVirtual, OLX) use React frameworks that continuously recreate DOM elements.

The Solution: Client-side data extraction with server-side processing.

  • Extension extracts data locally to bypass CORS/CSP restrictions
  • Background script proxies data to API endpoints
  • Server processes and stores data with proper validation

Key Learning: URL-only passing architectures are more resilient than client-side extraction for dynamic websites.

3. Database Schema Evolution Strategy

The Pattern: We discovered JSON-first, schema-second design works best for multi-source data aggregation.

-- Flexible JSON storage for varying data formats
CREATE TABLE listings (
  id TEXT PRIMARY KEY,
  raw_data JSON,  -- Store everything
  -- Extract common fields for querying
  price_eur INTEGER,
  year INTEGER,
  make TEXT,
  model TEXT
);

The Insight: When aggregating data from multiple sources with different formats, JSON storage with extracted structured fields provides the best balance of flexibility and queryability.

4. AI Agent Tool Composition

The Framework Pattern: Mastra’s tool-first development approach proved superior to agent-first development.

Our Tool Suite:

  1. analyze-saved-listings – Data analysis
  2. infer-preferences – ML-powered preference extraction
  3. run-discovery – Vehicle search orchestration
  4. tag-discovery-source – Data provenance tracking

The Learning: Designing tools before implementing agents creates more reliable, testable, and composable AI systems.

5. Production Monitoring and Error Handling

The Realization: AI systems require different monitoring approaches than traditional applications.

Our Monitoring Stack:

  • Vercel function logs for execution monitoring
  • Database metrics for data quality
  • Token usage tracking for cost management
  • Agent performance metrics for accuracy measurement

The Four Development Process Breakthroughs

1. Test-Driven Infrastructure Development

The Approach: Build comprehensive testing infrastructure before features, not after.

The Result: Every feature after July 26 was developed faster and with higher quality because of robust testing foundations.

2. Retrospective-Driven Learning

The System:

  • Session Retrospectives: Capture insights from each development session
  • Feature Retrospectives: Document learnings immediately after deployment
  • Metrics Tracking: Consistent measurement of development velocity

The Impact: Created a knowledge base that enabled faster problem-solving and prevented repeated mistakes.

3. Real-World Testing Methodology

The Philosophy: Test against actual target websites, not idealized scenarios.

Examples:

  • Tested scrapers against real Land Rover inventory
  • Validated Chrome extension on actual Facebook/OLX pages
  • Used production data for preference inference validation

4. Incremental Problem Solving

The Pattern: Break complex problems into discrete, testable components.

Application:

  • Chrome extension: URL detection → data extraction → API integration → database storage
  • Scraper fixes: HTML analysis → pattern creation → validation → integration
  • Agent development: tool design → individual testing → workflow integration → end-to-end validation

The Business Impact Transformation

From Zero to Production Intelligence

July 26 Starting Point:

  • Basic project structure
  • No testing infrastructure
  • Local-only development
  • Manual vehicle discovery

August 4 Endpoint:

  • Production AI agent running every 10 minutes
  • Automated vehicle discovery across multiple sources
  • Real-time notifications via Telegram
  • Chrome extension with 100% accurate data extraction
  • Fair Market Value calculations with deal scoring
  • Multi-tenant user management with preference inference

The Competitive Advantage

Technical Moats Created:

  1. Multi-source data aggregation with JSON-LD extraction accuracy
  2. AI-powered preference inference from user behavior
  3. Real-time discovery scheduling with Cloudflare Workers
  4. Comprehensive deal scoring with market value analysis
  5. Production-grade testing infrastructure enabling rapid iteration

The Five Most Valuable Learnings

1. Infrastructure Investment Principle

Strategic infrastructure investment creates exponential development velocity gains. The July 26 testing infrastructure investment paid dividends on every subsequent feature.

2. Framework Philosophy Alignment

Understanding a framework’s architectural philosophy (like Mastra’s tool-first approach) is more valuable than knowing its API syntax.

3. Real-World Testing Superiority

Testing against actual target environments (real websites, production data) catches issues that idealized testing misses.

4. Modern Web Scraping Evolution

JSON-LD structured data extraction is more reliable than DOM parsing for modern websites with dynamic content.

5. AI-Human Development Velocity

AI-assisted development achieved a 3x velocity multiplier compared to traditional programming, but required human architectural guidance and quality oversight.

Looking Forward: The Foundation We’ve Built

With this 10-day foundation complete, we’ve created something remarkable:

Technical Assets:

  • Production-ready AI agent infrastructure
  • Comprehensive testing and deployment pipeline
  • Multi-source vehicle discovery system
  • Chrome extension with universal compatibility
  • Database architecture supporting multi-tenancy

Knowledge Assets:

  • 18 detailed retrospectives documenting learnings
  • Proven development patterns for AI applications
  • Testing methodologies for complex integrations
  • Deployment strategies for hybrid architectures

Business Assets:

  • Scalable infrastructure supporting real users
  • Automated vehicle discovery with high accuracy
  • AI-powered personalization system
  • Production monitoring and error handling

The Micro-SaaS Success Framework

These 10 days demonstrate a replicable framework for AI-powered micro-SaaS development:

  1. Foundation First: Invest heavily in testing and deployment infrastructure
  2. Framework Mastery: Deeply understand your chosen AI framework’s philosophy
  3. Real-World Testing: Validate against actual target environments continuously
  4. Incremental Building: Break complex features into testable components
  5. Learning Documentation: Capture insights immediately while context is fresh

Conclusion: What 293 Million Tokens Taught Us

This development journey proves that AI-assisted development can achieve remarkable velocity when combined with solid engineering principles. The key isn’t just using AI tools—it’s creating the right infrastructure, understanding your frameworks deeply, and maintaining rigorous testing standards.

The Ultimate Learning: Building an AI-powered application requires the same fundamental engineering disciplines as traditional software, but with 3x the velocity and novel challenges around data quality, agent reliability, and framework integration.

The foundation is complete. The next phase: scaling to serve real users and validating our business hypothesis in the Portuguese used car market.


Development Period: July 26 – August 4, 2025
Total Investment: 62 hours, 293M tokens, $280 development cost
ROI: Production-ready AI-powered car finder with comprehensive vehicle discovery
Next Phase: User acquisition and business validation

This comprehensive analysis synthesizes learnings from 18 feature and session retrospectives documenting the complete journey from testing infrastructure to production AI intelligence.

 


Thanks for reading. Could you answer a few questions below? This is incredibly helpful for understanding my readers and helps me create better content. thanks so much. -Sean

Can we keep in touch?

Can we keep in touch?

I'm Sean, founder of the Stone Soup Protocol and author of this blog. I write about useful ideas & techniques at the intersection of nocode, automation, open source, community building and AI and I make these accessible & actionable for non-technical folks. If you'd like to get a periodic roll-up summary from me, add yourself below. 

Great. I'll keep you in the loop! -Sean

Share This