Skip to main content
DBB Software logo

Production MVP for a Junior Tennis Advisor

DBB Software rebuilt a junior tennis advisor's proof of concept as a production MVP in TypeScript on Google Cloud, from the tournament data pipeline to the conversation back end and web app.

Industry

Technology

Service

MVP development

Team

1 AI Engineer, 1 Back-End Engineer, 1 Data Engineer, 1 Front-End Engineer, 1 DevOps Engineer, 1 QA Engineer, 1 Team Lead

Project State

June 2026 - Ongoing

Country

US Flag

United States

JT Case Study
JT

About the Client

The client is a United States technology company building an AI advisor for families of competitive junior tennis players. Parents use it to choose USTA and ITF junior tournaments and to plan the travel around them.

The Client’s Initial Request

The client had a discovery-phase proof of concept, built as Python scripts and a Streamlit demo, and engaged DBB Software to rebuild it as a production MVP.

Data Quality at the First Milestone

Load all 30 ITF tournaments at 98% metadata compliance, or the first milestone could not close.

01

Fast Answers

Meet a p95 target of under 3 seconds end to end and under 1.5 seconds to the first word.

02

Children's Data Privacy

The players are minors, so COPPA and GDPR apply: keep their personal data out of the AI layer.

03

Accounts, Memory, and Payments

Sign parents in with Google, remember each family across sessions, and charge through Stripe past a free session limit.

04

Travel Planning

Answer parents' questions about tournament travel with nearby airports, hotels, and drive times.

05

Solutions we delivered

We rebuilt the proof of concept in TypeScript on Google Cloud and continue to develop the MVP. The back end is a NestJS 11 modular monolith with the Mastra AI engine embedded, over Cloud SQL for PostgreSQL 16 with pgvector.

Discovery and Solution Design

DBB Software audited the proof of concept's code, tournament data, and AI implementation. We then prepared an MVP Kick-Off Document covering the architecture, milestone plan, a 223-person-day estimate, RACI responsibility matrix, risk register, and QA framework.

Mapped the client's business requirements document to project milestones and obtained client sign-off.

Built working prototypes in LangGraph and Mastra before selecting Mastra.

Prepared software and engineering design documents and recorded 33 architectural decisions.

Tournament Data Pipeline

An automated pipeline runs 4 scheduled jobs for tournament discovery, date checks, rechecks, and archiving. Cloud Scheduler triggers the scrapers on Cloud Run every day.

ITF: The scrapers collect tournaments region by region, including Africa and South America, to work around a website redesign that broke region-based search. The ITF data has no flag for events that count for both ITF and USTA, so the pipeline derives it from the event's location.

USTA: Tournament information comes through the federation's API. A ranking-points table, documented during the build, sets how each value is derived.

Extraction: Playwright and Cheerio process scraped pages, an LLM extracts event details, and Zod validates the output. Venues are de-duplicated with fuzzy matching.

Monitoring: Grafana dashboards and Sentry alerts track scheduled jobs and failures.

Recommendations and Travel Advice

We designed how the advisor counts tournaments, presents options, and answers travel questions.

Database queries: Typed tools do the counting and aggregating, so the model writes no SQL. On this data, a model-written query returns a plausible wrong number, not an error: a naive join counted 1,312 rows for a catalog of 219 tournaments.

Tournament selection: We dropped a weighted ranking formula and show every option unranked, since heavy filtering hides options without anyone knowing. Parents start from a summary and drill down, and back-to-back runs show as unranked groups with eligibility marked on each event and configurable distance and day-gap settings.

Travel: A Google Places integration provides hotel options, nearby airports, and estimated drive times for tournaments. The client formally accepted the feature as built.

Mobile-First Chat and Streaming

The parent-facing application is a mobile-first, responsive chat built with React 19, TypeScript, and the Vercel AI SDK. Tournament tables render directly from structured tool results, so the model doesn't retype rows. Parents can send voice notes through an ElevenLabs integration.

The advisor streams responses word by word through server-sent events (SSE).

If the parent's connection drops, the current conversation turn continues running on the server.

After a reload, the application resumes from the last completed step using conversation state stored in PostgreSQL. We dropped a planned Redis cache because PostgreSQL provided a simpler approach.

On mobile, longer retries address conversation reload failures after switching apps. Sentry records remaining failures for monitoring.

Conversation Memory and Caching

A 3-tier memory system built on Mastra's working memory and observational memory keeps family details between sessions. When parents return, the advisor places earlier conversations in their correct time context and rechecks tournament deadlines. Mastra was still a young framework, so we recorded each workaround the memory needed in the decision log.

A single parent turn sends about 98,000–111,000 input tokens, so we optimized caching: without it, a conversation would cost 5–6 times more. A typical turn costs about 3–4 cents.

Sign-In, Payments, and Privacy

Parents sign in with Google through Auth0.

The paywall, based on session count, is built on Stripe Checkout, the Stripe customer portal, webhooks, and Stripe-managed tax.

Children's personal data is removed before it reaches the AI model, and the GDPR erasure process also deletes related observability traces.

Mastra Studio, where the client's product team tests prompts, is restricted to that team through Auth0.

Infrastructure and Testing

Terraform manages the Google Cloud infrastructure, including Cloud Run, Cloud SQL, Cloud Storage, Secret Manager, and Cloud DNS.

CI/CD: GitHub Actions deploys to development, staging, and production environments.

Monitoring: Sentry, Grafana Cloud with OpenTelemetry, and Google Cloud Monitoring provide observability.

QA: A dedicated QA engineer works with automated Tier 1 tests of the advisor's answers and Playwright end-to-end tests.

Delivery: We followed a 9-stage AI-assisted development workflow with quality gates, and handed over the code with runbooks, an access audit, and database self-service docs.

Results Achieved

clock

Production MVP in about 3.5 months

The project started June 16, 2026, and reached production September 30, with milestones accepted under the client's terms.

dollar-circle

About 45% lower conversation cost

For a 50-turn conversation, cost fell from $4.08 to $2.26 as the cache hit rate rose from 88.9% to 93.9%.

Data Transfer

Daily ITF and USTA tournament data

Up from 30 ITF tournaments in the proof of concept, with about 600 USTA tournaments in scope through the end of 2026.

access

443 test files and an 80% coverage gate

CI enforces the gate across a codebase built in about 1,100 commits and about 400 pull requests.

Turn Your Proof of Concept Into a Production Product

DBB Software rebuilds AI prototypes for production, with the data pipelines, infrastructure, and tests they need.

Contact Us

I have read the principles of personal data protection - Privacy Policy

"Most of our work starts with a 30-minute call where someone describes a product they're trying to ship and one part of the engineering picture they can't get around.

If that's where you are, let's set one up; I'll tell you straight whether we're the right fit.”

Mina Morkos

Business Development Manager

Want a similar outcome for your team?

Ask our AI assistant. It can pull related case studies, talk through the approach, and put you in touch with the team if you want a deeper conversation.

Discuss a similar project