Commit Graph

5 Commits

Author SHA1 Message Date
Jeff Emmett 7f590521b7 refactor: route AI calls through LiteLLM proxy instead of direct Gemini
Both ai-planner.ts and gemini.ts now use LiteLLM's OpenAI-compatible
API (http://litellm:4000) which proxies to Gemini Flash. Falls back
to direct Gemini API if LITELLM_API_KEY not set.

- docker-compose joins ai-internal network for LiteLLM access
- LITELLM_URL and LITELLM_API_KEY env vars added
- GEMINI_API_KEY kept as optional fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 14:11:37 -07:00
Jeff Emmett 36a7829c7a feat: AI-enabled trip planning with real search integration
Replace simple NL→JSON parse with Gemini function-calling agent that
geocodes destinations (Nominatim), searches flights (Kiwi Tequila),
finds Airbnb listings, and computes routes (ORS/OSRM) during planning.

- New ai-tools.ts with 4 tool functions (geocode, flights, accommodation, routes)
- New ai-planner.ts with Gemini 2.0 Flash agentic loop (max 8 iterations)
- New /api/trips/plan endpoint (60s timeout for external API calls)
- Enhanced ParsedTripPreview with flight/accommodation carousels, route summary, mini map
- Trip creation now persists lat/lng, route segments, and selected bookings
- NLInput shows rotating status messages during planning
- Kiwi flight search gracefully degrades when API key not configured

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 14:01:25 -07:00
Jeff Emmett cafbc6c4c6 feat: add route planning, accommodation search, and map tab
- Add RouteSegment model with ORS/OSRM hybrid routing (worldwide)
- Add 6 new API routes: routes, optimize, accommodation search/save, nearby POIs, isochrones
- Add TripMap (MapLibre), AccommodationSearch, RouteStats frontend components
- Add map tab to trip dashboard with route optimization
- Migrate to basePath /rtrips for rspace.online/rtrips hosting
- Add rtrips.online → rspace.online/rtrips redirect via Traefik
- Install maplibre-gl and react-map-gl dependencies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 12:31:39 -07:00
Jeff Emmett fe150f7ac0 refactor: migrate EncryptID URLs from encryptid.jeffemmett.com to auth.ridentity.online
Part of the ridentity.online branding migration. The EncryptID auth
server is now accessible at auth.ridentity.online (with the legacy
encryptid.jeffemmett.com kept as a backward-compatible alias).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:20:07 -08:00
Jeff Emmett 8c13f6ad71 Initial rtrips-online scaffold
Next.js 14 app with Prisma (PostgreSQL), Gemini NL parser,
Tailwind dark theme, Docker + Traefik deployment config.

Features:
- Landing page with teal/cyan branding
- NL input → Gemini 2.0 Flash parsing → structured trip data
- Full Prisma schema (trips, destinations, itinerary, bookings,
  expenses, packing items, collaborators)
- Trip CRUD API routes with all sub-entities
- Trip dashboard with tabbed views (overview, itinerary,
  destinations, bookings, budget, packing)
- Embedded rSpace canvas with full-screen mode
- Docker multi-stage build with security hardening
- Health check endpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 12:10:22 -07:00