Product Documentation: TravX (v1.0)
"The AI-Powered Operating System for Indian Tourism"
1. Executive Summary
TravX is a unified "Super-App" designed to bridge the gap between digital convenience and the complex on-ground reality of traveling in India. It consolidates fragmented verticals—transport, safety, finance, and language—into a single ecosystem powered by Google Gemini AI. The platform employs a "Dual-Persona" architecture to address the distinct needs of Domestic Citizens and Foreign Visitors, solving critical friction points such as safety anxiety, language barriers, and connectivity dead zones,.
- Tagline: Navigate the Incredible.
- Core Objective: To replace the "trust deficit" in Indian tourism with a verified, AI-assisted safety net.
2. Technical Architecture
2.1 Tech Stack
The application is built for performance, type safety, and accessibility.
- Frontend Framework: React 19 (Functional Components, Hooks).
- Language: TypeScript (Strict typing for system robustness).
- Styling Engine: Tailwind CSS (Utility-first, responsive design).
- AI Engine: Google Gemini API.
-
gemini-2.5-flash: For rapid conversational chat and JSON itinerary generation. -
gemini-live-preview: For "Bharat Voice" translation and "Drishti Vision" analysis.
-
- Visualization: Recharts (For financial/budget analytics).
- Build Tooling: Vite/Webpack.
2.2 Codebase Structure
The architecture follows a modular, feature-based file structure:
-
App.tsx: The root orchestrator handling global state (User Persona, Settings) and routing. -
Layout.tsx: Manages the persistent application shell (Header, Floating Nav) and contains the Global Event Listener for the "Shake-to-SOS" hardware trigger,. -
services/geminiService.ts: The AI abstraction layer managing API calls for chat, vision, and structured JSON generation.
3. Core Feature Modules
3.1 Identity & Access Management (The "Gatekeeper")
The app differentiates user experience immediately upon entry to tailor utilities and compliance.
- Dual-Persona Onboarding:
- Indian Citizen: Onboards via Aadhar/DigiLocker. unlocks UPI payments and verified rentals,.
- Foreign Visitor: Onboards via Passport/Visa. Prioritizes currency tools, embassy contacts, and cultural etiquette tips,,.
- Logistics Portal: A dedicated "Maintenance Login" for heavy vehicle operators and cargo drivers to verify permits and manage fleet logistics,.
3.2 The Intelligence Core (Gemini AI)
Located in TravelAssistant.tsx, this module acts as the "Travel Brain".
- Structured Itinerary Generator: An "unexpected hack" where the AI generates structured JSON data instead of text blocks. This renders as an interactive day-by-day timeline with timestamps (e.g., "Day 1: Arrive at Cochin"),,.
- Bharat Voice: Uses Gemini Live to provide real-time, low-latency speech-to-speech translation between English and Indian regional languages (Tamil, Hindi, Telugu),,.
- Drishti Vision: A multimodal camera system that identifies Indian currency, translates regional restaurant menus, and provides historical context for monuments,,.
- Contextual Chat: An AI assistant aware of the user's persona (e.g., advising a foreigner on safety vs. advising a local on deals),.
3.3 Logistics & Booking Ecosystem
A unified engine (ServicesPlanner.tsx) aggregating multi-modal transport.
- Transport Search: Supports Flights, Trains (IRCTC style), Buses, and Cabs,.
- Locality Operators: Connects users with the unorganized sector, such as local jeeps, trekking guides, and logistics providers.
- Rental "Gatekeeper":
- Allows renting bikes (e.g., Royal Enfield) and cars.
- Logic: The system checks
isDLVerifiedstatus. Users cannot book until they verify their Driving License via the integrated DigiLocker modal, ensuring legal compliance,,.
3.4 The Safety Shield (Guardian System)
A proactive and reactive security layer located in SafetyModule.tsx.
- Hardware-Integrated SOS: Uses the Device Motion API to detect vigorous shaking. This instantly triggers the "Emergency Distress" mode without needing UI navigation,,.
- AI Safety Guard: Pushes location-aware warnings. Example: If in Connaught Place, New Delhi, it warns: "Politely decline unsolicited help... distract tactics are common",,.
- Bharat Swasthya (Medical Agent): A specialized sub-agent for medical triage, offering first-aid advice for common ailments (e.g., food poisoning) and locating nearby pharmacies/hospitals (108 Ambulance integration),,.
- Live Location Sharing: Generates an encrypted link to share real-time GPS coordinates with trusted contacts or trip agents,.
3.5 Financial Infrastructure (FinTech)
- Offline Payments (*99#): A critical feature for remote connectivity. It simulates the government's USSD protocol, allowing users to execute UPI transactions via cellular signal (GSM) when internet (4G/5G) is unavailable,,.
- Secure Payment Gateway: A realistic orchestration layer supporting UPI, Cards, and NetBanking, featuring a custom PIN pad for authentication,.
- Trip Budget Analytics: Uses Recharts to visualize spending categories (Food vs. Transport vs. Stay) against a defined budget cap,,.
3.6 Community & Utilities
- Documents Vault: A "Holographic" UI wallet secured by DigiLocker to store Aadhar, Vaccination Certs, and Tickets,,.
- Travel Clubs: Niche communities (e.g., "Goa Chill Squad", "Himalayan Trekkers") for socializing and group planning,.
- Smart Guide: Provides timeline reminders for flights and boarding gates,.
4. Critical User Flows
Flow A: The "Smart Booking" Journey
- Discovery: User selects a cinematic package (e.g., "Spiritual Varanasi"),.
- Planning: User inputs dates; AI generates a JSON itinerary.
- Agent: System assigns a verified local guide (e.g., Rajesh Kumar).
- Payment: User authenticates via PIN Pad.
- Ticket: A digital "tear-off" ticket is generated with a QR code,.
Flow B: The Rental "Gatekeeper"
- Select: User chooses a vehicle (e.g., Royal Enfield).
- Check: System validates
isDLVerified. - Verify: If false, opens DigiLocker Verification Modal,.
- Book: Once verified (
True), payment is unlocked and booking is confirmed.
Flow C: The Safety Loop
- Trigger: User shakes the phone vigorously.
- Activation: SOS Modal opens immediately.
- Action: User taps "SOS" to contact Police (100) and share live location.
- Alternative: User selects "Medical" to chat with Bharat Swasthya for health advice.
5. UI/UX Design System
- Aesthetic: "Doodle" branding with organic SVG path animations (Logo, Splash) to feel friendly and human-centric,.
- Glassmorphism: Extensive use of backdrop-blur, semi-transparent whites, and gradients to create depth,.
- Micro-Interactions:
- Active states: Buttons scale down (
active:scale-95). - Feedback: Wiggling icons on hover.
- Transitions: Smooth fade-ins (
animate-fade-in).
- Active states: Buttons scale down (
- Accessibility: Includes settings for Screen Reader Mode, Voice-First Mode, and Haptic Feedback to support diverse demographics,.
6. Future Roadmap
- Real-Time Backends: Integration with live IRCTC (Railways) and Amadeus (Flights) APIs.
- Offline Map Caching: Downloading map tiles for navigation in zero-network zones.
- AR History: Augmented Reality overlay for monuments (point camera to see history).
- Blockchain Ticketing: Immutable ledger for ticket verification to prevent black-market scalping.
Built With
- gemini
- google-app-engine
- react
- tailwind
Log in or sign up for Devpost to join the conversation.