AI-Powered Travel Itinerary Generator
Safar Sathi AI is a modern travel planning web application that uses Google Gemini AI to generate personalized travel itineraries with real-time images, weather forecasts, and budget breakdowns.
Live Demo: safar-sathi-ai.vercel.app
| Feature | Description |
|---|---|
| AI Itinerary Generation | Powered by Google Gemini 2.5 Flash for intelligent trip planning |
| Real-Time Images | Dynamic images from Pexels API for places and activities |
| Weather Forecasts | 5-day weather predictions for your destination |
| Budget Breakdown | Visual cost analysis across accommodation, food, transport, activities |
| Day-by-Day Plans | Detailed daily activities with estimated costs |
| Top Places | Curated recommendations with ratings and categories |
| Local Tips | Insider tips for each destination |
| Save Trips | Save generated itineraries to your dashboard |
| Authentication | Secure sign-in with Supabase Auth |
| Responsive Design | Works seamlessly on desktop and mobile |
Frontend:
- React 18 + TypeScript
- Vite (Build tool)
- Tailwind CSS + shadcn/ui
- Lucide Icons
Backend:
- Supabase (Database + Auth + Edge Functions)
- Google Gemini 2.5 Flash (AI)
- Pexels API (Images)
Deployment:
- Vercel (Frontend)
- Supabase Edge Functions (Serverless)
safar-sathi-ai/
├── src/
│ ├── components/ # Reusable UI components
│ ├── contexts/ # React context providers
│ ├── hooks/ # Custom React hooks
│ ├── integrations/ # Supabase client setup
│ ├── pages/ # Application pages
│ │ ├── Index.tsx # Landing page
│ │ ├── Planner.tsx # AI trip planner
│ │ ├── Dashboard.tsx # User dashboard
│ │ └── Auth.tsx # Authentication
│ └── main.tsx # App entry point
├── supabase/
│ ├── functions/
│ │ └── generate-itinerary/ # AI Edge Function
│ └── config.toml # Supabase configuration
├── public/ # Static assets
└── package.json
- Node.js 18+
- npm or yarn
- Supabase account
- Google AI Studio API key
- Pexels API key
-
Clone the repository
git clone https://github.com/RelaxItsAryan/Safar-Sathi-AI.git cd Safar-Sathi-AI -
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile:VITE_SUPABASE_URL=your_supabase_url VITE_SUPABASE_PUBLISHABLE_KEY=your_supabase_anon_key
-
Set up Supabase Edge Function secrets
npx supabase login npx supabase link --project-ref your-project-ref npx supabase secrets set GEMINI_API_KEY=your_gemini_api_key npx supabase secrets set PEXELS_API_KEY=your_pexels_api_key
-
Deploy Edge Functions
npx supabase functions deploy generate-itinerary
-
Run the development server
npm run dev
| Variable | Description |
|---|---|
VITE_SUPABASE_URL |
Your Supabase project URL |
VITE_SUPABASE_PUBLISHABLE_KEY |
Supabase anon/public key |
| Secret | Description |
|---|---|
GEMINI_API_KEY |
Google AI Studio API key |
PEXELS_API_KEY |
Pexels API key for images |
- Go to Google AI Studio
- Create a new API key
- Add it as
GEMINI_API_KEYin Supabase secrets
- Go to Pexels API
- Create a free account and get API key
- Add it as
PEXELS_API_KEYin Supabase secrets
- Connect your GitHub repo to Vercel
- Add environment variables:
VITE_SUPABASE_URLVITE_SUPABASE_PUBLISHABLE_KEY
- Deploy
Edge Functions are automatically deployed when you run:
npx supabase functions deploy generate-itinerary- User Input - Enter destination, duration, and budget
- AI Generation - Gemini AI creates a detailed itinerary
- Image Fetching - Pexels API provides relevant images
- Display - Results shown in organized tabs (Overview, Itinerary, Weather, Budget, Places)
- Save - Optionally save to dashboard for later access
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run preview |
Preview production build |
npm run lint |
Run ESLint |
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
Built by Dilisha and Aryan