An AI-powered travel planning platform that generates personalized trip itineraries based on user preferences. The application combines a Node.js backend, Python AI service, PostgreSQL (Prisma) and MongoDB database support, and React frontend to deliver a seamless travel planning experience. Demo video located here: https://youtu.be/eMln9N8gXHw
- AI-generated personalized travel itineraries
- Day-by-day activity planning
- Trip saving and management
- User authentication and profile management
- Interactive and responsive UI with Material-UI components
- Node.js/Express: TypeScript-based API server
- MongoDB: Database for user and trip storage
- Prisma ORM: For database operations
- JWT: Authentication and authorization
- Python/FastAPI: Separate service for AI operations
- OpenAI API: Powers the AI recommendation engine
- React: Built with TypeScript
- Material-UI: Component library for UI
- React Router: Navigation and routing
- Axios: API client for server communication
- Node.js (v14 or higher)
- Python (v3.8 or higher)
- MongoDB database
- OpenAI API key
- Clone the repository:
git clone https://github.com/ctoale/itinerai.git
cd itinerai- Install Node.js dependencies:
npm install
cd client
npm install
cd ..- Install Python dependencies:
# For macOS/Linux:
python3 -m pip install -r requirements.txt
# For Windows:
# Option 1:
python -m pip install -r requirements.txt
# Option 2:
py -m pip install -r requirements.txt- Create a
.envfile in the root directory with the following variables:
# MongoDB Connection
DATABASE_URL=mongodb+srv://...
PORT=3001
# Authentication
JWT_SECRET=your_jwt_secret
# OpenAI API
OPENAI_API_KEY=your_openai_api_key
- Generate Prisma client:
npx prisma generateStart all services concurrently:
npm run start:allOr start each service separately:
- Node.js server:
npm run dev- Python AI service:
python src/python/server.py- React client:
cd client
npm start- Frontend: http://localhost:3000
- Node.js API: http://localhost:3001
- Python AI Service: http://localhost:8001
POST /api/auth- Login userPOST /api/users- Register new userGET /api/users/me- Get user profile
POST /api/trips- Create new tripGET /api/trips- Get all user tripsGET /api/trips/:id- Get specific tripPUT /api/trips/:id- Update tripDELETE /api/trips/:id- Delete tripPOST /api/trips/:id/regenerate- Regenerate trip plan using AIPOST /api/trips/:id/generate-day/:dayNumber- Generate itinerary for specific day
itinerai/
├── client/ # React frontend
│ └── src/
│ ├── components/ # Reusable UI components
│ ├── pages/ # Page components
│ ├── services/ # API clients
│ └── contexts/ # React contexts
├── prisma/ # Prisma ORM schema
├── src/
│ ├── server/ # Node.js backend
│ │ ├── controllers/ # Route handlers
│ │ ├── middleware/ # Express middleware
│ │ ├── routes/ # API routes
│ │ └── db/ # Database connections
│ ├── python/ # Python services
│ │ └── server.py # FastAPI server
│ └── ai/ # AI service modules
└── requirements.txt # Python dependencies
This project is licensed under the MIT License - see the LICENSE file for details.