Links
- Try it out: https://radar-milhas-viagens.vercel.app/voos
- GitHub repo (public): https://github.com/ibcorreaai-oss/radar-milhas-viagens
- Built with: Next.js 15, TypeScript, Tailwind CSS, Supabase (Postgres + RLS + Auth), Vercel, SerpApi (Google Flights API), Stripe, Resend, Zod, Claude Code
Inspiration
Frequent flyer / miles communities in Brazil spend hours manually comparing "pay cash" vs "redeem miles" for the same route across multiple loyalty programs — and most flight-price tools either don't show real-time data or silently fabricate numbers when a live quote isn't available. We wanted a travel radar that a real points-and-miles enthusiast could trust: if a price is shown as "real market price," it has to actually come from a live source — never an estimate dressed up as fact.
What it does
Radar Milhas & Viagens is a travel-intelligence club that lets a user search a route (one-way or round-trip) and instantly see, side by side:
- the real cash price pulled live from Google Flights via SerpApi, and
- the equivalent price in miles/points across the airline loyalty programs we track,
with an AI-driven recommendation (e.g. "price is at/above average, wait for a promotion" or "price is below average, worth buying now") based on the historical price distribution for that route.
For round-trip searches, we implement SerpApi's two-step Google Flights flow: the first call returns outbound options plus a departure_token, and the second call — passed that token — returns the real, priced return-leg combinations. When a real price is available the app shows a green "Preço real de mercado (Google Flights)" badge; when the live call can't complete in time, it degrades gracefully to a clearly-labeled estimate instead of ever failing the search.
Beyond flight search, the app also covers hotel/points comparisons, a "Discover" world-events radar (festivals, sports, seasonality) that surfaces travel opportunities before they trend, a bucket-list tracker, price alerts, and a subscription (Stripe) business model with Free/Premium/Pro/Consultant tiers — built as a real SaaS, not a hackathon-only demo.
How we built it
- Frontend/backend: Next.js 15 (App Router) + TypeScript + Tailwind CSS, deployed on Vercel.
- Data layer: Supabase (Postgres + Row Level Security + Auth) — every table enforces RLS so users only ever see their own data; sensitive writes (subscription status, admin roles) are locked to service_role server-side code only, never reachable from the client.
- Real flight pricing — SerpApi Google Flights API: our provider layer calls SerpApi's Google Flights engine. Round-trip uses the documented departure_token two-call flow. We tuned the per-call timeout to 4.5s specifically to fit two sequential SerpApi calls inside Vercel Hobby's hard 10-second function limit, with a documented, code-level fallback to a clearly labeled estimate when a call runs long — the app never silently invents a number.
- Zero Hallucination Policy: this was a deliberate, enforced constraint through the whole build — no price field is ever populated with a fabricated value; it's either a real quote (SerpApi) or explicitly marked as an estimate in the UI copy.
- Payments: Stripe subscriptions, written only via webhook with service_role.
- Built end-to-end with Claude Code, iterating in small branches with typecheck + build + real-browser testing (Playwright smoke suite) before every merge to master.
Challenges we ran into
- SerpApi's Google Flights scrape has variable latency (we measured anywhere from ~1.4s to over 4.5s for the same route on the same day) — this isn't a bug, it's normal behavior for a provider doing real-time scraping of Google Flights. We had to find the right timeout that covers the common case without blowing Vercel's 10-second function budget across two sequential calls, and log elapsedMs per call so we could keep tuning it with real data instead of guesswork.
- A GitHub→Vercel deploy webhook stalled for ~10 minutes on one specific push with no configuration cause found; we manually triggered the deploy and it recovered on subsequent pushes.
Accomplishments that we're proud of
- Validated the full round-trip flow live in production with a real route (GRU→GIG), confirmed by a green "Preço real de mercado" badge and a real LATAM fare, not a mock.
- Shipped a Zero Hallucination Policy that's enforced in code, not just in a prompt — the distinction between "real SerpApi price" and "estimate" is a first-class UI state, not an afterthought.
- The whole app (84 routes) builds and typechecks clean, has an automated Playwright smoke suite running against production, and has RLS-enforced multi-tenant security from day one — built like a real product for thousands of users, not a hackathon toy.
What we learned
Real-time third-party data (especially anything doing live scraping under the hood, like SerpApi's Google Flights engine) needs to be treated as variable-latency by design — timeouts, graceful degradation, and clear labeling of "real" vs. "estimated" data matter as much as the integration itself.
What's next for Radar Milhas & Viagens
Extend live SerpApi pricing to hotels and add more airline loyalty programs to the points-value engine; keep growing the "Discover" world-events radar that surfaces travel opportunities (price drops, festivals, low season) before the user even searches.
Built With
- css
- next.js
- postgresql
- serpapi
- stripe
- supabase
- tailwind
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.