An AI-powered web application that visualizes theatre tours on an interactive map. Simply provide a tour URL, and MorganMap will extract venue information, geocode locations, and display the complete tour route with distances and durations.
- AI-powered tour data extraction from URLs
- Interactive Leaflet map visualization
- Multi-provider geocoding support (Nominatim, OpenCage, Google Maps)
- Automatic distance calculations between venues
- Route visualization with connecting lines
- Duration display for each venue stop
- Responsive design with Tailwind CSS
- Color-coded venues by time period or region
- Venue markers with detailed popups
- Tour details sidebar with statistics
- Manual data entry and editing
- Export tour data (JSON, CSV)
- Shareable tour links
- Multiple tour comparison
- Frontend: React 18 + TypeScript
- Styling: Tailwind CSS
- Mapping: Leaflet.js with React-Leaflet
- Build Tool: Vite
- AI Integration: OpenAI GPT-4 or Anthropic Claude
- Geocoding: Nominatim (default, free), OpenCage, or Google Maps API
- Hosting: Vercel (recommended) or similar platform
- Node.js 18+ and npm
- API key for AI service (OpenAI or Anthropic)
- Optional: API key for geocoding service (for higher rate limits)
git clone https://github.com/[your-username]/morganmap.git
cd morganmapnpm installCreate a .env file in the root directory:
cp .env.example .envEdit .env and add your API keys:
# Required: Choose one AI provider
VITE_OPENAI_API_KEY=your_openai_api_key_here
# OR
VITE_ANTHROPIC_API_KEY=your_anthropic_api_key_here
# Optional: For enhanced geocoding
VITE_OPENCAGE_API_KEY=your_opencage_api_key_here
# OR
VITE_GOOGLE_MAPS_API_KEY=your_google_maps_api_key_herenpm run devOpen your browser to http://localhost:5173
npm run build
npm run preview- Enter Tour URL: Paste a link to a theatre tour announcement, press release, or venue listing
- Extract Data: Click "Extract Tour" - the AI will parse the page and extract venue information
- Review Results: Check the extracted venues, dates, and locations
- View on Map: The interactive map displays all venues with routes connecting them
- Explore Details: Click markers for venue information, hover over routes for distances
- Official tour announcement pages
- Theatre press releases
- Venue websites with tour schedules
- News articles about tours
- Social media posts with tour information
If AI extraction fails or for custom tours:
- Click "Manual Entry" option
- Add venues one by one with:
- Venue name
- Address/location
- Start and end dates
- View your custom tour on the map
- Visit OpenAI Platform
- Create an account or sign in
- Generate a new API key
- Add to
.envasVITE_OPENAI_API_KEY - Cost: ~$0.01-0.03 per tour extraction
- Visit Anthropic Console
- Create an account or sign in
- Generate a new API key
- Add to
.envasVITE_ANTHROPIC_API_KEY - Cost: Similar to OpenAI
Nominatim (Default - FREE)
- No API key required
- Rate limit: 1 request per second
- Good for: Development and low-volume usage
OpenCage (Optional)
- Free tier: 2,500 requests/day
- Sign up at OpenCage
- Good for: Medium-volume production usage
Google Maps (Optional)
- $200 free credit per month
- Sign up at Google Cloud Console
- Good for: High accuracy requirements
morganmap/
├── api/ # Serverless API functions (future)
├── public/ # Static assets
├── src/
│ ├── components/ # React components
│ ├── services/ # Business logic
│ │ ├── ai.ts # AI service wrapper
│ │ ├── geocoding.ts # Geocoding service
│ │ └── distance.ts # Distance calculations
│ ├── types/ # TypeScript definitions
│ │ └── tour.ts # Tour data types
│ ├── App.tsx # Main application (to be created)
│ ├── main.tsx # Entry point (to be created)
│ └── index.css # Global styles
├── .env.example # Environment template
├── .gitignore # Git ignore rules
├── package.json # Dependencies
├── tailwind.config.js # Tailwind configuration
├── tsconfig.json # TypeScript configuration
├── vite.config.ts # Vite configuration
├── README.md # This file
└── IMPLEMENTATION_PLAN.md # Detailed implementation guide
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
This project uses:
- TypeScript for type safety
- ESLint for code linting
- Tailwind CSS for styling
- Functional React components with hooks
- Push code to GitHub
- Import project in Vercel
- Configure environment variables in Vercel dashboard
- Deploy automatically on every push
- Push code to GitHub
- Import project in Netlify
- Configure build settings:
- Build command:
npm run build - Publish directory:
dist
- Build command:
- Add environment variables
- Deploy
The app is a standard Vite React application and can be deployed to:
- GitHub Pages
- AWS S3 + CloudFront
- DigitalOcean App Platform
- Any static hosting service
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Project setup and configuration
- TypeScript type definitions
- Core services (AI, geocoding, distance)
- TourInput component
- MapView with Leaflet
- Venue markers and popups
- Route line visualization
- Tour details sidebar
- Serverless tour extraction function
- Geocoding endpoint
- Route calculation endpoint
- Manual editing capability
- Data export features
- Enhanced error handling
- Performance optimization
- Multiple tour comparison
- Timeline view
- Statistics dashboard
- Social sharing
See IMPLEMENTATION_PLAN.md for detailed roadmap.
AI extraction fails
- Check API key is correct in
.env - Verify API key has sufficient credits
- Try a different tour URL
- Use manual entry as fallback
Geocoding rate limit errors
- Using Nominatim: Wait 1 second between requests (automatic)
- Consider upgrading to OpenCage or Google Maps API
- Check API key quotas
Map not displaying
- Check browser console for errors
- Verify Leaflet CSS is loaded
- Check internet connection (map tiles need to load)
Build errors
- Delete
node_modulesandpackage-lock.json - Run
npm installagain - Ensure Node.js version is 18+
MIT License - See LICENSE file for details
- Leaflet for mapping functionality
- OpenStreetMap for map tiles
- OpenAI and Anthropic for AI capabilities
- Nominatim for free geocoding
For issues, questions, or suggestions:
- Open an issue on GitHub
- Check IMPLEMENTATION_PLAN.md for detailed documentation
Created for theatre tour visualization and planning.
Project Status: In active development (Phase 1 complete)
Last Updated: 2025-11-07