A hackathon MVP for planning European trips using AI-powered multi-agent orchestration. Compare train, flight, bus, car, and ferry options based on speed, budget, and environmental impact.
- Smart Trip Planning: Natural language input or structured form
- Multi-Modal Comparison: Train, flight, bus, car, and ferry options
- Preference-Based Scoring: Optimize for speed, budget, or planet
- Real-Time Booking: Book your preferred option instantly
- CO₂ Tracking: See environmental impact of each option
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: TailwindCSS v4 + shadcn/ui
- State Management: React Query
- Icons: lucide-react
- Node.js 18+ and npm
```bash
npm install
cp .env.example .env.local
npm run dev ```
Open http://localhost:3000 to see the app.
NEXT_PUBLIC_API_URL: Backend API base URL (optional, uses mock data if not set)
The app expects the following REST endpoints:
-
POST /chat- Get travel options- Body:
{ text: string, prefs: Preferences } - Returns:
{ query, candidates[], recommendation }
- Body:
-
POST /book- Book a travel option- Body:
{ option: Candidate, user: string } - Returns:
{ booking_id, status }
- Body:
-
GET /itinerary/{id}- Get booking details- Returns:
{ booking_id, status, option, user, booked_at }
- Returns:
If the API is unavailable, the app uses mock data for demonstration.
``` app/ page.tsx # Landing page plan/page.tsx # Trip planning form results/page.tsx # Search results itinerary/[id]/page.tsx # Booking confirmation components/ ChatBox.tsx # Natural language input PreferenceControls.tsx # Speed/Budget/Planet sliders OptionCard.tsx # Travel option display ResultsTable.tsx # Results table view lib/ api.ts # API client types.ts # TypeScript definitions scoring.ts # Client-side scoring utils/format.ts # Formatting utilities ```
- Add map visualization for route legs
- Replace CO₂ heuristics with real per-leg data from backend
- Add user authentication
- Implement saved trips
- Add more transport modes (rideshare, bike)
MIT