Skip to content

eMohan07/Trail

Repository files navigation

Endless Trail - Tourism & Hospitality Platform

A modern web platform for travel planning, destination discovery, and hospitality services powered by AI.

🌟 Features

  • Photo Swipe Discovery: Discover destinations by swiping through beautiful photos. AI analyzes your preferences to create personalized recommendations.
  • AI Travel Assistant: Chat with an intelligent travel assistant powered by Google Gemini AI for personalized trip planning.
  • Trip Planner: Generate custom itineraries based on destination, duration, and budget preferences.
  • Destination Explorer: Browse and filter destinations by category and sustainability ratings.
  • Safety & Weather Dashboard: Get real-time safety alerts and weather information for your destination.

πŸš€ Tech Stack

Frontend

  • React 18
  • React Router DOM
  • Axios
  • CSS3 with modern gradients and animations

Backend

  • Node.js
  • Express.js
  • Google Generative AI (Gemini)
  • Google Cloud Vision API
  • Multer (for file uploads)
  • CORS enabled

πŸ“‹ Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • Google Cloud account (for Vision API and Gemini API)
  • API keys for:
    • Google Gemini API
    • Google Cloud Vision API
    • OpenWeather API (optional)

πŸ› οΈ Installation

1. Clone the repository

git clone <repository-url>
cd Endless-Trial

2. Backend Setup

cd backend
npm install

Create a .env file in the backend directory:

PORT=5000
GOOGLE_GEMINI_API_KEY=your_api_key_here
GOOGLE_APPLICATION_CREDENTIALS=path/to/service-account-key.json

For Google Cloud Vision API, you need to:

  1. Create a project in Google Cloud Console
  2. Enable the Vision API
  3. Create a service account and download the JSON key
  4. Set the path in GOOGLE_APPLICATION_CREDENTIALS

3. Frontend Setup

cd frontend
npm install

Create a .env file in the frontend directory (optional):

REACT_APP_API_URL=http://localhost:5000

πŸƒ Running the Application

Start Backend Server

cd backend
npm start
# or for development with auto-reload
npm run dev

The backend will run on http://localhost:5000

Start Frontend Development Server

cd frontend
npm start

The frontend will run on http://localhost:3000

πŸ“ Project Structure

Endless-Trial/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ server.js          # Main Express server
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ uploads/           # Uploaded files directory
β”‚   └── .env              # Environment variables (create this)
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/   # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ Chatbot.js
β”‚   β”‚   β”‚   └── PhotoSwipe.js
β”‚   β”‚   β”œβ”€β”€ pages/        # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ Homepage.js
β”‚   β”‚   β”‚   β”œβ”€β”€ TripPlanner.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Destinations.js
β”‚   β”‚   β”‚   └── Safety.js
β”‚   β”‚   β”œβ”€β”€ App.js        # Main App component
β”‚   β”‚   └── index.js      # Entry point
β”‚   └── package.json
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .env.example          # Example environment variables
└── README.md

πŸ”Œ API Endpoints

Backend API

  • GET / - Health check
  • POST /api/trip/plan - Generate trip itinerary
    {
      "destination": "Paris",
      "days": 5,
      "budget": "medium"
    }
  • POST /api/photo/analyze - Analyze uploaded photo (multipart/form-data)
  • POST /api/chat - Chat with AI assistant
    {
      "message": "What are the best places to visit in Paris?"
    }
  • GET /api/weather/:location - Get weather information
  • GET /api/safety/:location - Get safety information

🎨 Features in Detail

Photo Swipe Discovery

Users can swipe through travel photos, and the system learns their preferences to suggest matching destinations.

AI Chatbot

Powered by Google Gemini AI, the chatbot provides intelligent travel recommendations and answers questions about destinations.

Trip Planner

Create personalized itineraries based on:

  • Destination
  • Number of days
  • Budget level (Budget, Medium, Luxury)

Destinations Page

Browse destinations with filters for:

  • Category (Nature, Beach, Urban, Adventure)
  • Sustainability rating (High, Medium, Low)

Safety Dashboard

Check safety information and weather conditions for any destination.

πŸ”’ Environment Variables

See .env.example for all required environment variables.

πŸ› Troubleshooting

  1. Backend not starting: Check if port 5000 is available and all environment variables are set.
  2. API errors: Verify your Google Cloud credentials and API keys are correct.
  3. CORS issues: Ensure the backend CORS is properly configured (already set up in server.js).

πŸ“ TODO

See TODO.md for upcoming features and improvements.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“„ License

This project is open source and available under the MIT License.

πŸ™ Acknowledgments

  • Google Cloud Vision API
  • Google Gemini AI
  • Unsplash for sample images
  • React community

Made with ❀️ for travelers and explorers

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors