Skip to content

Get place recommendations near you, powered by AI

Notifications You must be signed in to change notification settings

ludw1/wanderwise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WanderWise - AI-Powered Travel Companion

React Native FastAPI TypeScript Python

WanderWise is an intelligent travel companion that transforms your static travel plans into dynamic, context-aware daily recommendations. Using AI and real-time data, it suggests the perfect activity for your current mood, location, and circumstances. It was born a upcoming Tokyo trip I am planning and having the idea for an app that helps you choose an activity from your travel plan. The frontend especially was created with a lot of help from AI.

🌟 Features

  • πŸ“± Android Mobile App: React Native app with Android support
  • πŸ€– AI-Powered Recommendations: LLM-driven suggestions using OpenRouter API
  • πŸ“‹ Smart Plan Parsing: Upload travel plans in JSON or text format with structured extraction
  • 🎯 Activity Selection: Browse and select activities from parsed travel plans
  • ⭐ Feedback System: Rate recommendations to improve future suggestions
  • πŸ“ Location-Aware: GPS integration for location-based recommendations
  • πŸ”„ Session Management: Track completed activities within your trip session

πŸ—οΈ Architecture

WanderWise follows a client-server architecture with clear separation of concerns:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Mobile Frontend   β”‚    β”‚   Backend API       β”‚
β”‚   (React Native)    │◄──►│   (FastAPI)         β”‚
β”‚                     β”‚    β”‚                     β”‚
β”‚ β€’ TypeScript        β”‚    β”‚ β€’ Python 3.10+      β”‚
β”‚ β€’ React Navigation  β”‚    β”‚ β€’ Pydantic          β”‚
β”‚ β€’ Axios             β”‚    β”‚ β€’ Async/Await       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                      β”‚
                           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                           β”‚   External APIs     β”‚
                           β”‚                     β”‚
                           β”‚ β€’ OpenRouter (LLM)  β”‚
                           β”‚ β€’ Google Maps API   β”‚
                           β”‚ β€’ Weather API       β”‚
                           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

travelplanner/
β”œβ”€β”€ wanderwise_frontend/          # React Native mobile application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/           # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ screens/              # App screens (Welcome, Activity Selection, etc.)
β”‚   β”‚   β”œβ”€β”€ navigation/           # Navigation configuration
β”‚   β”‚   └── types/                # TypeScript type definitions
β”‚   β”œβ”€β”€ android/                  # Android-specific code (functional)
β”‚   β”œβ”€β”€ ios/                      # iOS-specific code (structure exists)
β”‚   └── package.json
β”‚
β”œβ”€β”€ wanderwise_backend/           # FastAPI backend service
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ api/v1/               # API endpoints and schemas
β”‚   β”‚   β”œβ”€β”€ core/                 # Configuration and constants
β”‚   β”‚   β”œβ”€β”€ services/             # Business logic layer
β”‚   β”‚   β”œβ”€β”€ integrations/         # External service integrations
β”‚   β”‚   β”‚   β”œβ”€β”€ llm/              # LLM client and prompts
β”‚   β”‚   β”‚   └── tools/            # Tool calling implementations
β”‚   β”‚   └── utils/                # Utility functions
β”‚   β”œβ”€β”€ data/                     # Feedback data storage (JSONL format)
β”‚   └── requirements.txt

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and npm/yarn
  • Python 3.10+
  • React Native CLI and Android development environment
  • OpenRouter API Key for LLM access
  • Google Maps API Key for location services
  • Weather API Key (optional, for weather integration)

Frontend Setup

cd wanderwise_frontend

# Install dependencies
npm install

# Start Metro bundler
npm start

# Run on Android device/emulator
npm run android

# Note: iOS structure exists but not fully functional for development

Backend Setup

cd wanderwise_backend

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Configure environment
cp .env.example .env
# Edit .env with your API keys

# Start development server
uvicorn app.main:app --reload

The backend will be available at http://localhost:8000 with interactive API docs at /docs.

πŸ”§ Configuration

Environment Variables

Create a .env file in the backend directory:

# LLM Configuration
OPENROUTER_API_KEY=your_openrouter_key_here

# Maps API
GOOGLE_MAPS_API_KEY=your_google_maps_key_here

# Weather API (optional)
WEATHER_API_KEY=your_weather_api_key_here

# Application Settings
DEBUG=true
LOG_LEVEL=info
FEEDBACK_FILE_PATH=data/feedback.jsonl

Mobile App Configuration

Update wanderwise_frontend/src/constants/config.ts:

export const API_BASE_URL = __DEV__ 
  ? 'http://localhost:8000' 
  : 'https://your-production-api.com';

🎯 How It Works

  1. πŸ“€ Upload Travel Plan: Users upload their travel itinerary in Markdown or text format
  2. 🎲 Preference Selection: Bracket-style tournament to select current mood and activity type
  3. πŸ€– AI Processing: LLM analyzes plan, preferences, weather, and location data
  4. πŸ’‘ Smart Recommendation: Receive a personalized activity suggestion with justification
  5. ⭐ Feedback Loop: Rate recommendations to improve future suggestions
  6. βœ… Activity Tracking: Mark activities as completed to avoid repetition

πŸ› οΈ Development

Frontend Development

# Run tests
npm test

# Lint code
npm run lint

# Type checking
npx tsc --noEmit

# Build for production
npm run build

Backend Development

# Run tests
pytest

# Format code
black app/
isort app/

# Type checking
mypy app/

# Start with auto-reload
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

πŸ“± Key Features Deep Dive

Intelligent Recommendation Engine

  • Context-Aware: Considers weather, location, time, and user mood
  • Plan Integration: Parses and understands your existing travel plans
  • Adaptive Learning: Improves suggestions based on your feedback

Bracket Selection System

  • Engaging UX: Tournament-style preference selection
  • Randomized Options: Prevents selection bias
  • Quick Decision Making: Reduces choice paralysis

Real-Time Data Integration

  • Weather API: Current conditions affect activity suggestions
  • GPS Location: Distance and travel time calculations
  • Crowd Data: Future integration for popularity-based filtering

πŸ”„ API Endpoints

Core Endpoints

  • POST /api/v1/parse-plan - Parse travel plan and extract structured activities
  • POST /api/v1/validate-plan - Validate JSON travel plan structure
  • POST /api/v1/recommendations - Get activity recommendation
  • POST /api/v1/feedback - Submit recommendation feedback

Request/Response Examples

// Recommendation Request
{
  "plan_content": "Day 1: Visit Tokyo Tower, Senso-ji Temple...",
  "completed_activities": ["tokyo-tower"],
  "user_mood": "adventurous",
  "activity_type": "cultural",
  "location": {"lat": 35.6762, "lng": 139.6503}
}

// Recommendation Response
{
  "activity_id": "senso-ji-temple",
  "activity_name": "Senso-ji Temple Visit",
  "justification": "Perfect for cultural exploration in good weather",
  "estimated_travel": "15 minutes by train"
}

πŸš€ Deployment

Backend Deployment (Fly.io)

# Install Fly CLI
curl -L https://fly.io/install.sh | sh

# Deploy
fly deploy

Mobile App Deployment

# Android
cd android && ./gradlew assemble Release

# iOS (requires Xcode)
cd ios && xcodebuild -workspace WanderWise.xcworkspace -scheme WanderWise archive

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Get place recommendations near you, powered by AI

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors