A web application that generates personalized travel itineraries using AI. The app takes user input about their destination, dates, preferences and budget to create custom travel plans and blog posts.
- AI-powered travel itinerary generation
- Email delivery of itineraries
- Automatic blog post creation
- Date range selection
- Budget level options
- Travel preferences customization
- React + TypeScript
- Vite
- Supabase
- OpenAI GPT
- SMTP email integration
- Clone the repository
- Install dependencies:
npm install
- Create a
.env
file with required environment variables:SUPABASE_URL=your_supabase_url SUPABASE_SERVICE_ROLE_KEY=your_service_key OPENAI_API_KEY=your_openai_key
- Run development server:
npm run dev
SUPABASE_URL
: Your Supabase project URLSUPABASE_SERVICE_ROLE_KEY
: Supabase service role keyOPENAI_API_KEY
: OpenAI API key for GPT integration
POST /functions/v1/generate_itinerary
Request body:
{
"destination": "Paris, France",
"dates": ["2024-05-01", "2024-05-05"],
"preferences": {
"budget": "medium",
"interests": ["history", "art", "shopping"]
}
}
Response:
{
"itinerary": "<html>...</html>"
}
POST /functions/v1/create_blog_post
Request body:
{
"itinerary": "<html>...</html>",
"blog_title": "Travel Guide to Paris"
}
Response:
{
"blog_post": "<html>...</html>"
}
The app uses SMTP email integration to send itineraries and blog posts to users. The email service is configured in the .env
file:
EMAIL_HOST=smtp.example.com
EMAIL_PORT=587
[email protected]
EMAIL_PASS=your_email_password
The app is deployed using Vercel. To deploy:
- Install Vercel CLI:
npm install -g vercel
- Run:
vercel
- Fork the repository
- Create a new branch:
git checkout -b feature-name
- Make your changes and commit:
git commit -m 'Add feature'
- Push to the branch:
git push origin feature-name
- Create a pull request
This project is licensed under the MIT License. See the LICENSE file for details.