{
  "markdown": "# trip-json\n\nOpen JSON format for AI-curated trip guides, with an interactive map renderer.\n\nUse [Claude Code](https://claude.ai/claude-code) to research a destination and generate a guide. Each place is enriched with Google Places data (ratings, hours, photos). View it locally with the included renderer, or bundle it into a self-contained HTML file you can email, AirDrop, or drop onto any static host.\n\n## Demos\n\n- [Vegas](https://trip-json.vercel.app/trips/renderer.html?trip=vegas) — itinerary mode\n- [Bangkok](https://trip-json.vercel.app/trips/renderer.html?trip=bangkok) — category mode\n\n## Quickstart\n\n```bash\ngit clone https://github.com/chuckakung/trip-json.git\ncd trip-json\ncp .env.example .env.local        # add your two API keys (see below)\nnpm run serve                     # http://localhost:8888/renderer.html?trip=bangkok\n```\n\nThe slash commands (`/research-trip`, `/static-trip`) are picked up automatically from `.claude/commands/` when you run [Claude Code](https://claude.ai/claude-code) inside the cloned repo. Then create a trip:\n\n```\n/research-trip Tokyo, staying at Park Hyatt, luxury, foodie\n```\n\n> _Plugin install (e.g. `/plugin install trip-json`) coming once this is approved on the [official Claude Code marketplace](https://claude.com/plugins). Until then, clone the repo._\n\nOptions: `Style` (budget/mid/luxury/foodie/nightlife/family/adventure), `Dates` (e.g. \"May 10–14\" — triggers itinerary mode), `Interests` (\"street food, jazz bars\").\n\n## How it works\n\n1. **Research** — Claude runs web searches and curates 15–25 places with descriptions, tips, price levels, and estimated time.\n2. **Enrich** — a generated finder script calls the Google Places API for coordinates, ratings, hours, photos, and reviews. Output: `trips/[city].json`.\n3. **Render** — `trips/renderer.html?trip=[city]` shows the interactive Mapbox map with sidebar, click-to-fly markers, popups, optional itinerary mode, accommodation card, and safety section.\n\n## API keys\n\nYou provide both keys in `.env.local` (gitignored). There is no shared default.\n\n| Key | Used for | Free tier |\n|-----|----------|-----------|\n| `NEXT_PUBLIC_GOOGLE_MAPS_API_KEY` | Geocoding API + Places API (New) — one-time at trip creation | $200/month credit |\n| `NEXT_PUBLIC_MAPBOX_TOKEN` | Mapbox vector tiles, sprites, fonts — every render | 50k loads/month |\n\n**Google**: [console.cloud.google.com](https://console.cloud.google.com/) → APIs & Services → Credentials → Create API key. Enable **Geocoding API** and **Places API (New)** on it. (Not the Maps JavaScript API — we use Mapbox instead.)\n\n**Mapbox**: [account.mapbox.com/access-tokens](https://account.mapbox.com/access-tokens). Set a **spending cap of $0** above the free tier at [account.mapbox.com/billing](https://account.mapbox.com/billing/) — once exceeded, the map breaks gracefully instead of charging you. **Important:** when you `/static-trip` to bundle a guide, your Mapbox token is baked into the file. Recipients use your quota. The cap protects you.\n\n## Sharing\n\n**Self-contained HTML file** (recommended): `npm run inject-token && node scripts/build-static.js [city]` — or `/static-trip [city]` from Claude Code — produces `trips/[city].html` with the JSON and your Mapbox token inlined. Double-click to open, AirDrop, email, or upload anywhere.\n\n**Hosted (optional, not part of the base skill)**: drop `trips/` onto any static host. The included `vercel.json` runs `inject-token.js` at build time using `NEXT_PUBLIC_MAPBOX_TOKEN` from your project env if you choose Vercel; other hosts need an equivalent wire-up.\n\n## Trip JSON\n\nRequired: `meta`, `map`, `theme`, `places`. Each place needs `name`, `coordinates` (`[lng, lat]`), `category`, `emoji`, `description`, `tips`, `priceLevel`, `estimatedTime`. Optional: `accommodation`, `safety`, `route`, `itinerary`, plus per-place Google fields (`googleRating`, `googleMapsUrl`, `website`, `hours`).\n\nSee `trips/bangkok.json` (category mode) and `trips/vegas.json` (itinerary mode) for full examples.\n\n## Project structure\n\n```\n.claude-plugin/plugin.json     # Claude Code plugin manifest\nskills/                         # /research-trip and /static-trip\nscripts/google-places.js        # Google Places enrichment helper\nscripts/build-static.js         # bundle a trip into one HTML file\nscripts/inject-token.js         # generate trips/_token.js from env\ntrips/renderer.html             # the map renderer\ntrips/bangkok.json              # sample trip — category mode\ntrips/vegas.json                # sample trip — itinerary mode\nvercel.json                     # Vercel build config\n```\n\n## Contributing\n\nPRs welcome. Common shapes:\n\n- **New trip example**: add `trips/<city>.json`, link it in Demos.\n- **Renderer feature**: edit `trips/renderer.html`, exercise it in an example trip.\n\nTest changes by cloning your fork — `.claude/commands/` exposes the slash commands automatically when Claude Code runs inside the cloned directory.\n\n## Disclaimer\n\nThis project generates travel guides using AI research and the Google Places API. Information may be inaccurate, outdated, or incomplete. Verify operating hours, trail conditions, safety closures, prices, transportation, and visa requirements with official sources before relying on them. The authors and contributors accept no responsibility for any loss, injury, or inconvenience resulting from use of these guides. Hiking, swimming, driving, and other activities carry inherent risk — follow posted signage, ranger guidance, and local laws.\n\n## License\n\nMIT\n",
  "bytes": 5520,
  "sha": "a44423ae0cf54469bf07732dac28f205b748651812e05b1c87be0c4533e0e328",
  "repo_slug": "chuckakung/trip-json",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_chuckakung_trip_json_trip_json_5003cd8c/readme"
}