# TravelPlanner Browser Extension

A Chrome/Edge extension that lets you quickly save the current page as a point of interest in your TravelPlanner destination list.

## Features

- **One-click save** – capture the current page's title and URL as a POI
- **Destination management** – select an existing destination or create a new one
- **Categorize** – assign a category (Hotel, Restaurant, Attraction, etc.)
- **Prioritize** – mark as Must Visit, Want to Visit, Maybe, or Been There
- **Rate** – give a 1–5 star rating
- **Notes** – add optional notes
- **View & manage** – browse saved items and remove individual POIs
- **Export** – download all saved data as a JSON file compatible with the TravelPlanner Destinations page

## Installation

### Chrome

1. Open `chrome://extensions/`
2. Enable **Developer mode** (toggle in the top-right corner)
3. Click **Load unpacked**
4. Select the `browser-extension` folder from this repository

### Edge

1. Open `edge://extensions/`
2. Enable **Developer mode** (toggle in the left sidebar)
3. Click **Load unpacked**
4. Select the `browser-extension` folder from this repository

## Usage

1. Navigate to any web page you want to save (e.g. a hotel, restaurant, or attraction)
2. Click the TravelPlanner extension icon in your browser toolbar
3. The page title and URL are automatically captured
4. Select a destination or create a new one
5. Choose a category and optionally set priority, rating, and notes
6. Click **Save to Destination**

## Importing into TravelPlanner

The extension stores data in `chrome.storage.local` using the same JSON format as the Destinations page. To transfer your saved items:

1. Click **Export JSON** in the extension footer
2. Open the TravelPlanner [Destinations](../destinations.html) page
3. Click the **Import** button and select the exported file

## Data Format

The exported JSON uses the same structure as `destinations.html`:

```json
{
  "destinations": {
    "dest-abc123": {
      "name": "Las Vegas",
      "notes": "",
      "pois": [
        {
          "id": "poi-xyz789",
          "name": "The Bellagio",
          "category": "hotel",
          "rating": 4,
          "priority": "must",
          "tags": [],
          "website": "https://www.bellagio.com",
          "notes": "Fountain show is incredible",
          "createdAt": "2026-03-17T20:00:00.000Z"
        }
      ],
      "createdAt": "2026-03-17T20:00:00.000Z"
    }
  }
}
```
