Your intelligent companion for seamless travel planning
Features β’ Demo β’ Installation β’ Usage β’ API Docs β’ Contributing
- Overview
- Features
- Tech Stack
- Architecture
- Installation
- Configuration
- Usage
- API Documentation
- Deployment
- Contributing
- License
AI Travel Assistant is a cutting-edge, full-stack application that revolutionizes travel planning through AI-powered natural language processing. Users can search flights, check weather forecasts, get travel summaries, and interact with the system using voice commands or text input.
- π€ Voice-Enabled Interface - Powered by Deepgram for accurate speech recognition
- π€ AI-Powered Conversations - Integrated with OpenRouter for intelligent responses
βοΈ Smart Flight Search - Real-time flight data via Amadeus API- π€οΈ Weather Intelligence - Accurate forecasts using OpenWeatherMap
- π¨ Modern UI/UX - Beautiful, responsive design with dark/light mode
- π High Performance - Built with modern frameworks for optimal speed
| Feature | Description |
|---|---|
| Flight Search | Search and compare flights using natural language queries |
| Weather Forecasting | Get real-time weather data for any destination |
| AI Chat Assistant | Conversational AI for travel planning and information |
| Voice Input | Hands-free interaction with voice commands |
| Travel Summaries | AI-generated summaries of travel articles and reviews |
| Multi-Modal Interaction | Text, voice, or GUI-based interactions |
- Responsive Design - Works seamlessly on desktop, tablet, and mobile
- Dark/Light Mode - System-aware theme with manual toggle
- Smooth Animations - Framer Motion powered transitions
- Accessibility - WCAG 2.1 AA compliant
- Progressive Web App - Installable on any device
- JWT-based authentication
- Secure API key management
- CORS protection
- Rate limiting
- Input validation and sanitization
React 18.2 - UI Framework
TypeScript 5.2 - Type Safety
Vite 5.0 - Build Tool
Tailwind CSS 3.4 - Styling
Framer Motion - Animations
React Query - Data Fetching
Zustand - State Management
React Hook Form - Form Handling
Zod - Schema Validation
Lucide React - Icons
Recharts - Data Visualization
FastAPI 0.100+ - Web Framework
Python 3.12+ - Programming Language
SQLAlchemy - ORM
Pydantic - Data Validation
Uvicorn - ASGI Server
SQLite - Database
Httpx - HTTP Client
Python-Jose - JWT Handling
Passlib - Password Hashing
OpenRouter - AI/LLM Provider
Deepgram - Voice Recognition
Amadeus - Flight Data API
OpenWeatherMap - Weather Data API
ai-assistant-app/
βββ ai-assistant/
β βββ frontend/ # React TypeScript Application
β β βββ src/
β β β βββ components/ # Reusable UI components
β β β β βββ home/ # Landing page sections
β β β β βββ chat/ # Chat interface
β β β β βββ flights/ # Flight search components
β β β β βββ weather/ # Weather widgets
β β β β βββ ui/ # Base UI components
β β β β βββ layout/ # Layout components
β β β βββ hooks/ # Custom React hooks
β β β βββ lib/ # Utilities and constants
β β β βββ pages/ # Page components
β β β βββ types/ # TypeScript types
β β β βββ styles.css # Global styles
β β βββ public/ # Static assets
β β βββ package.json
β β
β βββ backend/ # FastAPI Python Application
β βββ app/
β β βββ api/ # API routes
β β β βββ v1/ # API version 1
β β β βββ endpoints/ # Route handlers
β β β βββ router.py # API router
β β βββ core/ # Core functionality
β β β βββ config.py # Configuration
β β β βββ security.py # Auth & security
β β β βββ ai_client.py # AI integration
β β β βββ voice_client.py # Voice integration
β β βββ database/ # Database setup
β β βββ models/ # SQLAlchemy models
β β βββ schemas/ # Pydantic schemas
β β βββ services/ # Business logic
β β βββ main.py # Application entry
β βββ requirements.txt
β
βββ .env # Environment variables
βββ README.md # This file
βββ .gitignore
git clone https://github.com/yocho1/ai-assistant-app.git
cd ai-assistant-app# Navigate to backend directory
cd ai-assistant/backend
# Create virtual environment
python -m venv .venv
# Activate virtual environment
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Initialize database
python -m app.database.init_db# Navigate to frontend directory
cd ../frontend
# Install dependencies
npm install
# or with yarn
yarn installCreate a .env file in the backend directory:
# Authentication
SECRET_KEY=your-super-secret-jwt-key-change-in-production
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
REFRESH_TOKEN_EXPIRE_DAYS=7
# OpenRouter AI
OPENROUTER_API_KEY=sk-or-v1-your-api-key-here
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
OPENROUTER_MODEL=openai/gpt-4-turbo-preview
# Deepgram Voice
DEEPGRAM_API_KEY=your-deepgram-api-key
# Amadeus Flight API
AMADEUS_API_KEY=your-amadeus-api-key
AMADEUS_API_SECRET=your-amadeus-api-secret
AMADEUS_BASE_URL=https://test.api.amadeus.com/v1
# OpenWeatherMap
OPENWEATHER_API_KEY=your-openweather-api-key
# Database
DATABASE_URL=sqlite+aiosqlite:///./assistant.db
# CORS
BACKEND_CORS_ORIGINS=["http://localhost:5173","http://localhost:8000"]Get your API keys from:
- OpenRouter: platform.openrouter.ai
- Deepgram: deepgram.com
- Amadeus: developers.amadeus.com
- OpenWeatherMap: openweathermap.org/api
cd ai-assistant/backend
source .venv/bin/activate # or .venv\Scripts\activate on Windows
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000Backend will be available at http://localhost:8000
cd ai-assistant/frontend
npm run devFrontend will be available at http://localhost:5173
cd ai-assistant/backend
uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4cd ai-assistant/frontend
npm run build
npm run previewOnce the backend is running, visit:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
POST /api/v1/auth/register
POST /api/v1/auth/login
POST /api/v1/auth/refreshPOST /api/v1/chat/
GET /api/v1/chat/history
POST /api/v1/chat/clearPOST /api/v1/flights/search
POST /api/v1/flights/bookGET /api/v1/weather/{city}POST /api/v1/voice/transcribe
POST /api/v1/voice/synthesizecurl -X POST "http://localhost:8000/api/v1/chat/" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"message": "Find me flights from New York to Paris next week",
"conversation_id": "optional-id"
}'# Create Dockerfile for backend
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]- Railway: Connect GitHub repo, auto-deploy
- Heroku:
git push heroku main - AWS EC2: Deploy with PM2 or Systemd
- Google Cloud Run: Container-based deployment
- Azure App Service: Web app deployment
- Vercel:
vercel deploy - Netlify:
netlify deploy --prod - AWS Amplify: Connect GitHub repo
- Cloudflare Pages: Git integration
Set environment variables in your deployment platform's dashboard or use .env files.
cd ai-assistant/backend
pytest tests/ -v --cov=appcd ai-assistant/frontend
npm run test
npm run test:coverage- Lighthouse Score: 90+
- First Contentful Paint: < 1.5s
- Time to Interactive: < 3.5s
- API Response Time: < 200ms (average)
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Python: Follow PEP 8, use Black formatter
- TypeScript: Follow Airbnb style guide, use Prettier
- Commits: Use conventional commits format
Backend won't start:
# Check Python version
python --version # Should be 3.12+
# Reinstall dependencies
pip install --force-reinstall -r requirements.txtFrontend build errors:
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm installCORS errors:
- Verify
BACKEND_CORS_ORIGINSin.env - Check that frontend URL matches CORS origins
This project is licensed under the MIT License - see the LICENSE file for details.
- yocho1 - Initial work - GitHub
- OpenRouter for AI capabilities
- Deepgram for voice recognition
- Amadeus for flight data
- OpenWeatherMap for weather data
- All open-source contributors
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@example.com
Made with β€οΈ and β
If you find this project useful, please consider giving it a β!