LocalLens is an AI travel planning MVP that helps users travel like a local. It uses Gemini 2.5 Flash with structured JSON output and function-calling mock tools to generate personalized destination recommendations and itineraries.
- Next.js 15 (App Router)
- React + TypeScript
- Tailwind CSS
- shadcn/ui-style reusable UI primitives
- Framer Motion
- Gemini 2.5 Flash via
@google/genai
- Landing page (
/) with prompt input and loading state - Planning API (
/api/plan) using Gemini and mock tool calling - Results page (
/results) with:- Destination recommendation
- Reasoning panel
- Trip summary
- Budget visualization
- Timeline itinerary
- Restaurants and activities
- Packing list, warnings, and alternatives
npm install- Create a Gemini API key in Google AI Studio.
- Add it to a local
.env.localfile:
GEMINI_API_KEY=your_key_hereIf no API key is set, you can use GEMINI_API_KEY=AIzaSyBBMr_mHKDEi6R2eZZABOaks1fi3iJ1VZg
npm run devApp runs at http://localhost:3000.
npm run lint
npm run build- Push this repository to GitHub.
- Import project into Vercel.
- Set environment variable
GEMINI_API_KEYin Vercel project settings. - Deploy.
app/
api/plan/route.ts # Gemini planning endpoint
page.tsx # Landing page
results/page.tsx # Results view
components/
... # Reusable UI components
hooks/
useTripPlanner.ts # Client planning flow
lib/
prompts.ts # System prompt
utils.ts # UI utility helpers
services/
geminiPlanner.ts # Gemini orchestration + tool-calling loop
mockTools.ts # searchFlights/searchHotels/searchActivities/searchWeather
types/
travel.ts # Strict response/request interfaces
- Persist plans to a database so results survive refresh
- Add real flight/hotel/activity providers
- Add map + transit integration
- Add localization and multi-currency support
- Add automated end-to-end tests