TourGuideAI is an intelligent virtual tour guide application that uses AI to create personalized travel experiences.
- Dynamic Tour Generation: Creates customized tour routes based on user preferences
- Real-time Translation: Translates signs, menus, and conversations
- Historical Context: Provides historical information about landmarks and sites
- Local Insights: Offers insider tips and hidden gems
- Accessibility Options: Features for users with visual, hearing, or mobility impairments
- Augmented Reality: Overlays historical images and information
- Offline Mode: Core functionality available without internet connection
- Interactive Map: Visual representation of tour routes and points of interest
- User Analytics: Insights into user behavior and preferences
- Beta Program: Early access program with feedback collection and user testing
- Comprehensive onboarding workflow
- Feature request system with voting
- Customizable survey system
- UX audit system with session recording and heatmaps
- Task prompt system for guided beta testing
- Issue prioritization system
- Global Content Delivery: Fast and reliable content access worldwide with CDN integration
- Monetization: Subscription-based access with tiered pricing plans
For rapid deployment and testing, use our simplified MVP version with only essential features:
- ✅ JWT Authentication
- ✅ OpenAI Chat Integration
- ✅ Google Maps Integration
- ✅ Basic User Profile
- ✅ Responsive Material-UI design
-
API Keys Required:
-
Node.js (v16 or higher)
git checkout mvp-release
npm install
Create a .env
file in the root directory:
# TourGuide AI MVP Environment Configuration
OPENAI_API_KEY=your_openai_api_key_here
GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here
JWT_SECRET=your_super_secure_jwt_secret_here_minimum_32_characters
PORT=3001
NODE_ENV=production
# Demo Account (CHANGE IN PRODUCTION)
DEMO_EMAIL=demo@example.com
DEMO_PASSWORD=demo123
# Rate Limiting
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
# Cache Configuration
CACHE_TTL=3600000
npm run build
npm run server
Your MVP app will be available at: http://localhost:3001
heroku login
heroku create your-tourguide-app
heroku config:set OPENAI_API_KEY=your_key
heroku config:set GOOGLE_MAPS_API_KEY=your_key
heroku config:set JWT_SECRET=your_secret
heroku config:set NODE_ENV=production
git push heroku mvp-release:main
- Connect GitHub repo to Railway
- Set environment variables in dashboard
- Deploy automatically
- Connect GitHub repo
- Build command:
npm run build
- Run command:
npm run server
- Set environment variables
- Email: demo@example.com
- Password: demo123
git checkout main
# Full version automatically restored
npm install # Reinstall full dependencies
The MVP version removes these complex features:
- ❌ Beta program features
- ❌ Role-based access control
- ❌ Analytics dashboard
- ❌ Email verification
- ❌ Admin dashboard
- ❌ Invite code system
- ❌ Feedback collection
- ❌ Complex testing framework
- ❌ Performance monitoring
- ✅ Simple JWT authentication
- ✅ OpenAI chat integration
- ✅ Google Maps integration
- ✅ Basic user profiles
- ✅ Responsive Material-UI design
- ✅ Core routing (Home, Chat, Map, Profile)
-
Test the application:
- Register a new account
- Try the chat feature
- Test the map functionality
-
Configure your APIs:
- Ensure OpenAI API key has sufficient credits
- Enable necessary Google Maps APIs
-
Security:
- Change the default JWT secret
- Remove or change the demo account
-
"Cannot GET /" error:
- Make sure you're using the MVP server:
node server/mvp-server.js
- Make sure you're using the MVP server:
-
API Key errors:
- Verify your environment variables
- Check API key permissions
-
Build errors:
- Delete
node_modules
andpackage-lock.json
- Run
npm install
again
- Delete
If you need help with deployment:
- Check the console logs for error messages
- Verify all environment variables are set
- Test locally first before deploying
- Node.js 16+
- npm 7+
- MongoDB 4+
- Google Maps API key
- OpenAI API key
-
Clone the repository:
git clone https://github.com/yourusername/tourguideai.git cd tourguideai
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env
Edit the
.env
file with your API keys and configuration. -
Start the development server:
npm run dev
For full development setup, create a .env
file with the following configuration:
# TourGuide AI Full Development Configuration
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key_here
# Google Maps Configuration
GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here
# Authentication
JWT_SECRET=your_super_secure_jwt_secret_here_minimum_32_characters
# Database Configuration
MONGODB_URI=mongodb://localhost:27017/tourguideai
DATABASE_NAME=tourguideai
# Server Configuration
PORT=3001
NODE_ENV=development
# Translation Service
DEEPL_API_KEY=your_deepl_api_key_here
# Email Configuration (for full version)
EMAIL_SERVICE=gmail
EMAIL_USER=your_email@gmail.com
EMAIL_PASSWORD=your_app_password
# Rate Limiting
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
# Cache Configuration
CACHE_TTL=3600000
REDIS_URL=redis://localhost:6379
# File Upload Configuration
MAX_FILE_SIZE=5242880
ALLOWED_FILE_TYPES=image/jpeg,image/png,image/gif
# Analytics (optional)
GOOGLE_ANALYTICS_ID=your_ga_id_here
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Navigate to "APIs & Services" > "Dashboard"
- Click "+ ENABLE APIS AND SERVICES"
- Search for and enable the following APIs:
- Maps JavaScript API
- Places API
- Directions API
- Geocoding API
- Go to "APIs & Services" > "Credentials"
- Click "Create credentials" > "API key"
- Restrict the API key to the APIs listed above
- Copy the API key to your
.env
file
- Go to OpenAI's website
- Sign up or log in to your account
- Navigate to the API section
- Create a new API key
- Copy the API key to your
.env
file - Set up billing to ensure API access
- Go to the DeepL API portal
- Sign up for a developer account
- Navigate to your account dashboard
- Create a new API key
- Copy the API key to your
.env
file
Generate a secure random string (minimum 32 characters):
# Using OpenSSL
openssl rand -base64 32
# Using Node.js
node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
-
Set up API tokens:
npm run setup:tokens
-
Configure API access:
npm run configure:api
-
Verify API configuration:
npm run verify:api
This will check if all required API endpoints are accessible.
-
Generate access tokens for development:
npm run generate:dev-tokens
These tokens are valid for 7 days and are required for local development.
- Never commit your .env file to version control
- Change the demo account credentials in production
- Use strong, unique passwords and secrets
- Regularly rotate your API keys
- Enable API key restrictions and monitoring
- Use environment-specific configurations for different deployment stages
TourGuideAI/
├── server/ # Backend server code
│ ├── clients/ # External API clients
│ ├── config/ # Server configuration
│ ├── coverage/ # Test coverage reports
│ ├── middleware/ # Express middleware
│ ├── models/ # Database models
│ ├── public/ # Static server assets
│ ├── routes/ # API routes
│ ├── scripts/ # Server utility scripts
│ ├── services/ # Backend services
│ ├── tests/ # Server-side tests
│ ├── utils/ # Utility functions
│ └── vault/ # Secure configuration storage
├── src/ # Frontend source code
│ ├── __mocks__/ # Jest mocks
│ ├── api/ # API clients and interfaces
│ ├── components/ # Reusable UI components
│ ├── config/ # Frontend configuration
│ ├── contexts/ # React context providers
│ ├── core/ # Core functionality and services
│ ├── features/ # Feature modules (beta-program, map-visualization, travel-planning, user-profile)
│ ├── pages/ # Page components
│ ├── services/ # Frontend services
│ ├── styles/ # Global styles
│ ├── tests/ # Frontend test files
│ ├── utils/ # Utility functions
│ ├── App.js # Main application component
│ └── index.js # Entry point
├── tests/ # End-to-end and integration tests
│ ├── config/ # Test configuration
│ ├── cross-browser/ # Cross-browser testing
│ ├── integration/ # Integration tests
│ ├── load/ # Load testing
│ ├── security/ # Security tests
│ ├── smoke/ # Smoke tests
│ ├── stability/ # Stability tests
│ └── user-journey/ # User journey tests
├── scripts/ # Development and deployment scripts
│ └── utils/ # Script utilities
├── docs/ # Documentation
│ ├── pics/ # Images and screenshots
│ ├── project_lifecycle/ # Project management docs (all_tests, deployment, knowledge, etc.)
│ └── prototype/ # Prototype data and mockups
├── deployment/ # Deployment configurations
│ └── production/ # Production deployment files
├── logs/ # Application logs
├── patches/ # Code patches
└── public/ # Public frontend assets
main
: Production-ready codedev
: Development branch for integrationfeature/*
: Feature branches
- Create a feature branch from
dev
- Make your changes
- Run tests:
npm test
- Update documentation if necessary
- Create a pull request to
dev
- Get approval from at least one reviewer
- Merge to
dev
- Follow the JavaScript Style Guide
- Write tests for all new features
- Maintain code coverage above 80%
- Use TypeScript for type safety
The project is organized into multiple development phases:
- Initial Setup and Prototype - ✅ Completed (March 2025)
- API Architecture - ✅ Completed (March 2025)
- Real API Integration - ✅ Completed (March 2025)
- Production Integration - ✅ Completed (March 2025)
- Performance Optimization & Production Readiness - ✅ Completed (March 2025)
- Beta Release & User Feedback - ✅ Completed (April 2025)
- Post-Beta Enhancements - ⏭️ Skipped
- Online Launch - 🚀 In Progress (Started April 2025)
- Global deployment infrastructure
- CDN implementation for worldwide content delivery
- Security hardening and compliance
- Customer support infrastructure
- Monetization strategy implementation
Current Version: 1.1.0-MVP (June 24, 2025)
TourGuideAI follows semantic versioning (MAJOR.MINOR.PATCH) as defined in our Version Control Documentation.
The project is currently in Release Candidate stage, preparing for the official 1.0.0 release scheduled for August 2025.
For detailed release plans, see our 1.0.0 Release Candidate 2 Plan.
Test individual components and functions in isolation:
npm run test:unit
Test interactions between components and services:
npm run test:integration
Test complete user flows:
npm run test:e2e
Simulate realistic user personas interacting with the application:
npm run test:user-journeys
TourGuideAI implements comprehensive user journey tests for different personas:
- Sarah (Casual Tourist) - Weekend city exploration
- Michael (History Enthusiast) - Historical deep dive
- Elena (Family Traveler) - Family-friendly travel
- James (Business Traveler) - Business trip with limited free time
- Tanya (Adventure Seeker) - Active outdoor exploration
All user journey tests are now passing with 100% success rate as of May 2025.
Test user experience with the UX audit system:
npm run test:ux-audit
Before running the test scripts, ensure you have the following:
- Node.js and npm installed
- All project dependencies installed (
npm install
) - Appropriate permissions to run scripts on your system
PowerShell scripts may be blocked from running due to execution policies. To enable running the scripts:
- Open PowerShell as Administrator
- Set the execution policy to allow running the scripts:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
- Alternatively, run the scripts with the
-ExecutionPolicy Bypass
parameter:powershell -ExecutionPolicy Bypass -File .\scripts\run-all-tests.ps1
- ⏸️ Staging Deployment: Automatically skipped
Before running bash scripts, you need to make them executable:
chmod +x scripts/run-all-tests.sh
chmod +x tests/*.sh # If you have any other scripts in the tests directory
Then you can run them:
./scripts/run-all-tests.sh
If you receive "file not found" errors when trying to run scripts:
- Check that you are in the project root directory
- Verify that the scripts exist in the specified paths
- Use the full path to the script:
C:\full\path\to\TourGuideAI\scripts\run-all-tests.bat
If you receive "permission denied" errors:
Windows:
- Right-click on the script file
- Select Properties
- Click the "Unblock" button if it's available
- Click Apply and OK
Unix/Linux/macOS:
chmod +x <script_file>
If scripts fail to run properly:
- Check for syntax errors in the script
- Ensure you have the required environment variables set
- Verify that Node.js and npm are in your PATH
- Try running with administrator privileges
- The test scripts will create a
test-results
directory in the project root to store test reports - If you customize the scripts, ensure you maintain proper paths and error handling
- For CI/CD integration, use the appropriate script for your platform in your CI pipeline
TourGuideAI uses a comprehensive multi-environment deployment strategy supporting development, staging, and production environments.
We maintain two deployment approaches:
- MVP Deployment (
scripts/deploy-mvp.sh
) - Optimized MVP deployment with security checks and multi-platform support - Production Deployment (
deployment/production/
) - Enterprise-grade Docker-based deployment
For detailed information, see our Deployment Strategy.
Automatic CI/CD Behavior:
- ✅ Build & Test: All tests run successfully
- ⏸️ Staging Deployment: Automatically skipped (infrastructure not configured)
- ⏸️ Production Deployment: Automatically skipped (infrastructure not configured)
- 🎭 Mock Testing: Simulation tests run when real environments aren't available
Missing Infrastructure Components:
- AWS account with S3, CloudFront, IAM setup
- Domain registration (
tourguideai.com
) - SSL certificate configuration
- GitHub Secrets for deployment credentials
Infrastructure Readiness: 0% - No production infrastructure is currently provisioned.
For local development and testing:
npm run dev
Automatically deployed from the dev
branch (requires infrastructure setup):
npm run deploy:staging
Enterprise-grade deployment from the main
branch (requires complete infrastructure):
npm run deploy:production
Infrastructure & Deployment:
- Infrastructure Awareness Guide - How CI/CD adapts to infrastructure availability
- Deployment Strategy - Overview of deployment approaches
- Deployment Preparation Checklist - Complete infrastructure requirements
- Testing Improvements - GitHub Actions testing enhancements
Implementation Plans:
- CDN Implementation Plan - Global content delivery setup
- Deployment Pipeline - CI/CD pipeline configuration
- Google Analytics for user behavior
- Sentry for error tracking
- Custom analytics dashboard for feature usage
- UX audit system for user interaction analysis
The application follows WCAG 2.1 AA guidelines:
- Keyboard navigation support
- Screen reader compatibility
- Color contrast compliance
- Alternative text for images
- Focus management
- JWT for authentication
- API rate limiting
- Input validation
- CSRF protection
- Regular security audits
See CONTRIBUTING.md for guidelines on contributing to the project.
- Deployment Strategy - Deployment approach overview
- Deployment Preparation Checklist - Infrastructure requirements
- CDN Implementation Plan - Global content delivery setup
- Deployment Pipeline Plan - CI/CD configuration
- Performance Implementation Plan - Code splitting and optimization
- Performance Optimization Plan - Performance strategy
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for the GPT models
- Google Maps for mapping functionality
- Contributors and beta testers