Skip to content

This repo contains a chatbot that can plan a day in country and render on the map

Notifications You must be signed in to change notification settings

Umit-Yilmaz/Day-Planner-Map-Chatbot

Repository files navigation

Day Planner: Map Chatbot

An interactive AI-powered map explorer that helps you discover locations and create detailed day itineraries. Built with Google Maps API and Google Gemini AI, featuring a beautiful Apple-inspired design interface.

Project Overview

Features

Dual Mode Operation

  • Explorer Mode: Discover multiple points of interest related to any query. Perfect for exploring locations, historical sites, landmarks, and routes.
  • Day Planner Mode: Create structured day itineraries with:
    • Specific visit times and durations
    • Logical sequence of locations
    • Travel routes with transportation methods
    • Realistic scheduling considering travel time

Interactive Map Interface

  • Dynamic Markers: Color-coded pins (red for unselected, blue for active)
  • Route Visualization: Animated lines connecting locations with transportation details
  • Smart Bounds: Automatic map fitting to show all relevant locations
  • Click Interactions: Click markers or cards to highlight and navigate

Location Cards

  • Carousel Display: Scrollable sidebar with location cards
  • Rich Information: Each card shows name, description, coordinates, and duration
  • Visual Feedback: Active card highlighting with corresponding map marker updates
  • Query Display: Shows your current search query at the top of the carousel

Location Cards

Day Plan Timeline

  • Chronological View: Right sidebar displaying your day plan in timeline format
  • Time-based Organization: Activities sorted by visit time
  • Transportation Details: Shows travel methods and times between locations
  • Interactive Management:
    • Click items to navigate to locations on map
    • Delete items with confirmation modal
    • Export your plan as a text file

Timeline Sidebar

User Experience

  • Apple-Inspired Design: Clean, modern interface with glassmorphism effects
  • Smooth Animations: Transitions and hover effects throughout
  • Responsive Layout: Works seamlessly on desktop and mobile devices
  • Confirmation Modals: Prevents accidental deletions or mode switches
  • Mode Notifications: Visual feedback when switching between modes

Design Aesthetic

🚀 Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • Google Maps JavaScript API key
  • Google Gemini API key

Installation

  1. Clone the repository:
git clone <repository-url>
cd "HCI AI MAP"
  1. Install dependencies:
npm install
  1. Configure API keys:

    • Open index.html
    • Replace "ADD YOUR API KEY HERE FROM GOOGLE MAPS JS" with your Google Maps API key (line 187)
    • Create a .env file in the root directory:
    GEMINI_API_KEY=your_gemini_api_key_here
  2. Start the development server:

npm run dev
  1. Open your browser and navigate to the local development URL (typically http://localhost:5173)

Usage

Explorer Mode (Default)

  1. Enter any location-related query in the search bar (e.g., "Famous landmarks in Paris", "Historical sites in Rome")
  2. Click the search button or press Enter
  3. Explore the locations on the map and browse through the location cards
  4. Click on cards or markers to highlight and navigate to specific locations

Day Planner Mode

  1. Toggle "Day Planner Mode" switch at the bottom of the screen
  2. Enter a query like "Create a day plan in Tokyo" or "Design a day trip in New York"
  3. The AI will generate a structured itinerary with:
    • Specific visit times
    • Duration estimates
    • Travel routes between locations
    • Transportation recommendations
  4. View your plan in the timeline sidebar on the right
  5. Click timeline items to navigate to locations
  6. Delete unwanted items or export your plan

Tips

  • Use natural language queries - the AI understands context
  • In Day Planner Mode, be specific about the location and type of activities you want
  • The timeline automatically sorts activities chronologically
  • Export your plan to save it for later reference

Technologies Used

  • Frontend Framework: Vite + TypeScript
  • Maps: Google Maps JavaScript API
  • AI: Google Gemini 2.5 Flash (via @google/genai)
  • Styling: Custom CSS with glassmorphism effects
  • Icons: Font Awesome 6.4.0
  • Fonts: Inter (Google Fonts)

📁 Project Structure

HCI AI MAP/
├── index.html          # Main HTML structure
├── index.tsx           # TypeScript application logic
├── index.css           # Styles and animations
├── package.json        # Dependencies and scripts
├── tsconfig.json       # TypeScript configuration
├── vite.config.ts      # Vite build configuration
├── logo.png            # Application logo
└── README.md           # This file

Design Philosophy

The application follows Apple's Human Interface Guidelines, featuring:

  • Glassmorphism: Translucent backgrounds with blur effects
  • Smooth Transitions: All interactions have fluid animations
  • Clear Visual Hierarchy: Important elements are emphasized through color and positioning
  • Accessibility: High contrast, readable fonts, and intuitive interactions
  • Minimalism: Clean interface that doesn't overwhelm the user

Configuration

Environment Variables

Create a .env file in the root directory:

GEMINI_API_KEY=your_api_key_here

Google Maps API

  1. Get your API key from Google Cloud Console
  2. Enable the following APIs:
    • Maps JavaScript API
    • Places API (optional, for enhanced location data)
  3. Add your API key in index.html line 187

Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build

Key Features Explained

AI-Powered Location Discovery

The application uses Google Gemini AI to understand natural language queries and extract:

  • Location names and coordinates
  • Descriptions and context
  • For Day Planner Mode: times, durations, sequences, and travel routes

Smart Map Interactions

  • Marker Highlighting: Clicking a card or marker updates all related UI elements
  • Automatic Bounds: Map automatically adjusts to show all relevant locations
  • Route Animation: Day Planner Mode shows animated dashed lines between locations

Timeline Management

  • Chronological Sorting: Activities automatically sorted by time
  • Transportation Integration: Shows travel details between locations
  • Export Functionality: Download your plan as a formatted text file

🤝 Contributing

This is a private project, but suggestions and feedback are welcome!

🙏 Acknowledgments

  • Google Maps Platform for mapping services
  • Google Gemini AI for intelligent location processing
  • Font Awesome for icons
  • Apple Human Interface Guidelines for design inspiration

Built with ❤️ for exploring the world, one query at a time.

About

This repo contains a chatbot that can plan a day in country and render on the map

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published