Skip to content
all projects

~/project/travoai.md

TravoAI

AI trip planner for you and your friends

Timeline
May 20th - 21st, 2023
Type
Hackathon
Team
Donald Lee, with Vaibhav Sharma, Pranav Karthik, Rosa Chen
My role
The itinerary prompt, the trip form, showing the itinerary, and the chatbot
travoai · demo

## overview

Travelling is fun, but 67% of travelers think planning a trip takes too long, and it usually means a lot of tabs and guessing. Whether you're travelling solo, with friends, or with family, TravoAI plans an itinerary for your group.

We built it over a weekend at StormHacks 2023.

## why-we-built-it

Why we built it

Planning a trip for yourself is already a lot of work. Planning for a group is even harder, because you have to think about a shared budget and everyone's interests. Usually one person ends up doing it all in a spreadsheet. We wanted to replace that with a few simple questions.

## what-it-does

What it does

You log in with Google and fill out a short form about the trip: where you're going, how many days, how many people, your budget, and what the group is interested in.

TravoAI turns your answers into a prompt for OpenAI's text-davinci model, which returns a full itinerary based on the group's interests, budget, and size. You can view it day by day, send a link to a friend, add every event to Google Calendar, or ask the chatbot questions about the trip.

## what-i-worked-on

What I worked on

I wrote the prompt that turns the group's answers into an itinerary, built the trip form, rendered the itinerary on the page, and added the loading screen and the chatbot. Vaibhav connected the OpenAI API, added transit directions between activities with Google Maps, and built the shareable links.

## turning-a-paragraph-into-a-plan

Turning a paragraph into a plan

A paragraph about a city reads well, but you can't follow it. A plan needs times, places, and costs, and the app needed to be able to read it.

So I rewrote the prompt to include everything from the form: where you're going, the dates, how many people, the budget, and the group's interests. Then I asked for the answer as JSON, with a date, start time, end time, location, duration, cost, and rating for every activity, and multiple activities per day. That let us show the trip day by day, add each event to Google Calendar, and look up how to get from one activity to the next. Generating a whole trip took a while, so I added a loading screen so people knew it was working.

## dropping-react-halfway-through

Dropping React halfway through

We started with React, but about six hours in, passing data between the React front end and our Node back end was slowing everyone down. It also meant running two servers. I switched us to plain HTML, CSS, and JavaScript with EJS templates, so the server could send pages with the data already in them. Refactoring cost us time on the first night, but everything after that was faster to build. It was also my first time using EJS.

Even with the time crunch and the last-minute changes, we finished, with not much sleep.

## what-s-next

What's next

If we had more time, we'd want a business model. For example, a place like Science World could show up as a top suggestion for people planning a Vancouver trip, and pay a small amount for each visitor TravoAI sends them.

We also wanted to add bus routes, costs, reviews, photos, weather, eco-friendly places to stay, booking, a way to give feedback on itineraries, and a way for solo travelers going to the same place to meet each other.

## key-learnings

What I learned

  1. 01

    If code needs to use what an AI gives back, ask for structured data. A nice paragraph is hard to build on.

  2. 02

    Changing direction early is cheaper than fighting your setup all weekend.

  3. 03

    Deciding what not to build in a weekend matters as much as what you build.

## built-with

Languages & libraries

  • Node.js
  • JavaScript
  • EJS
  • HTML
  • CSS

APIs

  • OpenAI text-davinci
  • Google Calendar
  • Google Maps Directions
  • Google Auth

Tools

  • VS Code
  • Figma

## next-project

Hakoten Fruits

Fruit Ninja with your hand, no headset needed

read the write-up