Skip to content

E-vanson/Travio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travio - Travel Q&A Assistant

An intelligent AI-powered travel assistant that provides instant answers about visa requirements, travel documents, and journey planning advice.

🚀 Features

  • Smart Q&A Interface: Ask questions about travel visas, requirements, and tips
  • Real-time Responses: Get formatted, structured answers powered by DeepSeek R1 AI
  • Query History: View and revisit previous questions and responses
  • Responsive Design: Clean, modern interface that works on all devices
  • Dark Theme: Inspired by Claude.ai with purple accents
  • Loading States: Visual feedback during AI processing
  • Error Handling: Graceful error messages and retry options

🛠 Tech Stack

Backend

  • FastAPI - Modern Python web framework
  • DeepSeek R1 - AI model via OpenRouter API
  • Pydantic - Data validation
  • Uvicorn - ASGI server

Frontend

  • Next.js 14 - React framework with App Router
  • TypeScript - Type-safe JavaScript
  • Tailwind CSS - Utility-first CSS framework
  • React Markdown - Markdown rendering

📋 Prerequisites

  • Python 3.8+
  • Node.js 18+
  • OpenRouter API key (for DeepSeek R1 access)

🔧 Setup Instructions

Backend Setup

  1. Navigate to backend directory:

    cd backend
  2. Create virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Environment variables:

    cp .env.example .env

    Edit .env and add your OpenRouter API key:

    OPENROUTER_API_KEY=your_api_key_here
    
  5. Run the backend:

    uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
  6. Verify API documentation: Open http://localhost:8000/docs for Swagger UI

Frontend Setup

  1. Navigate to frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Environment variables:

    cp .env.local.example .env.local

    The default configuration should work for local development.

  4. Run the frontend:

    npm run dev
  5. Access the application: Open http://localhost:3000

🌐 API Documentation

Endpoints

  • GET /api/health - Health check
  • POST /api/query - Submit a travel question

Query Endpoint

Request:

{
  "query": "What visa do I need to travel from USA to Japan?",
  "user_id": "optional_user_identifier"
}

Response:

{
  "query": "What visa do I need to travel from USA to Japan?",
  "response": "For US citizens traveling to Japan...",
  "timestamp": "2024-01-07T12:00:00Z"
}

🤖 AI Integration

The application uses DeepSeek R1 model via OpenRouter API for intelligent travel advice. The AI is specifically trained to provide:

  • Visa requirements and processing times
  • Passport validity requirements
  • Additional documentation needed
  • Travel advisories and safety information
  • Cost estimates where applicable

📱 Responsive Design

  • Mobile: Optimized for phones with collapsible sidebar
  • Tablet: Balanced layout with appropriate spacing
  • Desktop: Full-featured interface with persistent sidebar

🎨 Design System

  • Colors: Dark theme with purple (#7c3aed) accents
  • Typography: Inter font family
  • Components: Glassmorphism effects and smooth animations
  • Icons: Heroicons for consistent iconography

🔒 Environment Variables

Backend (.env)

OPENROUTER_API_KEY=your_openrouter_api_key

Frontend (.env.local)

NEXT_PUBLIC_API_URL=http://localhost:8000

🚀 Deployment

Backend Deployment

  1. Choose a platform (Railway, Render, Heroku)
  2. Set environment variables
  3. Deploy from the backend/ directory
  4. Verify /api/health endpoint

Frontend Deployment

  1. Use Vercel for Next.js deployment
  2. Set NEXT_PUBLIC_API_URL to your backend URL
  3. Deploy from the frontend/ directory

🔮 Future Improvements

  • User authentication and personalized history
  • Multi-language support
  • Advanced filtering and search in history
  • Integration with real-time travel APIs
  • Voice input for queries
  • Offline capability with cached responses

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📞 Support

For questions or issues, please open an issue on GitHub.

About

An AI powered Travel Document Assistant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors