A Next.js web application for savvy business travelers to discover and book local, authentic experiences that fit their schedules.
- Check the project running on Vercel
- If that doesn't work, here's a short video demo
- Onboarding Flow: Three-step onboarding with full-screen video backgrounds
- Inspiration Page: Visual gallery with search functionality for finding experiences
- Smart Recommendations: Mock API integration with fallback data
- Interactive Map: Mapbox GL integration showing experience locations
- Booking Flow: Complete booking and confirmation process
- Responsive Design: Mobile-first design using Tailwind CSS
- Node.js 18.x or higher
- npm or yarn
- Mapbox account (free tier available)
cd tetristravel
npm installCreate a .env.local file in the root directory:
cp .env.local.example .env.localEdit .env.local and add your Mapbox token:
NEXT_PUBLIC_MAPBOX_KEY=your_mapbox_token_here
NEXT_PUBLIC_RECOMMENDATIONS_API=https://your-api-endpoint.com/api/recommendGetting a Mapbox Token:
- Sign up at mapbox.com
- Navigate to your Access Tokens
- Copy your default public token or create a new one
- Paste it in your
.env.localfile
Note: The NEXT_PUBLIC_RECOMMENDATIONS_API is optional. If not set, the app will use mock data.
Place your onboarding videos in public/videos/:
onboarding-1.mp4onboarding-2.mp4onboarding-3.mp4
See public/videos/README.md for video requirements and free sources.
npm run devOpen http://localhost:3000 to view the application.
tetristravel/
├── app/ # Next.js App Router pages
│ ├── onboarding/ # Onboarding flow (3 steps)
│ ├── inspiration/ # Search and inspiration page
│ ├── recommendations/ # Map view with experience cards
│ ├── confirmation/ # Booking confirmation
│ ├── api/ # API routes
│ │ └── recommendations/ # Mock recommendations endpoint
│ ├── layout.tsx # Root layout with providers
│ └── globals.css # Global styles
├── components/ # Reusable React components
│ ├── VideoBackground.tsx # Video background component
│ ├── MapView.tsx # Mapbox integration
│ └── RecommendationCard.tsx # Experience card component
├── lib/ # Utilities and shared code
│ ├── types.ts # TypeScript type definitions
│ ├── mockData.ts # Mock recommendation data
│ └── context/ # React Context for state management
│ └── AppContext.tsx # Global app state
├── public/ # Static assets
│ ├── videos/ # Onboarding videos
│ └── images/ # Image assets
└── package.json # Dependencies and scripts
- Landing (
/) → Redirects to onboarding - Onboarding (
/onboarding) → 3-step carousel with video backgrounds - Inspiration (
/inspiration) → Image grid + search input - Recommendations (
/recommendations) → Map view with experience cards - Confirmation (
/confirmation) → Booking confirmation page
- Next.js 15: React framework with App Router
- TypeScript: Type-safe development
- Tailwind CSS: Utility-first styling
- Mapbox GL JS: Interactive maps via react-map-gl
- React Context: State management
The app includes a mock API endpoint at /api/recommendations that:
- Accepts POST requests with a
queryfield - Returns filtered recommendations based on keywords
- Falls back to all recommendations if no matches
To connect a real backend:
- Set
NEXT_PUBLIC_RECOMMENDATIONS_APIin.env.local - Ensure your API accepts POST requests with this format:
{ "query": "I have 3 hours in Paris..." } - Return an array of recommendations matching the
Recommendationtype inlib/types.ts
# Run development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run ESLint
npm run lintEdit lib/mockData.ts to add more recommendations:
{
id: 7,
title: "Your Experience",
description: "Description here",
image: "https://images.unsplash.com/...",
location: { lat: 48.8566, lng: 2.3522 },
duration: "2 hours",
price: "€35"
}- Global styles:
app/globals.css - Tailwind config:
tailwind.config.ts - Component-level styles: Use Tailwind utility classes
Edit components/MapView.tsx:
- Change map style: Modify
mapStyleprop - Adjust initial view: Change
viewStateinitial values - Customize markers: Modify the SVG in the
Markercomponent
Future enhancements could include:
- User authentication
- Real Google Calendar integration
- Payment processing
- User reviews and ratings
- Saved experiences
- Email confirmations
- Multi-language support
- Progressive Web App (PWA)
- Verify
NEXT_PUBLIC_MAPBOX_KEYis set correctly - Check browser console for Mapbox-related errors
- Ensure you're using a public token (not a secret token)
- Check video files are in
public/videos/ - Verify video format is MP4 (H.264 codec)
- Some browsers block autoplay; videos should still work with user interaction
# Clear Next.js cache
rm -rf .next
# Reinstall dependencies
rm -rf node_modules package-lock.json
npm install
# Rebuild
npm run buildThis is a prototype application. For production use:
- Add proper error handling
- Implement real authentication
- Add comprehensive testing
- Set up CI/CD pipeline
- Add monitoring and analytics
- Implement proper SEO
ISC
For issues or questions, please create an issue in the GitHub repository or contact support@tetristravel.com