An AI-powered travel planning platform specialized for creating structured, emoji-rich, and personalized itineraries for Sri Lanka.
Features โข Tech Stack โข Getting Started โข Environment Setup โข API Documentation
- Overview
- Features
- Tech Stack
- Architecture
- Getting Started
- Environment Variables
- Project Structure
- API Documentation
- Database Schema
- Deployment
- Security
- Contributing
- License
- Support
Wanderwise combines cutting-edge AI technology with modern web development to deliver an exceptional travel planning experience for Sri Lanka. The platform leverages OpenAI's GPT models and Hugging Face's inference capabilities to generate personalized, detailed itineraries that help travelers make the most of their Sri Lankan adventure.
- ๐ฏ Personalized Planning: AI-driven itineraries tailored to your preferences, budget, and travel style
- ๐บ๏ธ Sri Lanka Specialist: Deep knowledge of Sri Lankan destinations, culture, and hidden gems
- ๐ฑ Modern UX: Beautiful, responsive interface built with the latest web technologies
- ๐ Secure & Reliable: Enterprise-grade security with JWT authentication and data encryption
- ๐ Export Ready: Professional PDF generation for offline access
- Create detailed day-by-day travel plans based on:
- Destinations
- Trip dates
- Travel style (adventure, relaxation, culture, etc.)
- Real-time itinerary generation with streaming support
- Emoji-rich formatting for enhanced readability
- 24/7 travel assistance for Sri Lanka
- Ask questions about:
- Destinations and attractions
- Local culture and customs
- Safety and health information
- Transportation options
- Weather and best times to visit
- Context-aware responses with conversation history
- Download itineraries as beautifully formatted PDFs
- Includes:
- Day-by-day schedules
- Location maps
- Activity descriptions
- Budget breakdowns
- Travel tips
- Optimized for printing and offline viewing
- Secure JWT-based authentication
- Google OAuth 2.0 integration
- User profile management
- Password reset functionality
- Session management
- Subscription management
- Payment history tracking
- Secure transaction handling
- Mobile-first approach
- Optimized for all screen sizes
- Touch-friendly interfaces
- Progressive Web App (PWA) capabilities
- Leaflet-based map integration
- Location markers and routes
- Interactive destination exploration
- Travel history
- Account settings
- Payment management
- Activity analytics
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 15.4.3 | React framework with SSR/SSG capabilities |
| React | 19.1.0 | UI library for building interactive interfaces |
| Tailwind CSS | 4.x | Utility-first CSS framework |
| Framer Motion | 12.23.12 | Animation library for smooth transitions |
| React Leaflet | 5.0.0 | Interactive map integration |
| Axios | 1.11.0 | HTTP client for API requests |
| jsPDF | 3.0.4 | PDF generation library |
| React Hot Toast | 2.6.0 | Notification system |
| Recharts | 3.2.1 | Data visualization charts |
| Lucide React | 0.535.0 | Icon library |
| Technology | Version | Purpose |
|---|---|---|
| Node.js | 18+ | JavaScript runtime |
| Express.js | 5.1.0 | Web application framework |
| PostgreSQL | Latest | Relational database |
| JWT | 9.0.2 | Token-based authentication |
| Google Auth Library | 10.5.0 | Google OAuth implementation |
| Bcrypt | 6.0.0 | Password hashing |
| Cloudinary | 2.8.0 | Image upload and management |
| SendGrid | 8.1.6 | Email service |
| Technology | Purpose |
|---|---|
| FastAPI | High-performance Python web framework |
| Hugging Face | AI model inference |
| Uvicorn | ASGI server |
| Python 3.10+ (3.14) | Programming language |
โโโโโโโโโโโโโโโโโโโ
โ Client โ Next.js 15 + React 19
โ (Port 3000) โ Tailwind CSS, Framer Motion
โโโโโโโโโโฌโโโโโโโโโ
โ
โ HTTP/HTTPS
โ
โโโโโโโโโโผโโโโโโโโโ
โ Server โ Express.js + Node.js
โ (Port 5000) โ JWT Auth, PostgreSQL
โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโ
โ โ
โ โ
โโโโโโโโโโผโโโโโโโโโ โโโโโโผโโโโโโโโโโโ
โ PostgreSQL โ โ AI Service โ
โ Database โ โ (Port 8001) โ
โโโโโโโโโโโโโโโโโโโ โ FastAPI โ
โโโโโโโโโโโโโโโโโ
โ
โ
โโโโโโโโผโโโโโโโโ
โ Hugging Face โ
โ Models โ
โโโโโโโโโโโโโโโโ
- User Action โ Client sends request to Server
- Authentication โ Server validates JWT token
- Business Logic โ Server processes request
- AI Processing (if needed) โ Server calls AI Service
- Data Storage โ Server interacts with PostgreSQL
- Response โ Server sends response back to Client
Ensure you have the following installed:
- Node.js v18 or higher (Download)
- Python v3.9 or higher (Download)
- PostgreSQL v14 or higher (Download)
- npm or yarn package manager
- Git for version control
You'll need API keys from the following services:
- Hugging Face - For AI model inference
- Google Cloud Console - For OAuth 2.0
- Stripe - For payment processing
- Cloudinary - For image management (optional)
- SendGrid - For email services (optional)
git clone https://github.com/supunakalanka76/wanderwise-travel-platform.git
cd wanderwise-travel-platformCreate a PostgreSQL database:
# Connect to PostgreSQL
psql -U postgres
# Create database
CREATE DATABASE wanderwise;
# Create user (optional)
CREATE USER wanderwise_user WITH PASSWORD 'your_secure_password';
GRANT ALL PRIVILEGES ON DATABASE wanderwise TO wanderwise_user;Run the database migrations:
cd server
# Execute the SQL files in the database folder
psql -U postgres -d wanderwise -f database/schema.sqlcd server
# Install dependencies
npm install
# Create environment file
cp .env.example .env
# Edit . env file with your configuration
nano .env
# Start development server
npm run devThe server will run on http://localhost:5000
cd client
# Install dependencies
npm install
# Create environment file
cp .env.local.example .env.local
# Edit .env.local with your configuration
nano .env.local
# Start development server
npm run devThe client will run on http://localhost:3000
cd ai-service
# 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
# Create environment file
cp . env.example .env
# Edit .env with your configuration
nano .env
# Start FastAPI server
uvicorn main:app --reload --port 8001The AI service will run on http://localhost:8001
# Server Configuration
PORT=5000
NODE_ENV=development
# Database
DATABASE_URL=postgresql://username:password@localhost:5432/wanderwise
DB_HOST=localhost
DB_PORT=5432
DB_NAME=wanderwise
DB_USER=your_username
DB_PASSWORD=your_password
# Authentication
JWT_SECRET=your_super_secret_jwt_key_min_32_characters
JWT_EXPIRE=7d
REFRESH_TOKEN_SECRET=your_refresh_token_secret
REFRESH_TOKEN_EXPIRE=30d
# Google OAuth
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_CALLBACK_URL=http://localhost:5000/auth/google/callback
# OpenAI
OPENAI_API_KEY=your_openai_api_key
OPENAI_MODEL=gpt-4-turbo-preview
# Email Service (SendGrid)
SENDGRID_API_KEY=your_sendgrid_api_key
FROM_EMAIL=noreply@wanderwise.com
# Cloudinary (Image Upload)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
# AI Service
AI_SERVICE_URL=http://localhost:8001
# CORS
CLIENT_URL=http://localhost:3000
# Rate Limiting
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100# API Endpoints
NEXT_PUBLIC_API_URL=http://localhost:5000
NEXT_PUBLIC_AI_SERVICE_URL=http://localhost:8001
# Google OAuth
NEXT_PUBLIC_GOOGLE_CLIENT_ID=your_google_client_id
# App Configuration
NEXT_PUBLIC_APP_NAME=Wanderwise
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Features
NEXT_PUBLIC_ENABLE_ANALYTICS=false
NEXT_PUBLIC_ENABLE_CHAT=true
NEXT_PUBLIC_ENABLE_PAYMENTS=true
# Turnstile (Captcha) - Optional
NEXT_PUBLIC_TURNSTILE_SITE_KEY=your_turnstile_site_key# Hugging Face
HUGGINGFACE_API_KEY=your_hugging_face_api_key
HUGGINGFACE_MODEL=mistralai/Mixtral-8x7B-Instruct-v0.1
# Service Configuration
SERVICE_PORT=8001
SERVICE_HOST=0.0.0.0
# CORS
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5000wanderwise-travel-platform/
โ
โโโ client/ # Frontend Application (Next.js)
โ โโโ app/ # Next.js 15 App Directory
โ โ โโโ (auth)/ # Authentication pages
โ โ โโโ (dashboard)/ # User dashboard pages
โ โ โโโ itinerary/ # Itinerary pages
โ โ โโโ chat/ # AI chat interface
โ โ โโโ api/ # API routes
โ โ โโโ layout.js # Root layout
โ โโโ components/ # React components
โ โ โโโ ui/ # UI components
โ โ โโโ forms/ # Form components
โ โ โโโ layouts/ # Layout components
โ โ โโโ features/ # Feature-specific components
โ โโโ lib/ # Utility functions
โ โโโ hooks/ # Custom React hooks
โ โโโ contexts/ # React contexts
โ โโโ styles/ # Global styles
โ โโโ public/ # Static assets
โ โโโ package.json # Dependencies
โ
โโโ server/ # Backend Application (Express.js)
โ โโโ controllers/ # Route controllers
โ โ โโโ authController.js
โ โ โโโ itineraryController.js
โ โ โโโ chatController. js
โ โ โโโ paymentController.js
โ โโโ routes/ # API routes
โ โ โโโ auth.js
โ โ โโโ itinerary.js
โ โ โโโ chat.js
โ โ โโโ payment.js
โ โโโ middleware/ # Express middleware
โ โ โโโ auth.js
โ โ โโโ validation.js
โ โ โโโ errorHandler.js
โ โโโ config/ # Configuration files
โ โ โโโ db.js
โ โ โโโ cloudinary.js
โ โโโ utils/ # Utility functions
โ โ โโโ fileValidator.js
โ
โ โโโ database/ # Database files
โ โ โโโ schema.sql
โ โ โโโ seeds.sql
โ โโโ index.js # Server entry point
โ โโโ package.json # Dependencies
โ
โโโ ai-service/ # AI Service (FastAPI)
โ โโโ main.py # FastAPI app entry
โ โโโ routers/ # API routers
โ โ โโโ itinerary.py
โ โ โโโ chat.py
โ โโโ services/ # Business logic
โ โ โโโ ai_service.py
โ โ โโโ prompts.py
โ โโโ models/ # Pydantic models
โ โ โโโ schemas.py
โ โโโ utils/ # Utility functions
โ โโโ requirements.txt # Python dependencies
โ โโโ . env # Environment variables
โ
โโโ . gitignore # Git ignore rules
โโโ README.md # Project documentation
โโโ LICENSE # MIT License
- Client:
http://localhost:3000 - Server:
http://localhost:5000 - AI Service:
http://localhost:8001
POST /api/auth/register
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example. com",
"password": "SecurePassword123!"
}POST /api/auth/login
Content-Type: application/json
{
"email": "john@example.com",
"password": "SecurePassword123!"
}POST /api/auth/google
Content-Type: application/json
{
"token": "google_oauth_token"
}POST /api/itinerary/generate
Authorization: Bearer <jwt_token>
Content-Type: application/json
{
"destination": "Colombo, Kandy, Galle",
"duration": 7,
"startDate": "2025-12-25",
"budget": "medium",
"preferences": ["culture", "nature", "adventure"],
"travelers": 2
}GET /api/itinerary/user
Authorization: Bearer <jwt_token>GET /api/itinerary/: id
Authorization: Bearer <jwt_token>GET /api/itinerary/: id/pdf
Authorization: Bearer <jwt_token>POST /api/chat/message
Authorization: Bearer <jwt_token>
Content-Type: application/json
{
"message": "What are the best places to visit in Ella? ",
"conversationId": "optional_conversation_id"
}POST /api/payment/create-intent
Authorization: Bearer <jwt_token>
Content-Type: application/json
{
"amount": 2999,
"currency": "usd",
"planId": "premium_plan"
}CREATE TABLE users (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
password_hash VARCHAR(255),
google_id VARCHAR(255) UNIQUE,
avatar_url VARCHAR(500),
role VARCHAR(50) DEFAULT 'user',
is_verified BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);CREATE TABLE itineraries (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
title VARCHAR(255) NOT NULL,
destination VARCHAR(255) NOT NULL,
start_date DATE NOT NULL,
end_date DATE NOT NULL,
duration INTEGER NOT NULL,
budget VARCHAR(50),
travelers INTEGER DEFAULT 1,
preferences JSONB,
content JSONB NOT NULL,
is_favorite BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);CREATE TABLE chat_conversations (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
title VARCHAR(255),
messages JSONB DEFAULT '[]',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);CREATE TABLE payments (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
stripe_payment_id VARCHAR(255) UNIQUE NOT NULL,
amount INTEGER NOT NULL,
currency VARCHAR(10) DEFAULT 'usd',
status VARCHAR(50) NOT NULL,
plan_id VARCHAR(100),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);# Install Vercel CLI
npm install -g vercel
# Navigate to client directory
cd client
# Deploy
vercel --prod# Install Railway CLI
npm install -g @railway/cli
# Navigate to server directory
cd server
# Initialize Railway
railway init
# Deploy
railway up- Create PostgreSQL instance
- Update connection string in
.env - Run migrations
# Build Docker image
docker build -t wanderwise-ai-service .
# Deploy to Cloud Run
gcloud run deploy wanderwise-ai --image wanderwise-ai-service --platform managed- โ Password Hashing: bcrypt with salt rounds
- โ JWT Authentication: Secure token-based auth
- โ Role-Based Access Control (RBAC): User permissions
- โ Input Validation: express-validator for all inputs
- โ SQL Injection Prevention: Parameterized queries
- โ XSS Protection: DOMPurify sanitization
- โ CORS Configuration: Restricted origins
- โ Rate Limiting: Prevent abuse and DDoS
- โ HTTPS: SSL/TLS encryption
- โ Environment Variables: Sensitive data protection
- โ Helmet. js: HTTP security headers
- โ CSRF Protection: Token-based validation
- Never commit
.envfiles - Rotate API keys regularly
- Use strong passwords
- Enable 2FA where possible
- Keep dependencies updated
- Regular security audits
| Field | Value |
|---|---|
| Student ID | 24063586 (E219113) |
| Student Name | M.W. H. G. Supun Akalanka |
| Project Type | Final Year Project |
| Institution | London Metropolitan University / ESOFT Metro Campus |
| Academic Year | 2024/2025 |
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your 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
- Follow ESLint configuration
- Write meaningful commit messages
- Add comments for complex logic
- Update documentation
- Write tests for new features
This project is licensed under the MIT License. See the LICENSE file for details.
For support, questions, or feedback:
- Email:
- Academic: e219113@esoft.academy
- Personal: supunakalanka76@gmail.com
- GitHub Issues: Create an issue
This project adheres to academic integrity guidelines and proper citation of all resources used during development.
Note: This is an academic project developed for educational purposes as part of the Advanced Software Engineering course at ESOFT Metro Campus, affiliated with London Metropolitan University.
- OpenAI for GPT models
- Hugging Face for AI infrastructure
- Next.js team for the amazing framework
- All open-source contributors
- ESOFT Metro Campus for academic support
- London Metropolitan University
- Total Lines of Code: ~50,000+
- Components: 100+
- API Endpoints: 30+
- Database Tables: 10+
- Dependencies: 120+
- v1.0.0 (December 2025)
- Initial release
- Core features implemented
- Full authentication system
- AI itinerary generation
- Payment integration
- Mobile app (React Native)
- Multi-language support
- Social features (share itineraries)
- Real-time collaboration
- Offline mode
- Advanced analytics dashboard
- Travel booking integration
- Weather API integration
- Community reviews and ratings
- Video tour guides